Avoid recomputing an inserted instruction's SlotIndex.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Cameron Zwarich 2013-02-20 06:46:32 +00:00
parent 4f659eccaf
commit 2650a82cc4

View File

@ -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.