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

2022-01-05 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D115790#3221307 , @MaskRay wrote: > Early heads-up: we see a failure with > `llvm/lib/Transforms/Coroutines/CoroEarly.cpp:186 in bool (anonymous > namespace)::Lowerer::lowerEarlyIntrinsics(llvm::Function &): > F.hasFnAttri

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

2022-01-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Early heads-up: we see a failure with `llvm/lib/Transforms/Coroutines/CoroEarly.cpp:186 in bool (anonymous namespace)::Lowerer::lowerEarlyIntrinsics(llvm::Function &): F.hasFnAttribute(CORO_PRESPLIT_ATTR) && F.getFnAttribute(CORO_PRESPLIT_ATTR).getValueAsString() == UN

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

2022-01-05 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 rGc75cedc237f9: [Coroutines] Set presplit attribute in Clang and mlir (authored by ChuanqiXu). Changed prior to commit: https://reviews.llvm.org/D11

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

2022-01-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu marked 2 inline comments as done. ChuanqiXu added inline comments. Comment at: llvm/lib/Transforms/Coroutines/CoroEarly.cpp:198 case Intrinsic::coro_id_async: F.addFnAttr(CORO_PRESPLIT_ATTR, PREPARED_FOR_SPLIT); break; rjmccall

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

2022-01-04 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Alright, that's fine. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115790/new/ https://reviews.llvm.org/D115790 ___ cfe-commits maili

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

2022-01-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu updated this revision to Diff 397217. 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] D115790: [Coroutines] Set presplit attribute in Clang and mlir

2022-01-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/lib/CodeGen/CGCoroutine.cpp:712 + assert(CurFn); + CurFn->addFnAttr("coroutine.presplit", "0"); } The assertion here is not necessary; if it was, we'd need it everywhere. Please add a comment like "LLVM expect

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

2022-01-04 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. @rjmccall gentle ping~ CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115790/new/ https://reviews.llvm.org/D115790 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[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] D115790: [Coroutines] Set presplit attribute in Clang and mlir

2021-12-27 Thread Eugene Zhulenev via Phabricator via cfe-commits
ezhulenev accepted this revision. ezhulenev added inline comments. Comment at: mlir/lib/Dialect/Async/Transforms/AsyncToAsyncRuntime.cpp:201 + StringAttr::get(ctx, "0")})})); + CoroMachinery machinery; nit: builder has an AP

[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] 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] 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

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] D115790: [Coroutines] Set presplit attribute in Clang

2021-12-17 Thread Eugene Zhulenev via Phabricator via cfe-commits
ezhulenev added a subscriber: mehdi_amini. ezhulenev added a comment. 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/AsyncToAsyncRuntime.cpp#L126 This is the point when coro

[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] 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