Move PBQP off allocation_order_begin. No functional change intended.

I think PBQP could use RegisterClassInfo, but it didn't fit neatly with
the external interfaces that PBQP uses, so I'll leave that to Lang.

llvm-svn: 133186
This commit is contained in:
Jakob Stoklund Olesen 2011-06-16 20:37:45 +00:00
parent 12a43bdde5
commit 08322b7dc3
1 changed files with 4 additions and 5 deletions

View File

@ -222,10 +222,9 @@ std::auto_ptr<PBQPRAProblem> PBQPBuilder::build(MachineFunction *mf,
// Compute an initial allowed set for the current vreg. // Compute an initial allowed set for the current vreg.
typedef std::vector<unsigned> VRAllowed; typedef std::vector<unsigned> VRAllowed;
VRAllowed vrAllowed; VRAllowed vrAllowed;
for (TargetRegisterClass::iterator aoItr = trc->allocation_order_begin(*mf), ArrayRef<unsigned> rawOrder = trc->getRawAllocationOrder(*mf);
aoEnd = trc->allocation_order_end(*mf); for (unsigned i = 0; i != rawOrder.size(); ++i) {
aoItr != aoEnd; ++aoItr) { unsigned preg = rawOrder[i];
unsigned preg = *aoItr;
if (!reservedRegs.test(preg)) { if (!reservedRegs.test(preg)) {
vrAllowed.push_back(preg); vrAllowed.push_back(preg);
} }
@ -581,7 +580,7 @@ void RegAllocPBQP::finalizeAlloc() const {
if (physReg == 0) { if (physReg == 0) {
const TargetRegisterClass *liRC = mri->getRegClass(li->reg); const TargetRegisterClass *liRC = mri->getRegClass(li->reg);
physReg = *liRC->allocation_order_begin(*mf); physReg = liRC->getRawAllocationOrder(*mf).front();
} }
vrm->assignVirt2Phys(li->reg, physReg); vrm->assignVirt2Phys(li->reg, physReg);