aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/PHIElimination.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-01-04 06:47:48 +0000
committerChris Lattner <sabre@nondot.org>2006-01-04 06:47:48 +0000
commit172c362fefe3d6e762ada119d4084ed4ed31595b (patch)
treee632b2457edc8a305901a4a135f9d80f68e3a09e /lib/CodeGen/PHIElimination.cpp
parentdacceef2666d37eb984c6f5e0a84cdabab8dfffc (diff)
Add an assertion, update DefInst even though no one uses it (dangling pointers
don't help anyone) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25081 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PHIElimination.cpp')
-rw-r--r--lib/CodeGen/PHIElimination.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp
index 91805a93ed..8441e49bbc 100644
--- a/lib/CodeGen/PHIElimination.cpp
+++ b/lib/CodeGen/PHIElimination.cpp
@@ -145,6 +145,10 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
LV->addVirtualRegisterDead(DestReg, PHICopy);
LV->removeVirtualRegistersDead(MPhi);
}
+
+ // Realize that the destination register is defined by the PHI copy now, not
+ // the PHI itself.
+ LV->getVarInfo(DestReg).DefInst = PHICopy;
}
// Adjust the VRegPHIUseCount map to account for the removal of this PHI