diff options
| author | Mark Lacey <mark.lacey@apple.com> | 2013-08-14 23:50:04 +0000 |
|---|---|---|
| committer | Mark Lacey <mark.lacey@apple.com> | 2013-08-14 23:50:04 +0000 |
| commit | f9ea88546fc1e0ce85de0fe7af899c27d461bcae (patch) | |
| tree | 4ba2ecb51bf517d98208475bb8437a570448e546 /llvm/lib/CodeGen/LiveRangeEdit.cpp | |
| parent | 71c080f6252f0364eb41170dcbcc277ae4311857 (diff) | |
| download | bcm5719-llvm-f9ea88546fc1e0ce85de0fe7af899c27d461bcae.tar.gz bcm5719-llvm-f9ea88546fc1e0ce85de0fe7af899c27d461bcae.zip | |
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
Diffstat (limited to 'llvm/lib/CodeGen/LiveRangeEdit.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/LiveRangeEdit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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'); |

