[clang] [CIR] Implement FlattenCFG for coroutine AwaitOp, CoroBodyOp, and CoReturnOp (PR #203802)

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 19 13:48:40 PDT 2026


================
@@ -1083,7 +1084,8 @@ class CIRCleanupScopeOpFlattening
         } else if (isa<cir::LoopOpInterface>(nestedOp)) {
           collectExitsInLoop(nestedOp);
           return mlir::WalkResult::skip();
-        } else if (isa<cir::ContinueOp>(nestedOp) ||
+        } else if (isa<cir::ContinueOp, cir::CoReturnOp, cir::CoroCleanupOp>(
----------------
andykaylor wrote:

As above, `isGotoThatExitsCleanup` can be hoisted into this condition.

https://github.com/llvm/llvm-project/pull/203802


More information about the cfe-commits mailing list