[PATCH] D157423: [Coroutines][NFC]Only look for Alloca or Load when finding dbg.declare for temp spills

Wei Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 8 10:54:41 PDT 2023


weiwang created this revision.
Herald added subscribers: ChuanqiXu, hoy, wenlei, hiraditya.
Herald added a project: All.
weiwang requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D157423

Files:
  llvm/lib/Transforms/Coroutines/CoroFrame.cpp


Index: llvm/lib/Transforms/Coroutines/CoroFrame.cpp
===================================================================
--- llvm/lib/Transforms/Coroutines/CoroFrame.cpp
+++ llvm/lib/Transforms/Coroutines/CoroFrame.cpp
@@ -1863,6 +1863,8 @@
             if (LdInst->getPointerOperandType() != LdInst->getType())
               break;
             CurDef = LdInst->getPointerOperand();
+            if (!(isa<AllocaInst>(CurDef) || isa<LoadInst>(CurDef)))
+              break;
             DIs = FindDbgDeclareUses(CurDef);
           }
         }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D157423.548284.patch
Type: text/x-patch
Size: 547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230808/fb3d8b7e/attachment.bin>


More information about the llvm-commits mailing list