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

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 13 20:15:51 PDT 2021


rjmccall added a comment.

That something is an (unlowered) coroutine is an important semantic property of the function that should be represented more explicitly in IR than just whether it contains a call to an intrinsic in the `llvm.coro.id` family.  Coroutines have somewhat different structural rules from ordinary functions, as is natural for a somewhat different high-level concept.  `noinline` is an independent attribute that should affect whether the ramp function is inlinable after coroutine lowering is complete.

In principle, I would prefer that we use a better attribute than this `coro.presplit` thing — a few years ago, I proposed adding a directly-supported `coroutine` attribute which would take the lowering style as an argument.  So if someone's willing to do to the work to jump to that instead of going through this intermediate stage, then okay, let's do it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100282



More information about the llvm-commits mailing list