Skip to content

Commit e8f4d10

Browse files
apollowwfelipepiovezan
authored andcommitted
[Coroutines][NFC] Only look for Alloca or Load when finding dbg.declare for temp spills
We only look for Alloca or Load in this case, so making it explicit. Reviewed By: ChuanqiXu, MatzeB Differential Revision: https://reviews.llvm.org/D157423 (cherry picked from commit f55e57c)
1 parent e47653c commit e8f4d10

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Transforms/Coroutines/CoroFrame.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1863,6 +1863,8 @@ static void insertSpills(const FrameDataInfo &FrameData, coro::Shape &Shape) {
18631863
if (LdInst->getPointerOperandType() != LdInst->getType())
18641864
break;
18651865
CurDef = LdInst->getPointerOperand();
1866+
if (!isa<AllocaInst, LoadInst>(CurDef))
1867+
break;
18661868
DIs = FindDbgDeclareUses(CurDef);
18671869
}
18681870
}

0 commit comments

Comments
 (0)