@@ -266,7 +266,7 @@ void StackSlotColoring::InitializeSlots() {
266
266
for (auto *I : Intervals) {
267
267
LiveInterval &li = I->second ;
268
268
LLVM_DEBUG (li.dump ());
269
- int FI = Register::stackSlot2Index ( li.reg ());
269
+ int FI = li.reg (). stackSlotIndex ( );
270
270
if (MFI->isDeadObjectIndex (FI))
271
271
continue ;
272
272
@@ -300,7 +300,7 @@ void StackSlotColoring::InitializeSlots() {
300
300
int StackSlotColoring::ColorSlot (LiveInterval *li) {
301
301
int Color = -1 ;
302
302
bool Share = false ;
303
- int FI = Register::stackSlot2Index ( li->reg ());
303
+ int FI = li->reg (). stackSlotIndex ( );
304
304
uint8_t StackID = MFI->getStackID (FI);
305
305
306
306
if (!DisableSharing) {
@@ -361,7 +361,7 @@ bool StackSlotColoring::ColorSlots(MachineFunction &MF) {
361
361
LLVM_DEBUG (dbgs () << " Color spill slot intervals:\n " );
362
362
bool Changed = false ;
363
363
for (LiveInterval *li : SSIntervals) {
364
- int SS = Register::stackSlot2Index ( li->reg ());
364
+ int SS = li->reg (). stackSlotIndex ( );
365
365
int NewSS = ColorSlot (li);
366
366
assert (NewSS >= 0 && " Stack coloring failed?" );
367
367
SlotMapping[SS] = NewSS;
@@ -373,7 +373,7 @@ bool StackSlotColoring::ColorSlots(MachineFunction &MF) {
373
373
374
374
LLVM_DEBUG (dbgs () << " \n Spill slots after coloring:\n " );
375
375
for (LiveInterval *li : SSIntervals) {
376
- int SS = Register::stackSlot2Index ( li->reg ());
376
+ int SS = li->reg (). stackSlotIndex ( );
377
377
li->setWeight (SlotWeights[SS]);
378
378
}
379
379
// Sort them by new weight.
0 commit comments