Skip to content

Commit

Permalink
[Coroutines][NFC] Only look for Alloca or Load when finding dbg.decla…
Browse files Browse the repository at this point in the history
…re 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
  • Loading branch information
apolloww committed Aug 9, 2023
1 parent 876a480 commit f55e57c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/lib/Transforms/Coroutines/CoroFrame.cpp
Expand Up @@ -1865,6 +1865,8 @@ static void insertSpills(const FrameDataInfo &FrameData, coro::Shape &Shape) {
if (LdInst->getPointerOperandType() != LdInst->getType())
break;
CurDef = LdInst->getPointerOperand();
if (!isa<AllocaInst, LoadInst>(CurDef))
break;
DIs = FindDbgDeclareUses(CurDef);
}
}
Expand Down

0 comments on commit f55e57c

Please sign in to comment.