[PATCH] D115219: [C++20] [Coroutines] Mark coroutine done if unhandled_exception throws

2021-12-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D115219#3177213 , @rjmccall wrote: > Okay. Well, I'm glad it works. I guess I find it a little strange that > `coro.end` doesn't already mark the coroutine done. I guess the normal C++ > lowering always generates a final

[PATCH] D110215: [C++2a] [Module] Support extern C/C++ semantics

2021-12-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 392625. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110215/new/ https://reviews.llvm.org/D110215 Files: clang/include/clang/Basic/Module.h clang/include/clang/Lex/ModuleMap.h clang/include/clan

[PATCH] D110215: [C++2a] [Module] Support extern C/C++ semantics

2021-12-07 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGe587372f8510: [C++20] [Module] Support extern C/C++ semantics (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACT

[PATCH] D115132: [C++20] [Modules] Namespace Declaration shouldn't have module linkage

2021-12-07 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG60f826663d86: [C++20] [Modules] Namespace Declaration shouldn't have module linkage (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo

[PATCH] D110215: [C++2a] [Module] Support extern C/C++ semantics

2021-12-07 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D110215#3178575 , @vitalybuka wrote: > llvm-project/clang/lib/Sema/SemaModule.cpp:715:70: warning: missing field > 'OuterVisibleModules' initializer [-Wmissing-field-initializers] >

[PATCH] D114769: [C++20] [Modules] [Concepts] Recognize same concepts more precisely in Serialization

2021-12-07 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe166755a6919: [C++20] [Modules] [Concepts] Recognize same concepts more precisely in… (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

[PATCH] D115219: [C++20] [Coroutines] Mark coroutine done if unhandled_exception throws

2021-12-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 392669. ChuanqiXu added a comment. Address comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115219/new/ https://reviews.llvm.org/D115219 Files: llvm/docs/Coroutines.rst llvm/lib/Transforms/Coroutines/CoroSplit.cpp llvm/test/Transforms

[PATCH] D115219: [C++20] [Coroutines] Mark coroutine done if unhandled_exception throws

2021-12-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 2 inline comments as done. ChuanqiXu added inline comments. Comment at: llvm/docs/Coroutines.rst:1395 +|| Landingpad | mark coroutine as done | mark coroutine done | +++-++---

[PATCH] D115222: [Coroutines] Remove unused coroutine builtin/intrinsics llvm.coro.param (NFC-ish)

2021-12-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D115222#3177269 , @rjmccall wrote: > Like a lot of the switched-resume lowering, this intrinsic is extremely tied > to C++ semantics. If C++ doesn't actually allow the optimization anymore, > then I completely agree that w

[PATCH] D113545: [C++20] [Module] Support reachable definition initially/partially

2021-12-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 393027. ChuanqiXu added a comment. Rebased CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113545/new/ https://reviews.llvm.org/D113545 Files: clang/include/clang/AST/DeclBase.h clang/include/clang/Sema/Sema.h clang/lib/AST/Decl.cpp clang/l

[PATCH] D113545: [C++20] [Module] Support reachable definition initially/partially

2021-12-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 393028. ChuanqiXu added a comment. Update comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113545/new/ https://reviews.llvm.org/D113545 Files: clang/include/clang/AST/DeclBase.h clang/include/clang/Sema/Sema.h clang/lib/AST/Decl.cpp

[PATCH] D112903: [C++20] [Module] Fix bug47116 and implement [module.interface]/p6

2021-12-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 393030. ChuanqiXu added a comment. Rebased CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112903/new/ https://reviews.llvm.org/D112903 Files: clang/include/clang/AST/DeclBase.h clang/include/clang/Basic/DiagnosticSemaKinds.td clang/include/c

[PATCH] D115222: [Coroutines] Remove unused coroutine builtin/intrinsics llvm.coro.param (NFC-ish)

2021-12-08 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG352e36e10d2c: [Coroutines] Remove unused coroutine builtin/intrinsics llvm.coro.param (NFC… (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D115219: [C++20] [Coroutines] Mark coroutine done if unhandled_exception throws

2021-12-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 393039. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115219/new/ https://reviews.llvm.org/D115219 Files: llvm/docs/Coroutines.rst llvm/lib/Transforms/Coroutines/CoroSplit.cpp llvm/test/Transform

[PATCH] D115219: [C++20] [Coroutines] Mark coroutine done if unhandled_exception throws

2021-12-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Thanks for reviewing this! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115219/new/ https://reviews.llvm.org/D115219 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[PATCH] D115219: [C++20] [Coroutines] Mark coroutine done if unhandled_exception throws

2021-12-08 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG320e4efe99d3: [C++20] [Coroutines] Mark coroutine done if unhandled_exception throws (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo

[PATCH] D113545: [C++20] [Module] Support reachable definition initially/partially

2021-12-09 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu planned changes to this revision. ChuanqiXu added a comment. I think it would be better to resent this when it is more complete. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113545/new/ https://reviews.llvm.org/D113545 ___ cfe-comm

[PATCH] D115610: [C++20] [Modules] Don't create multiple global module fragment

2021-12-12 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rsmith, aaron.ballman, urnathan, erichkeane, hubert.reinterpretcast. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. Since the serialization code would recognize modu

[PATCH] D112903: [C++20] [Module] Fix bug47116 and implement [module.interface]/p6

2021-12-13 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @rsmith @aaron.ballman @urnathan gentle ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112903/new/ https://reviews.llvm.org/D112903 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org

[PATCH] D115625: [clang-format] add support for cppm files

2021-12-13 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. Thanks for the quick respond! A note in the summary: - C++20 Modules current style is to assign a new file suffix .cppm instead of .cpp and .h + C++20 Modules current style is to as

[PATCH] D115692: [docs] Mark the support for coroutine as unreleased

2021-12-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. According to https://lists.llvm.org/pipermail/cfe-dev/2021-December/069607.html, it might be the time to mark it as done. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115692/new/ https://reviews.llvm.org/D115692 _

[PATCH] D115778: [docs] Give the reason why the support for coroutine is partial

2021-12-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: aaron.ballman, jyknight. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. See https://lists.llvm.org/pipermail/cfe-dev/2021-December/069608.html. We couldn't mark coro

[PATCH] D115790: [Coroutines] Run CoroEarly Pass in front of AlwaysInliner in O0 pass and warn for always_inline coroutine

2021-12-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rjmccall, lxfind, aeubanks. ChuanqiXu added a project: clang. Herald added subscribers: ormris, steven_wu, hiraditya. ChuanqiXu requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits. Herald added a project:

[PATCH] D115792: [Modules] Incorrect ODR detection for unresolved using type

2021-12-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rsmith, aaron.ballman, urnathan, iains. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. See https://github.com/llvm/llvm-project/issues/52713. This patch is a attempt

[PATCH] D115778: [docs] Give the reason why the support for coroutine is partial

2021-12-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 394527. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115778/new/ https://reviews.llvm.org/D115778 Files: clang/www/cxx_status.html Index: clang/www/cxx_status.html

[PATCH] D115778: [docs] Give the reason why the support for coroutine is partial

2021-12-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/www/cxx_status.html:1267-1270 +(12): The optimizer couldn't handle TLS with + `__attribute__((const))` attribute correctly. It implies that there would + be problems if the coroutine is possible to resume on a different thread.

[PATCH] D115778: [docs] Give the reason why the support for coroutine is partial

2021-12-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 394529. ChuanqiXu added a comment. Address comments. Thanks for reviewing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115778/new/ https://reviews.llvm.org/D115778 Files: clang/www/cxx_status.html Inde

[PATCH] D115778: [docs] Give the reason why the support for coroutine is partial

2021-12-15 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5653d127d7c4: [docs] Give the reason why the support for coroutine is partial (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D115790: [Coroutines] Run CoroEarly Pass in front of AlwaysInliner in O0 pass and warn for always_inline coroutine

2021-12-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: llvm/test/Other/new-pm-O0-defaults.ll:34 ; CHECK-DIS-NEXT: Running pass: AddDiscriminatorsPass +; CHECK-CORO: Running pass: CoroEarlyPass ; CHECK-DIS-NEXT: Running pass: AlwaysInlinerPass aeubanks wrote: > should hav

[PATCH] D115792: [Modules] Incorrect ODR detection for unresolved using type

2021-12-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 394786. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115792/new/ https://reviews.llvm.org/D115792 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/TypeProperties.td clang/lib/

[PATCH] D115867: [C++20] [Coroutines] Warning for always_inline coroutine

2021-12-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rjmccall, lxfind. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. See the discussion in https://reviews.llvm.org/D100282. Since coroutine couldn't be **properly** in

[PATCH] D115790: [Coroutines] Set presplit attribute in Clang

2021-12-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 394801. ChuanqiXu retitled this revision from "[Coroutines] Run CoroEarly Pass in front of AlwaysInliner in O0 pass and warn for always_inline coroutine" to "[Coroutines] Set presplit attribute in Clang". ChuanqiXu edited the summary of this revision. Chuan

[PATCH] D115790: [Coroutines] Set presplit attribute in Clang

2021-12-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @ezhulenev hi, we are discussing if we should set the coroutine attributes in middle-end or front-end. Now in this revision, it would set the `coroutine.presplit` attribute in frontend, which would break the MLIR test. I have tried to implement it myself today. But

[PATCH] D115792: [Modules] Incorrect ODR detection for unresolved using type

2021-12-16 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGc50a4b3f9749: [Modules] Incorrect ODR detection for unresolved using type (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D112903: [C++20] [Module] Fix bug47116 and implement [module.interface]/p6

2021-12-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 395045. ChuanqiXu added a comment. Address comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112903/new/ https://reviews.llvm.org/D112903 Files: clang/include/clang/AST/DeclBase.h clang/include/clang/Basic/DiagnosticSemaKinds.td clang/

[PATCH] D112903: [C++20] [Module] Fix bug47116 and implement [module.interface]/p6

2021-12-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 5 inline comments as done. ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:1622 +// [module.interface]p6: +// A redeclaration of an entity X is implicitly exported if X was introduced by aaron.ballman wrote: > I didn't

[PATCH] D115790: [Coroutines] Set presplit attribute in Clang

2021-12-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D115790#3199905 , @ezhulenev wrote: > There are two places where in MLIR you can put an attribute to coroutine > functions: > > 1. > https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/Async/Transforms/AsyncToAs

[PATCH] D115610: [C++20] [Modules] Don't create multiple global module fragment

2021-12-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @rsmith gentle ping~ Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115610/new/ https://reviews.llvm.org/D115610 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[PATCH] D116097: [NFC] [C++20] [Modules] Add tests for template instantiation in transitive imported module

2021-12-21 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds two test about template class instantiation in transitively imported module. They are used as pre-commit tests for successive patche

[PATCH] D116098: [C++20] [Coroutines] Mark imported module as imported if not exported

2021-12-21 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rsmith, aaron.ballman, urnathan, iains. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. The intention of this patch is described in the title. I met the problem in the

[PATCH] D116097: [NFC] [C++20] [Modules] Add tests for template instantiation in transitive imported module

2021-12-21 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 395784. ChuanqiXu added a comment. Update command line CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116097/new/ https://reviews.llvm.org/D116097 Files: clang/test/Modules/Inputs/module-transtive-instantiation/Templ.cppm clang/test/Modules/In

[PATCH] D116097: [NFC] [C++20] [Modules] Add tests for template instantiation in transitive imported module

2021-12-21 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. Now the windows tests passed, this should be good. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116097/new/ https://reviews.llvm.org/D116097 __

[PATCH] D116097: [NFC] [C++20] [Modules] Add tests for template instantiation in transitive imported module

2021-12-21 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG759f3e297c07: [NFC] [C++20] [Modules] Add tests for template instantiation in transitively… (authored by ChuanqiXu). Repository: rG LLVM Github Mo

[PATCH] D116098: [C++20] [Modules] Mark imported module as imported if not exported

2021-12-21 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 395789. ChuanqiXu added a comment. Rebased CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116098/new/ https://reviews.llvm.org/D116098 Files: clang/lib/Sema/SemaModule.cpp clang/test/Modules/module-transtive-instantiation.cpp Index: clang/te

[PATCH] D115867: [C++20] [Coroutines] Warning for always_inline coroutine

2021-12-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 395837. ChuanqiXu added a comment. Format codes CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115867/new/ https://reviews.llvm.org/D115867 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D115790: [Coroutines] Set presplit attribute in Clang and mlir

2021-12-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 395835. ChuanqiXu retitled this revision from "[Coroutines] Set presplit attribute in Clang" to "[Coroutines] Set presplit attribute in Clang and mlir". ChuanqiXu edited the summary of this revision. ChuanqiXu added a reviewer: mehdi_amini. ChuanqiXu added a

[PATCH] D115790: [Coroutines] Set presplit attribute in Clang and mlir

2021-12-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @ezhulenev I finally made it! Thanks for your help! @mehdi_amini @ftynse hi, might you help to look if the change in mlir part is good? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115790/new/ https://reviews.llvm.org/D115790 ___

[PATCH] D115867: [C++20] [Coroutines] Warning for always_inline coroutine

2021-12-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 395954. ChuanqiXu added a comment. Address comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115867/new/ https://reviews.llvm.org/D115867 Files: clang/include/clang/Basic/DiagnosticGroups.td clang/include/clang/Basic/DiagnosticSemaKinds.

[PATCH] D115867: [C++20] [Coroutines] Warning for always_inline coroutine

2021-12-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:0-3 +def warn_always_inline_coroutine : Warning< + "A coroutine marked always_inline might not be inlined properly." + >, + InGroup; Quuxplusone wrote: > FWIW

[PATCH] D115867: [C++20] [Coroutines] Warning for always_inline coroutine

2021-12-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 395959. ChuanqiXu edited the summary of this revision. ChuanqiXu added a comment. Format codes and edit summary. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115867/new/ https://reviews.llvm.org/D115867 Files: clang/include/clang/Basic/Diagnos

[PATCH] D115867: [C++20] [Coroutines] Warning for always_inline coroutine

2021-12-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:0-3 +def warn_always_inline_coroutine : Warning< + "A coroutine marked always_inline might not be inlined properly." + >, + InGroup; Quuxplusone wrote: > Chua

[PATCH] D116204: [C++20] [Coroutines] Allow promise_type to not define return_void or return_value

2021-12-22 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: rjmccall, lxfind, Quuxplusone, urnathan. ChuanqiXu added a project: clang. ChuanqiXu requested review of this revision. Herald added a subscriber: cfe-commits. According to [[dcl.fct.def.coroutine]p6](http://eel.is/c++draft/dcl.fct.def.c

[PATCH] D116098: [C++20] [Modules] Mark imported module as imported if not exported

2021-12-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D116098#3207812 , @urnathan wrote: > as all exports are also imports, is there a reason we don;t also add the > exports into the import table? I am not sure if it has an intentional reason or it is just an oversight. From

[PATCH] D116204: [C++20] [Coroutines] Allow promise_type to not define return_void or return_value

2021-12-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 2 inline comments as done. ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaCoroutine.cpp:1431-1432 +// +// Then AnalysisBasedWarning would emit a warning about `foo()` lacks a +// co_return statements. +Fallthrough = S.ActOnNullStm

[PATCH] D116098: [C++20] [Modules] Mark imported module as imported if not exported

2021-12-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 396007. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116098/new/ https://reviews.llvm.org/D116098 Files: clang/lib/Sema/SemaModule.cpp clang/test/Modules/module-transtive-instantiation.cpp Index

[PATCH] D116204: [C++20] [Coroutines] Allow promise_type to not define return_void or return_value

2021-12-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 396009. ChuanqiXu marked 2 inline comments as done. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116204/new/ https://reviews.llvm.org/D116204 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D116098: [C++20] [Modules] Mark imported module as imported if not exported

2021-12-23 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG368318bcce66: [C++20] [Coroutines] Mark imported module as imported if not exported (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo

[PATCH] D115790: [Coroutines] Set presplit attribute in Clang and mlir

2021-12-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 395963. ChuanqiXu added a comment. Clean codes. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115790/new/ https://reviews.llvm.org/D115790 Files: clang/lib/CodeGen/CGCoroutine.cpp clang/test/CodeGenCoroutines/coro-always-inline.cpp clang/te

[PATCH] D116204: [C++20] [Coroutines] Allow promise_type to not define return_void or return_value

2021-12-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 396126. ChuanqiXu added a comment. Address comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116204/new/ https://reviews.llvm.org/D116204 Files: clang/include/clang/Basic/DiagnosticSemaKinds.td clang/lib/Sema/SemaCoroutine.cpp clang/te

[PATCH] D116204: [C++20] [Coroutines] Allow promise_type to not define return_void or return_value

2021-12-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/SemaCXX/coroutines.cpp:987 +// +// So it isn't ill-formed if the promise doesn't define return_value and return_void. It is just a UB. +coro no_return_value_or_return_void() { Quuxplusone wrote: > It's not

[PATCH] D116204: [C++20] [Coroutines] Allow promise_type to not define return_void or return_value

2021-12-23 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG097208dbf077: [C++20] [Coroutines] Allow promise_type to not define return_void or… (authored by ChuanqiXu). Repository: rG LLVM Github Monorepo

[PATCH] D115790: [Coroutines] Set presplit attribute in Clang and mlir

2021-12-27 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 396254. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115790/new/ https://reviews.llvm.org/D115790 Files: clang/lib/CodeGen/CGCoroutine.cpp clang/test/CodeGenCoroutines/coro-always-inline.cpp cla

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu created this revision. ChuanqiXu added reviewers: aaron.ballman, asl. Herald added subscribers: libcxx-commits, ormris, arphaman, mgorny. Herald added a reviewer: alexander-shaposhnikov. Herald added a reviewer: MaskRay. Herald added a project: libunwind. Herald added a reviewer: libunwin

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 396498. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116351/new/ https://reviews.llvm.org/D116351 Files: clang-tools-extra/docs/clang-doc.rst clang/docs/CommandGuide/clang.rst clang/www/c_status

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 396509. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116351/new/ https://reviews.llvm.org/D116351 Files: clang-tools-extra/docs/clang-doc.rst clang/docs/CommandGuide/clang.rst clang/www/c_status

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-29 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 7 inline comments as done. ChuanqiXu added inline comments. Comment at: clang/www/c_status.html:76 +The https://bugs.llvm.org/";>LLVM bug tracker and +https://github.com/llvm/llvm-project/issues/";>LLVM Issues contain +a Clang C component that tracks known bugs

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 396589. ChuanqiXu marked 2 inline comments as done. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116351/new/ https://reviews.llvm.org/D116351 Files: clang-tools-extra/docs/clang-doc.rst clang/docs

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 14 inline comments as done. ChuanqiXu added inline comments. Comment at: clang/www/c_status.html:75-76 -The https://bugs.llvm.org/";>LLVM bug tracker contains a -Clang C component that tracks known bugs with Clang's language +The https://github.com/llvm/llvm-pr

[PATCH] D116351: Update Bug report URL to Github Issues

2021-12-30 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 396627. ChuanqiXu marked 2 inline comments as done. ChuanqiXu added a comment. Address comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116351/new/ https://reviews.llvm.org/D116351 Files: clang-tools-extra/docs/clang-doc.rst clang/docs

[PATCH] D98638: [RFC][Coroutine] Force stack allocation after await_suspend() call

2021-03-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. It looks like there are two things this patch wants to do: 1. Don't put the temporary generated by symmetric-transfer on the coroutine frame. 2. Offer a mechanism to force some values (it is easy to extend Alloca to Value) to put in the stack instead of the coroutine

[PATCH] D98638: [RFC][Coroutine] Force stack allocation after await_suspend() call

2021-03-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D98638#2630607 , @lxfind wrote: > In D98638#2628082 , @ChuanqiXu wrote: > >> I am a little confused about the first problem. Would it cause the program >> to crash? (e.g., we access th

[PATCH] D98638: [RFC][Coroutine] Force stack allocation after await_suspend() call

2021-03-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D98638#2630778 , @lxfind wrote: > What do you think is the fundamental problem, though? It is hard to give a formal description for the problem. Let me try to explain it. What I want to say here is about rules that decide wh

[PATCH] D98638: [RFC][Coroutine] Force stack allocation after await_suspend() call

2021-03-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D98638#2630864 , @lxfind wrote: > That's a fair point. I agree that we have no guarantee these are the only two > cases. > It does seem to me that coroutine implementation somewhat relies on proper > lifetime markers so that

[PATCH] D98638: [RFC][Coroutine] Force stack allocation after await_suspend() call

2021-03-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/CodeGen/CGCoroutine.cpp:221 CGF.EmitBlock(RealSuspendBlock); + } else if (ForcestackStart) { +Builder.CreateCall( ChuanqiXu wrote: > can we rewrite it into: > ``` > else if (SuspendRet != nullptr &&

[PATCH] D98638: [RFC][Coroutine] Force stack allocation after await_suspend() call

2021-03-16 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/CodeGen/CGCoroutine.cpp:221 CGF.EmitBlock(RealSuspendBlock); + } else if (ForcestackStart) { +Builder.CreateCall( lxfind wrote: > ChuanqiXu wrote: > > ChuanqiXu wrote: > > > can we rewrite it into:

[PATCH] D96316: [ASTMatcher] Add AST Matcher support for C++20 coroutine keywords

2021-03-21 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG55486161fa0b: [ASTMatcher] Add AST Matcher support for C++20 coroutine keywords (authored by ChuanqiXu). Herald added a project: clang. Herald added

[PATCH] D99227: [Coroutine][Clang] Force emit lifetime intrinsics for Coroutines

2021-03-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. Only one problem I had for emitting lifetime markers even at O0 is that would action make allocas to be optimized even at O0? If so, I wonder if it confuses programmers since they may find some variables disappear surprisingly. Or there would be no optimization since

[PATCH] D99227: [Coroutine][Clang] Force emit lifetime intrinsics for Coroutines

2021-03-23 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D99227#2646719 , @lxfind wrote: > In D99227#2646568 , @ChuanqiXu wrote: > >> Only one problem I had for emitting lifetime markers even at O0 is that >> would action make allocas to be

[PATCH] D99245: [Driver] Add -fno-split-stack

2021-03-24 Thread Chuanqi Xu via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG20b4f484d16f: [Driver] Add -fno-split-stack (authored by ChuanqiXu). Herald added a project: clang. Herald added a subscriber: cfe-commits. Changed

[PATCH] D100282: [Coroutines] Move CoroEarly pass to before AlwaysInliner

2021-04-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. This patch looks OK to me. > The best we can do is lower the coroutine and then inline the ramp function, > which is not really the same thing. So warning about marking a coroutine > always_inline does make some sense. It makes sense to emit a warning instead of an e

[PATCH] D100282: [Coroutines] Move CoroEarly pass to before AlwaysInliner

2021-04-11 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D100282#2682297 , @lxfind wrote: >> Ah, if the pass does more than just setting the attribute, then sure, it >> makes sense to keep it. But I do think we should be requiring the attribute >> to be added by frontends, since

[PATCH] D100415: [Coroutines] Split coroutine during CoroEarly into an init and ramp function

2021-04-13 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. The overall idea looks good to me. Since this is a fundamental and large change, I need time to run it actually and look into details. Noticed that this patch introduces new intrinsics and new concept `init function`, it may be needed to add them in the coroutines docu

[PATCH] D100282: [Coroutines] Set presplit attribute in Clang instead of CoroEarly pass

2021-04-13 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. I agree with the idea we should set the attribute in the frontend or move Coro-early pass in the front. It looks more weird to add a `noinline` attribute and move it later. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[PATCH] D100415: [Coroutines] Split coroutine during CoroEarly into an init and ramp function

2021-04-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. It looks like this code may trigger assertion in `CoroInstr.h` for `CoroIdInst::setCoroutineSelf`. Also, since this patch would enlarge the coroutine frame, it may affect the performance naturally. I **believe** it wouldn't really matter. I just find that we need co

[PATCH] D100415: [Coroutines] Split coroutine during CoroEarly into an init and ramp function

2021-04-15 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D100415#2691666 , @lxfind wrote: > @ChuanqiXu Thank you for the detailed review! Really appreciate it. > I agree we should create a coroutine benchmark at some point, ideally some > realistic production-code driven benchmark

[PATCH] D99839: [C++, test] Fix typo in NSS* vars

2021-04-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/CodeGenCXX/split-stacks.cpp:30 // CHECK-NOSEGSTK: define dso_local i32 @_Z7nosplitv() [[NSS1:#[0-9]+]] { // CHECK-NOSEGSTK: define linkonce_odr dso_local i32 @_Z8tnosplitIiEiv() [[NSS2:#[0-9]+]] comdat { +// CHECK-NOSEGST

[PATCH] D100739: [Coroutines] Handle overaligned frame allocation (2)

2021-04-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. I hadn't looked into the details. I would try to make it. But from my understanding to this problem, the correct solution should remain the previous behavior if the end user doesn't specify `alignas` for `promise_type`. I mean, it shouldn't make so many test cases fail

[PATCH] D100739: [Coroutines] Handle overaligned frame allocation (2)

2021-04-19 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D100739#2700324 , @ychen wrote: > In D100739#2700273 , @ChuanqiXu > wrote: > >> I hadn't looked into the details. I would try to make it. >> But from my understanding to this problem

[PATCH] D99839: [C++, test] Fix typo in NSS* vars

2021-04-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/CodeGenCXX/split-stacks.cpp:30 // CHECK-NOSEGSTK: define dso_local i32 @_Z7nosplitv() [[NSS1:#[0-9]+]] { // CHECK-NOSEGSTK: define linkonce_odr dso_local i32 @_Z8tnosplitIiEiv() [[NSS2:#[0-9]+]] comdat { +// CHECK-NOSEGST

[PATCH] D99839: [C++, test] Fix typo in NSS* vars

2021-04-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/test/CodeGenCXX/split-stacks.cpp:30 // CHECK-NOSEGSTK: define dso_local i32 @_Z7nosplitv() [[NSS1:#[0-9]+]] { // CHECK-NOSEGSTK: define linkonce_odr dso_local i32 @_Z8tnosplitIiEiv() [[NSS2:#[0-9]+]] comdat { +// CHECK-NOSEGST

[PATCH] D99839: [C++, test] Fix typo in NSS* vars

2021-04-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu accepted this revision. ChuanqiXu added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D99839/new/ https://reviews.llvm.org/D99839 __

[PATCH] D100739: [Coroutines] Handle overaligned frame allocation (2)

2021-04-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. There is something I am still confused about these two patch. Maybe I don't get the problem right. The example problem shows if user uses `alignas` to specify the alignment for promise_type, the actual alignment for the promise isn't correctly due to compiler didn't c

[PATCH] D100739: [Coroutines] Handle overaligned frame allocation (2)

2021-04-20 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2689 - size_t __builtin_coro_size() + size_t __builtin_coro_size(bool alloc) void *__builtin_coro_frame() ychen wrote: > ChuanqiXu wrote: > > ychen wrote: > > > lxfind wrote: >

[PATCH] D110215: [C++2a] [Module] Support extern C/C++ semantics

2021-10-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 378401. ChuanqiXu added a comment. Address the comments. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110215/new/ https://reviews.llvm.org/D110215 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaDecl.cpp clang/lib/Sema/SemaModule

[PATCH] D110215: [C++2a] [Module] Support extern C/C++ semantics

2021-10-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:9351 + (NewFD->isExternCContext() || NewFD->isExternCXXContext())) { +if (!getGlobalModule()) + Diag(NewFD->getLocation(), aaron.ballman wrote: > I'm a bit confused

[PATCH] D110215: [C++2a] [Module] Support extern C/C++ semantics

2021-10-08 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 378415. ChuanqiXu added a comment. Format. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110215/new/ https://reviews.llvm.org/D110215 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaDecl.cpp clang/lib/Sema/SemaModule.cpp clang/t

[PATCH] D110215: [C++2a] [Module] Support extern C/C++ semantics

2021-10-14 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 379907. ChuanqiXu added a comment. Herald added a subscriber: dexonsmith. Address the comments from @rsmith. It looks much better now. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110215/new/ https://reviews.llvm.org/D110215 Files: clang/inclu

[PATCH] D108696: [Coroutines] [Frontend] Lookup in std namespace first

2021-10-18 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D108696#3069723 , @avogelsgesang wrote: > Hi @ChuanqiXu > > sorry for what might be naive questions, but just to make sure I understand > the context of this patch correctly: Hi, you are welcome : ) > This patch fixes the

[PATCH] D110215: [C++2a] [Module] Support extern C/C++ semantics

2021-10-21 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @rsmith @aaron.ballman gentle ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D110215/new/ https://reviews.llvm.org/D110215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[PATCH] D108696: [Coroutines] [Frontend] Lookup in std namespace first

2021-10-24 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @Quuxplusone gentle ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D108696/new/ https://reviews.llvm.org/D108696 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

<    8   9   10   11   12   13   14   >