@@ -1225,12 +1225,11 @@ MCRegister RAGreedy::tryRegionSplit(const LiveInterval &VirtReg,
12251225 return doRegionSplit (VirtReg, BestCand, HasCompact, NewVRegs);
12261226}
12271227
1228- unsigned
1229- RAGreedy::calculateRegionSplitCostAroundReg (MCPhysReg PhysReg,
1230- AllocationOrder &Order,
1231- BlockFrequency &BestCost,
1232- unsigned &NumCands,
1233- unsigned &BestCand) {
1228+ unsigned RAGreedy::calculateRegionSplitCostAroundReg (MCRegister PhysReg,
1229+ AllocationOrder &Order,
1230+ BlockFrequency &BestCost,
1231+ unsigned &NumCands,
1232+ unsigned &BestCand) {
12341233 // Discard bad candidates before we run out of interference cache cursors.
12351234 // This will only affect register classes with a lot of registers (>32).
12361235 if (NumCands == IntfCache.getMaxCursors ()) {
@@ -1309,7 +1308,7 @@ unsigned RAGreedy::calculateRegionSplitCost(const LiveInterval &VirtReg,
13091308 unsigned &NumCands,
13101309 bool IgnoreCSR) {
13111310 unsigned BestCand = NoCand;
1312- for (MCPhysReg PhysReg : Order) {
1311+ for (MCRegister PhysReg : Order) {
13131312 assert (PhysReg);
13141313 if (IgnoreCSR && EvictAdvisor->isUnusedCalleeSavedReg (PhysReg))
13151314 continue ;
@@ -1363,7 +1362,7 @@ MCRegister RAGreedy::doRegionSplit(const LiveInterval &VirtReg,
13631362
13641363// VirtReg has a physical Hint, this function tries to split VirtReg around
13651364// Hint if we can place new COPY instructions in cold blocks.
1366- bool RAGreedy::trySplitAroundHintReg (MCPhysReg Hint,
1365+ bool RAGreedy::trySplitAroundHintReg (MCRegister Hint,
13671366 const LiveInterval &VirtReg,
13681367 SmallVectorImpl<Register> &NewVRegs,
13691368 AllocationOrder &Order) {
@@ -1427,8 +1426,7 @@ bool RAGreedy::trySplitAroundHintReg(MCPhysReg Hint,
14271426
14281427 MCRegister OtherPhysReg =
14291428 OtherReg.isPhysical () ? OtherReg.asMCReg () : VRM->getPhys (OtherReg);
1430- MCRegister ThisHint =
1431- SubReg ? TRI->getSubReg (Hint, SubReg) : MCRegister (Hint);
1429+ MCRegister ThisHint = SubReg ? TRI->getSubReg (Hint, SubReg) : Hint;
14321430 if (OtherPhysReg == ThisHint)
14331431 Cost += MBFI->getBlockFreq (Instr.getParent ());
14341432 }
@@ -1822,7 +1820,7 @@ MCRegister RAGreedy::tryLocalSplit(const LiveInterval &VirtReg,
18221820 (1 .0f / MBFI->getEntryFreq ().getFrequency ());
18231821 SmallVector<float , 8 > GapWeight;
18241822
1825- for (MCPhysReg PhysReg : Order) {
1823+ for (MCRegister PhysReg : Order) {
18261824 assert (PhysReg);
18271825 // Keep track of the largest spill weight that would need to be evicted in
18281826 // order to make use of PhysReg between UseSlots[I] and UseSlots[I + 1].
0 commit comments