RegAllocGreedy: Common up part of the priority calculation. NFC.

This commit is contained in:
Jay Foad 2022-05-05 10:35:20 +01:00
parent 9678936f18
commit 9ebbe25034
1 changed files with 2 additions and 3 deletions

View File

@ -319,15 +319,14 @@ void RAGreedy::enqueue(PQueue &CurQueue, const LiveInterval *LI) {
// large blocks on targets with many physical registers.
Prio = Indexes->getZeroIndex().getInstrDistance(LI->endIndex());
}
Prio |= RC.AllocationPriority << 24;
} else {
// Allocate global and split ranges in long->short order. Long ranges that
// don't fit should be spilled (or split) ASAP so they don't create
// interference. Mark a bit to prioritize global above local ranges.
Prio = (1u << 29) + Size;
Prio |= RC.AllocationPriority << 24;
}
Prio |= RC.AllocationPriority << 24;
// Mark a higher bit to prioritize global and local above RS_Split.
Prio |= (1u << 31);