aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/PHIElimination.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-03-18 09:02:31 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-03-18 09:02:31 +0000
commite951cd1647834c1c6877ca9a699ef6b00a2d0ce9 (patch)
treee899f3d6c18fdab15135930d85a7159d38424800 /lib/CodeGen/PHIElimination.cpp
parent7e79e396a4ee6f96346881e090c943d7207d8abe (diff)
Keep UsedBlocks info accurate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35140 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PHIElimination.cpp')
-rw-r--r--lib/CodeGen/PHIElimination.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp
index 6a9f428208..734a06fa9d 100644
--- a/lib/CodeGen/PHIElimination.cpp
+++ b/lib/CodeGen/PHIElimination.cpp
@@ -160,6 +160,8 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
// Realize that the destination register is defined by the PHI copy now, not
// the PHI itself.
LV->getVarInfo(DestReg).DefInst = PHICopy;
+
+ LV->getVarInfo(IncomingReg).UsedBlocks[MBB.getNumber()] = true;
}
// Adjust the VRegPHIUseCount map to account for the removal of this PHI
@@ -210,6 +212,7 @@ void PNE::LowerAtomicPHINode(MachineBasicBlock &MBB,
// instruction kills the incoming value.
//
LiveVariables::VarInfo &InRegVI = LV->getVarInfo(SrcReg);
+ InRegVI.UsedBlocks[opBlock.getNumber()] = true;
// Loop over all of the successors of the basic block, checking to see
// if the value is either live in the block, or if it is killed in the