Skip to content

Commit 9ebbe25

Browse files
committed
RegAllocGreedy: Common up part of the priority calculation. NFC.
1 parent 9678936 commit 9ebbe25

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/CodeGen/RegAllocGreedy.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,15 +319,14 @@ void RAGreedy::enqueue(PQueue &CurQueue, const LiveInterval *LI) {
319319
// large blocks on targets with many physical registers.
320320
Prio = Indexes->getZeroIndex().getInstrDistance(LI->endIndex());
321321
}
322-
Prio |= RC.AllocationPriority << 24;
323322
} else {
324323
// Allocate global and split ranges in long->short order. Long ranges that
325324
// don't fit should be spilled (or split) ASAP so they don't create
326325
// interference. Mark a bit to prioritize global above local ranges.
327326
Prio = (1u << 29) + Size;
328-
329-
Prio |= RC.AllocationPriority << 24;
330327
}
328+
Prio |= RC.AllocationPriority << 24;
329+
331330
// Mark a higher bit to prioritize global and local above RS_Split.
332331
Prio |= (1u << 31);
333332

0 commit comments

Comments
 (0)