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/RegAllocPBQP.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/RegAllocPBQP.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/RegAllocPBQP.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/RegAllocPBQP.cpp b/llvm/lib/CodeGen/RegAllocPBQP.cpp index 81ecca1f2e0..7786ecdf374 100644 --- a/llvm/lib/CodeGen/RegAllocPBQP.cpp +++ b/llvm/lib/CodeGen/RegAllocPBQP.cpp @@ -491,7 +491,7 @@ bool RegAllocPBQP::mapPBQPToRegAlloc(const PBQPRAProblem &problem, vrm->assignVirt2Phys(vreg, preg); } else if (problem.isSpillOption(vreg, alloc)) { vregsToAlloc.erase(vreg); - SmallVector<LiveInterval*, 8> newSpills; + SmallVector<unsigned, 8> newSpills; LiveRangeEdit LRE(&lis->getInterval(vreg), newSpills, *mf, *lis, vrm); spiller->spill(LRE); @@ -502,9 +502,10 @@ bool RegAllocPBQP::mapPBQPToRegAlloc(const PBQPRAProblem &problem, // allocate. for (LiveRangeEdit::iterator itr = LRE.begin(), end = LRE.end(); itr != end; ++itr) { - assert(!(*itr)->empty() && "Empty spill range."); - DEBUG(dbgs() << PrintReg((*itr)->reg, tri) << " "); - vregsToAlloc.insert((*itr)->reg); + LiveInterval &li = lis->getInterval(*itr); + assert(!li.empty() && "Empty spill range."); + DEBUG(dbgs() << PrintReg(li.reg, tri) << " "); + vregsToAlloc.insert(li.reg); } DEBUG(dbgs() << ")\n"); |

