summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/PHIElimination.cpp
diff options
context:
space:
mode:
authorCameron Zwarich <zwarich@apple.com>2013-02-20 06:46:32 +0000
committerCameron Zwarich <zwarich@apple.com>2013-02-20 06:46:32 +0000
commit68fbc4f64283372ecaae41e52bccfaf7d4240241 (patch)
tree3fb74b3139762294259226e1b5346f373504a7d9 /llvm/lib/CodeGen/PHIElimination.cpp
parent37ca2e81d84d2008c5b509a38078145ad5b05285 (diff)
downloadbcm5719-llvm-68fbc4f64283372ecaae41e52bccfaf7d4240241.tar.gz
bcm5719-llvm-68fbc4f64283372ecaae41e52bccfaf7d4240241.zip
Avoid recomputing an inserted instruction's SlotIndex.
llvm-svn: 175597
Diffstat (limited to 'llvm/lib/CodeGen/PHIElimination.cpp')
-rw-r--r--llvm/lib/CodeGen/PHIElimination.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/PHIElimination.cpp b/llvm/lib/CodeGen/PHIElimination.cpp
index 37e2ee1fae1..061c385765c 100644
--- a/llvm/lib/CodeGen/PHIElimination.cpp
+++ b/llvm/lib/CodeGen/PHIElimination.cpp
@@ -306,10 +306,9 @@ void PHIElimination::LowerPHINode(MachineBasicBlock &MBB,
// Update LiveIntervals for the new copy or implicit def.
if (LIS) {
MachineInstr *NewInstr = prior(AfterPHIsIt);
- LIS->InsertMachineInstrInMaps(NewInstr);
+ SlotIndex DestCopyIndex = LIS->InsertMachineInstrInMaps(NewInstr);
SlotIndex MBBStartIndex = LIS->getMBBStartIdx(&MBB);
- SlotIndex DestCopyIndex = LIS->getInstructionIndex(NewInstr);
if (IncomingReg) {
// Add the region from the beginning of MBB to the copy instruction to
// IncomingReg's live interval.
OpenPOWER on IntegriCloud