[PATCH] D105066: [Coroutines] Remove CoroElide from O0 pipeline

2021-06-28 Thread Xun Li via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG31eb696fc4cd: [Coroutines] Remove CoroElide from O0 pipeline (authored by lxfind). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105066/new/ https://reviews

[PATCH] D105066: [Coroutines] Remove CoroElide from O0 pipeline

2021-06-28 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. > That's a separate topic though. Let's agree on this diff first and then I can > explain more about the always_inline issue. Yeah, maybe we should discuss it on the llvm-dev thread. R

[PATCH] D105066: [Coroutines] Remove CoroElide from O0 pipeline

2021-06-28 Thread Xun Li via Phabricator via cfe-commits
lxfind added a comment. > Yeah, but it may be inlined after splitting, which could trigger coro elide. In O0, there is no inliner pass (after CoroSplit), so inlining should never happen. >> in fact, we should make it illegal to mark a coroutine "always_inline", >> because there is no guarante

[PATCH] D105066: [Coroutines] Remove CoroElide from O0 pipeline

2021-06-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. In D105066#2845978 , @lxfind wrote: > Coroutine functions cannot be inlined before splitting, even if it's marked > "always_inline" Yeah, but it may be inlined after splitting, which could trigger coro elide. > in fact, we s

[PATCH] D105066: [Coroutines] Remove CoroElide from O0 pipeline

2021-06-28 Thread Xun Li via Phabricator via cfe-commits
lxfind added a comment. In D105066#2845958 , @ChuanqiXu wrote: > On O0, it is possible to inline if the user marked the function with > `always_inline`. > Since CoroElide is kind of optimization, it should be OK to skip in O0. > Out of curiosity, what's

[PATCH] D105066: [Coroutines] Remove CoroElide from O0 pipeline

2021-06-28 Thread Chuanqi Xu via Phabricator via cfe-commits
ChuanqiXu added a comment. On O0, it is possible to inline if the user marked the function with `always_inline`. Since CoroElide is kind of optimization, it should be OK to skip in O0. Out of curiosity, what's the reason that you want to remove it? Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D105066: [Coroutines] Remove CoroElide from O0 pipeline

2021-06-28 Thread Xun Li via Phabricator via cfe-commits
lxfind updated this revision to Diff 355073. lxfind added a comment. update tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105066/new/ https://reviews.llvm.org/D105066 Files: clang/test/CodeGenCoroutines/coro-newpm-pipeline.cpp llvm/lib/P

[PATCH] D105066: [Coroutines] Remove CoroElide from O0 pipeline

2021-06-28 Thread Xun Li via Phabricator via cfe-commits
lxfind created this revision. lxfind added reviewers: ChuanqiXu, rjmccall. Herald added subscribers: hoy, modimo, wenlei, hiraditya. lxfind requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. CoroElide pass works only when a p