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

Chuanqi Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 11 22:55:32 PDT 2021


ChuanqiXu added a comment.

In D100282#2682297 <https://reviews.llvm.org/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 it's really an IR invariant that it's present on all unlowered coroutines.
>
> By the way, it also sets these attributes for other types of coroutines (retcon and async). So the down-side would be then we need to do this for all front-ends (clang and swift).

If it is OK to add these attributes in clang only, and leave other codes handling retcon and async in the Coro-early pass? Since they use special intrinsics, it looks good if we don't edit corresponding part in Coro-early pass.


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