[clang] [CIR] Implement FlattenCFG for coroutine AwaitOp, CoroBodyOp, and CoReturnOp (PR #203802)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 14 16:49:33 PDT 2026
================
@@ -4365,6 +4341,7 @@ def CIR_FuncOp : CIR_Op<"func", [
TypeAttrOf<CIR_FuncType>:$function_type,
UnitAttr:$builtin,
UnitAttr:$coroutine,
+ UnitAttr:$flattened_coroutine,
----------------
Andres-Salamanca wrote:
Looking at what we already have for `FuncOp`, it already has an optional attr:
```tablegen
OptionalAttr<CIR_FuncInfoAttr>:$func_info
```
```tablegen
def CIR_FuncInfoAttr : AnyAttrOf<[
CIR_CXXCtorAttr,
CIR_CXXDtorAttr,
CIR_CXXAssignAttr,
CIR_FuncIdentityAttr
], "function information attribute">;
```
Maybe we could add the attribute there? Or a new optional attr just for coroutines?
Would it be ok to do that in a follow-up PR though? This PR is already quite big, and the change would mean updating the verifier and tests as well. @xlauko.
https://github.com/llvm/llvm-project/pull/203802
More information about the cfe-commits
mailing list