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

Xun Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 28 19:19:21 PDT 2021


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 guarantee that a coroutine can be fully inlined, GCC does that
>
> To my understanding, it looks like that we shouldn't inline it since we couldn't inline all parts of the function. Is this what you want to say?
> I think it may be a problem that we can't inline the full coroutine. But it's not the reason to forbid it.

That's a separate topic though. Let's agree on this diff first and then I can explain more about the always_inline issue.

> ---
>
> Coro Elide is not defined in the standard (although it comes up in the proposal). So it should be a compiler optimization. In this way, it should be OK to remove it in O0.




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105066/new/

https://reviews.llvm.org/D105066



More information about the cfe-commits mailing list