@@ -266,7 +266,7 @@ void StackSlotColoring::InitializeSlots() {
266266 for (auto *I : Intervals) {
267267 LiveInterval &li = I->second ;
268268 LLVM_DEBUG (li.dump ());
269- int FI = Register::stackSlot2Index ( li.reg ());
269+ int FI = li.reg (). stackSlotIndex ( );
270270 if (MFI->isDeadObjectIndex (FI))
271271 continue ;
272272
@@ -300,7 +300,7 @@ void StackSlotColoring::InitializeSlots() {
300300int StackSlotColoring::ColorSlot (LiveInterval *li) {
301301 int Color = -1 ;
302302 bool Share = false ;
303- int FI = Register::stackSlot2Index ( li->reg ());
303+ int FI = li->reg (). stackSlotIndex ( );
304304 uint8_t StackID = MFI->getStackID (FI);
305305
306306 if (!DisableSharing) {
@@ -361,7 +361,7 @@ bool StackSlotColoring::ColorSlots(MachineFunction &MF) {
361361 LLVM_DEBUG (dbgs () << " Color spill slot intervals:\n " );
362362 bool Changed = false ;
363363 for (LiveInterval *li : SSIntervals) {
364- int SS = Register::stackSlot2Index ( li->reg ());
364+ int SS = li->reg (). stackSlotIndex ( );
365365 int NewSS = ColorSlot (li);
366366 assert (NewSS >= 0 && " Stack coloring failed?" );
367367 SlotMapping[SS] = NewSS;
@@ -373,7 +373,7 @@ bool StackSlotColoring::ColorSlots(MachineFunction &MF) {
373373
374374 LLVM_DEBUG (dbgs () << " \n Spill slots after coloring:\n " );
375375 for (LiveInterval *li : SSIntervals) {
376- int SS = Register::stackSlot2Index ( li->reg ());
376+ int SS = li->reg (). stackSlotIndex ( );
377377 li->setWeight (SlotWeights[SS]);
378378 }
379379 // Sort them by new weight.
0 commit comments