From f9ea88546fc1e0ce85de0fe7af899c27d461bcae Mon Sep 17 00:00:00 2001 From: Mark Lacey Date: Wed, 14 Aug 2013 23:50:04 +0000 Subject: Track new virtual registers by register number. Track new virtual registers by register number, rather than by the live interval created for them. This is the first step in separating the creation of new virtual registers and new live intervals. Eventually live intervals will be created and populated on demand after the virtual registers have been created and used in instructions. llvm-svn: 188434 --- llvm/lib/CodeGen/LiveRangeEdit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/LiveRangeEdit.cpp') diff --git a/llvm/lib/CodeGen/LiveRangeEdit.cpp b/llvm/lib/CodeGen/LiveRangeEdit.cpp index b35e25b8618..4e6c4c705d4 100644 --- a/llvm/lib/CodeGen/LiveRangeEdit.cpp +++ b/llvm/lib/CodeGen/LiveRangeEdit.cpp @@ -37,7 +37,7 @@ LiveInterval &LiveRangeEdit::createFrom(unsigned OldReg) { VRM->setIsSplitFromReg(VReg, VRM->getOriginal(OldReg)); } LiveInterval &LI = LIS.getOrCreateInterval(VReg); - NewRegs.push_back(&LI); + NewRegs.push_back(VReg); return LI; } @@ -392,8 +392,8 @@ LiveRangeEdit::calculateRegClassAndHint(MachineFunction &MF, const MachineLoopInfo &Loops, const MachineBlockFrequencyInfo &MBFI) { VirtRegAuxInfo VRAI(MF, LIS, Loops, MBFI); - for (iterator I = begin(), E = end(); I != E; ++I) { - LiveInterval &LI = **I; + for (unsigned I = 0, Size = size(); I < Size; ++I) { + LiveInterval &LI = LIS.getInterval(get(I)); if (MRI.recomputeRegClass(LI.reg, MF.getTarget())) DEBUG(dbgs() << "Inflated " << PrintReg(LI.reg) << " to " << MRI.getRegClass(LI.reg)->getName() << '\n'); -- cgit v1.2.3