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

Xun Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 19 11:30:01 PDT 2021


lxfind added a comment.

In D100282#2699171 <https://reviews.llvm.org/D100282#2699171>, @rjmccall wrote:

> MLIR is an in-tree project that can be updated.

Sure, but I think there are some important differences.
As far as I understand, in MLIR, unlike in C++/Swift frontend where a coroutine function body is represented by an explicit AST type, there is no concept for coroutine functions. Instead functions just contain async dialects. So for MLIR to properly annotate coroutine functions, it will need to look for either those dialects or these intrinsics after IRGen in order to do so, which is pretty much the same thing that we were doing in CoroEarly to annotate coroutine functions. The complexity introduced by duplicating this to all frontends, especially in MLIR where we need to do the same thing as we were doing in CoroEarly, seems to out-weight the benefits on conceptual clarity.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100282



More information about the cfe-commits mailing list