@@ -313,26 +313,27 @@ collectVirtualRegUses(SmallVectorImpl<VRegMaskOrUnit> &VRegMaskOrUnits,
313313// / Mostly copy/paste from CodeGen/RegisterPressure.cpp
314314static LaneBitmask getLanesWithProperty (
315315 const LiveIntervals &LIS, const MachineRegisterInfo &MRI,
316- bool TrackLaneMasks, Register RegUnit , SlotIndex Pos,
316+ bool TrackLaneMasks, VirtRegOrUnit VRegOrUnit , SlotIndex Pos,
317317 LaneBitmask SafeDefault,
318318 function_ref<bool (const LiveRange &LR, SlotIndex Pos)> Property) {
319- if (RegUnit. isVirtual ()) {
320- const LiveInterval &LI = LIS.getInterval (RegUnit );
319+ if (VRegOrUnit. isVirtualReg ()) {
320+ const LiveInterval &LI = LIS.getInterval (VRegOrUnit. asVirtualReg () );
321321 LaneBitmask Result;
322322 if (TrackLaneMasks && LI.hasSubRanges ()) {
323323 for (const LiveInterval::SubRange &SR : LI.subranges ()) {
324324 if (Property (SR, Pos))
325325 Result |= SR.LaneMask ;
326326 }
327327 } else if (Property (LI, Pos)) {
328- Result = TrackLaneMasks ? MRI.getMaxLaneMaskForVReg (RegUnit)
329- : LaneBitmask::getAll ();
328+ Result = TrackLaneMasks
329+ ? MRI.getMaxLaneMaskForVReg (VRegOrUnit.asVirtualReg ())
330+ : LaneBitmask::getAll ();
330331 }
331332
332333 return Result;
333334 }
334335
335- const LiveRange *LR = LIS.getCachedRegUnit (RegUnit );
336+ const LiveRange *LR = LIS.getCachedRegUnit (VRegOrUnit. asMCRegUnit () );
336337 if (LR == nullptr )
337338 return SafeDefault;
338339 return Property (*LR, Pos) ? LaneBitmask::getAll () : LaneBitmask::getNone ();
@@ -503,10 +504,10 @@ void GCNRPTracker::reset(const MachineRegisterInfo &MRI_,
503504}
504505
505506// / Mostly copy/paste from CodeGen/RegisterPressure.cpp
506- LaneBitmask GCNRPTracker::getLastUsedLanes (Register RegUnit ,
507+ LaneBitmask GCNRPTracker::getLastUsedLanes (VirtRegOrUnit VRegOrUnit ,
507508 SlotIndex Pos) const {
508509 return getLanesWithProperty (
509- LIS, *MRI, true , RegUnit , Pos.getBaseIndex (), LaneBitmask::getNone (),
510+ LIS, *MRI, true , VRegOrUnit , Pos.getBaseIndex (), LaneBitmask::getNone (),
510511 [](const LiveRange &LR, SlotIndex Pos) {
511512 const LiveRange::Segment *S = LR.getSegmentContaining (Pos);
512513 return S != nullptr && S->end == Pos.getRegSlot ();
@@ -752,7 +753,7 @@ GCNDownwardRPTracker::bumpDownwardPressure(const MachineInstr *MI,
752753 if (!Use.VRegOrUnit .isVirtualReg ())
753754 continue ;
754755 Register Reg = Use.VRegOrUnit .asVirtualReg ();
755- LaneBitmask LastUseMask = getLastUsedLanes (Reg , SlotIdx);
756+ LaneBitmask LastUseMask = getLastUsedLanes (Use. VRegOrUnit , SlotIdx);
756757 if (LastUseMask.none ())
757758 continue ;
758759 // The LastUseMask is queried from the liveness information of instruction
0 commit comments