From: Cameron Zwarich Date: Wed, 20 Feb 2013 06:46:32 +0000 (+0000) Subject: Avoid recomputing an inserted instruction's SlotIndex. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2650a82cc4166237f698e3bbc315739e43180431;p=oota-llvm.git Avoid recomputing an inserted instruction's SlotIndex. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175597 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/PHIElimination.cpp b/lib/CodeGen/PHIElimination.cpp index 37e2ee1fae1..061c385765c 100644 --- a/lib/CodeGen/PHIElimination.cpp +++ b/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.