mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133186 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7cc2b07437
commit
714c0eb811
@ -222,10 +222,9 @@ std::auto_ptr<PBQPRAProblem> PBQPBuilder::build(MachineFunction *mf,
|
||||
// Compute an initial allowed set for the current vreg.
|
||||
typedef std::vector<unsigned> VRAllowed;
|
||||
VRAllowed vrAllowed;
|
||||
for (TargetRegisterClass::iterator aoItr = trc->allocation_order_begin(*mf),
|
||||
aoEnd = trc->allocation_order_end(*mf);
|
||||
aoItr != aoEnd; ++aoItr) {
|
||||
unsigned preg = *aoItr;
|
||||
ArrayRef<unsigned> rawOrder = trc->getRawAllocationOrder(*mf);
|
||||
for (unsigned i = 0; i != rawOrder.size(); ++i) {
|
||||
unsigned preg = rawOrder[i];
|
||||
if (!reservedRegs.test(preg)) {
|
||||
vrAllowed.push_back(preg);
|
||||
}
|
||||
@ -581,7 +580,7 @@ void RegAllocPBQP::finalizeAlloc() const {
|
||||
|
||||
if (physReg == 0) {
|
||||
const TargetRegisterClass *liRC = mri->getRegClass(li->reg);
|
||||
physReg = *liRC->allocation_order_begin(*mf);
|
||||
physReg = liRC->getRawAllocationOrder(*mf).front();
|
||||
}
|
||||
|
||||
vrm->assignVirt2Phys(li->reg, physReg);
|
||||
|
Loading…
Reference in New Issue
Block a user