aboutsummaryrefslogtreecommitdiff
path: root/llvm/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
commit0511055276e36fa23421495cb790b17496909dfe (patch)
tree0d7a15cf237aaa988c6f427d2c8a3eda1a3b75bf /llvm/lib/CodeGen/PHIElimination.cpp
parentbe45b5e9484421c4620bd1e42f8cbf0b9bb76b1e (diff)
downloadllvm-0511055276e36fa23421495cb790b17496909dfe.zip
llvm-0511055276e36fa23421495cb790b17496909dfe.tar.gz
llvm-0511055276e36fa23421495cb790b17496909dfe.tar.bz2
Add an assertion, update DefInst even though no one uses it (dangling pointers
don't help anyone) llvm-svn: 25081
Diffstat (limited to 'llvm/lib/CodeGen/PHIElimination.cpp')
-rw-r--r--llvm/lib/CodeGen/PHIElimination.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp
index 91805a9..8441e49 100644
--- a/llvm/lib/CodeGen/PHIElimination.cpp
+++ b/llvm/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