forked from OSchip/llvm-project
Do not move DBG_VALUE in middle of PHI nodes.
llvm-svn: 132161
This commit is contained in:
parent
f5801f8d11
commit
252f0079a9
|
@ -557,6 +557,9 @@ 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();
|
||||
if (isa<PHINode>(VI))
|
||||
DVI->insertBefore(VI->getParent()->getFirstNonPHI());
|
||||
else
|
||||
DVI->insertAfter(VI);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue