From 349cf349987a65be89078913e34126898bcdd138 Mon Sep 17 00:00:00 2001 From: Cameron Zwarich Date: Wed, 20 Feb 2013 06:46:41 +0000 Subject: Add SlotIndexes::repairIndexesInRange(), which repairs SlotIndexes after adding and removing instructions. The implementation seems more complicated than it needs to be, but I couldn't find something simpler that dealt with all of the corner cases. Also add a call to repairIndexesInRange() from repairIntervalsInRange(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175601 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/LiveIntervalAnalysis.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/CodeGen/LiveIntervalAnalysis.cpp') diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 0978d7342e..7b1eed2a34 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -1044,6 +1044,8 @@ LiveIntervals::repairIntervalsInRange(MachineBasicBlock *MBB, else startIdx = getInstructionIndex(prior(Begin)).getRegSlot(); + Indexes->repairIndexesInRange(MBB, Begin, End); + for (unsigned i = 0, e = OrigRegs.size(); i != e; ++i) { unsigned Reg = OrigRegs[i]; if (!TargetRegisterInfo::isVirtualRegister(Reg)) -- cgit v1.2.3