From 9ebbe25034d2247609b095564954bd84fa12123d Mon Sep 17 00:00:00 2001 From: Jay Foad Date: Thu, 5 May 2022 10:35:20 +0100 Subject: [PATCH] RegAllocGreedy: Common up part of the priority calculation. NFC. --- llvm/lib/CodeGen/RegAllocGreedy.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp index a6fc9b1..31721da 100644 --- a/llvm/lib/CodeGen/RegAllocGreedy.cpp +++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp @@ -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); -- 2.7.4