[llvm] [DSE] Mark promise of pre-split coroutine visible to caller (PR #133918)

via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 8 22:55:31 PDT 2025


================
@@ -987,9 +990,24 @@ struct DSEState {
     // Collect blocks with throwing instructions not modeled in MemorySSA and
     // alloc-like objects.
     unsigned PO = 0;
+    bool FoundPromise = !F.isPresplitCoroutine();
     for (BasicBlock *BB : post_order(&F)) {
       PostOrderNumbers[BB] = PO++;
       for (Instruction &I : *BB) {
+        auto *II = dyn_cast<IntrinsicInst>(&I);
+        if (!FoundPromise && II != nullptr) {
----------------
NewSigma wrote:

Done

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


More information about the llvm-commits mailing list