mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
Do not move DBG_VALUE in middle of PHI nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132161 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
97de92c08d
commit
9dd19667fb
@ -557,7 +557,10 @@ bool CodeGenPrepare::OptimizeCallInst(CallInst *CI) {
|
||||
if (DVI->getParent() != VI->getParent() || DT->dominates(DVI, VI)) {
|
||||
DEBUG(dbgs() << "Moving Debug Value before :\n" << *DVI << ' ' << *VI);
|
||||
DVI->removeFromParent();
|
||||
DVI->insertAfter(VI);
|
||||
if (isa<PHINode>(VI))
|
||||
DVI->insertBefore(VI->getParent()->getFirstNonPHI());
|
||||
else
|
||||
DVI->insertAfter(VI);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user