@@ -610,7 +610,7 @@ void AArch64FrameLowering::emitCalleeSavedGPRLocations(
610610 CFIInstBuilder CFIBuilder (MBB, MBBI, MachineInstr::FrameSetup);
611611 for (const auto &Info : CSI) {
612612 unsigned FrameIdx = Info.getFrameIdx ();
613- if (MFI.getStackID (FrameIdx) == TargetStackID::ScalableVector )
613+ if (MFI.isScalableStackID (FrameIdx))
614614 continue ;
615615
616616 assert (!Info.isSpilledToReg () && " Spilling to registers not implemented" );
@@ -643,7 +643,7 @@ void AArch64FrameLowering::emitCalleeSavedSVELocations(
643643 CFIInstBuilder CFIBuilder (MBB, MBBI, MachineInstr::FrameSetup);
644644
645645 for (const auto &Info : CSI) {
646- if (!( MFI.getStackID (Info.getFrameIdx ()) == TargetStackID::ScalableVector ))
646+ if (!MFI.isScalableStackID (Info.getFrameIdx ()))
647647 continue ;
648648
649649 // Not all unwinders may know about SVE registers, so assume the lowest
@@ -710,8 +710,7 @@ static void emitCalleeSavedRestores(MachineBasicBlock &MBB,
710710 CFIInstBuilder CFIBuilder (MBB, MBBI, MachineInstr::FrameDestroy);
711711
712712 for (const auto &Info : CSI) {
713- if (SVE !=
714- (MFI.getStackID (Info.getFrameIdx ()) == TargetStackID::ScalableVector))
713+ if (SVE != MFI.isScalableStackID (Info.getFrameIdx ()))
715714 continue ;
716715
717716 MCRegister Reg = Info.getReg ();
@@ -2693,7 +2692,7 @@ AArch64FrameLowering::getFrameIndexReferenceFromSP(const MachineFunction &MF,
26932692 const auto *AFI = MF.getInfo <AArch64FunctionInfo>();
26942693 bool FPAfterSVECalleeSaves =
26952694 isTargetWindows (MF) && AFI->getSVECalleeSavedStackSize ();
2696- if (MFI.getStackID (FI) == TargetStackID::ScalableVector ) {
2695+ if (MFI.isScalableStackID (FI)) {
26972696 if (FPAfterSVECalleeSaves &&
26982697 -ObjectOffset <= (int64_t )AFI->getSVECalleeSavedStackSize ())
26992698 return StackOffset::getScalable (ObjectOffset);
@@ -2759,7 +2758,7 @@ StackOffset AArch64FrameLowering::resolveFrameIndexReference(
27592758 const auto &MFI = MF.getFrameInfo ();
27602759 int64_t ObjectOffset = MFI.getObjectOffset (FI);
27612760 bool isFixed = MFI.isFixedObjectIndex (FI);
2762- bool isSVE = MFI.getStackID (FI) == TargetStackID::ScalableVector ;
2761+ bool isSVE = MFI.isScalableStackID (FI);
27632762 return resolveFrameOffsetReference (MF, ObjectOffset, isFixed, isSVE, FrameReg,
27642763 PreferFP, ForSimm);
27652764}
@@ -3495,10 +3494,14 @@ bool AArch64FrameLowering::spillCalleeSavedRegisters(
34953494 }
34963495 // Update the StackIDs of the SVE stack slots.
34973496 MachineFrameInfo &MFI = MF.getFrameInfo ();
3498- if (RPI.Type == RegPairInfo::ZPR || RPI. Type == RegPairInfo::PPR ) {
3497+ if (RPI.Type == RegPairInfo::ZPR) {
34993498 MFI.setStackID (FrameIdxReg1, TargetStackID::ScalableVector);
35003499 if (RPI.isPaired ())
35013500 MFI.setStackID (FrameIdxReg2, TargetStackID::ScalableVector);
3501+ } else if (RPI.Type == RegPairInfo::PPR) {
3502+ MFI.setStackID (FrameIdxReg1, TargetStackID::ScalablePredVector);
3503+ if (RPI.isPaired ())
3504+ MFI.setStackID (FrameIdxReg2, TargetStackID::ScalablePredVector);
35023505 }
35033506
35043507 if (X0Scratch != AArch64::NoRegister)
@@ -3713,8 +3716,7 @@ void AArch64FrameLowering::determineStackHazardSlot(
37133716 for (auto &MI : MBB) {
37143717 std::optional<int > FI = getLdStFrameID (MI, MFI);
37153718 if (FI && *FI >= 0 && *FI < (int )FrameObjects.size ()) {
3716- if (MFI.getStackID (*FI) == TargetStackID::ScalableVector ||
3717- AArch64InstrInfo::isFpOrNEON (MI))
3719+ if (MFI.isScalableStackID (*FI) || AArch64InstrInfo::isFpOrNEON (MI))
37183720 FrameObjects[*FI] |= 2 ;
37193721 else
37203722 FrameObjects[*FI] |= 1 ;
@@ -4176,7 +4178,7 @@ static int64_t determineSVEStackObjectOffsets(MachineFrameInfo &MFI,
41764178#ifndef NDEBUG
41774179 // First process all fixed stack objects.
41784180 for (int I = MFI.getObjectIndexBegin (); I != 0 ; ++I)
4179- assert (MFI.getStackID (I) != TargetStackID::ScalableVector &&
4181+ assert (! MFI.isScalableStackID (I) &&
41804182 " SVE vectors should never be passed on the stack by value, only by "
41814183 " reference." );
41824184#endif
@@ -4210,12 +4212,11 @@ static int64_t determineSVEStackObjectOffsets(MachineFrameInfo &MFI,
42104212 int StackProtectorFI = -1 ;
42114213 if (MFI.hasStackProtectorIndex ()) {
42124214 StackProtectorFI = MFI.getStackProtectorIndex ();
4213- if (MFI.getStackID (StackProtectorFI) == TargetStackID::ScalableVector )
4215+ if (MFI.isScalableStackID (StackProtectorFI))
42144216 ObjectsToAllocate.push_back (StackProtectorFI);
42154217 }
42164218 for (int I = 0 , E = MFI.getObjectIndexEnd (); I != E; ++I) {
4217- unsigned StackID = MFI.getStackID (I);
4218- if (StackID != TargetStackID::ScalableVector)
4219+ if (!MFI.isScalableStackID (I))
42194220 continue ;
42204221 if (I == StackProtectorFI)
42214222 continue ;
@@ -5230,8 +5231,7 @@ void AArch64FrameLowering::orderFrameObjects(
52305231 if (AFI.hasStackHazardSlotIndex ()) {
52315232 std::optional<int > FI = getLdStFrameID (MI, MFI);
52325233 if (FI && *FI >= 0 && *FI < (int )FrameObjects.size ()) {
5233- if (MFI.getStackID (*FI) == TargetStackID::ScalableVector ||
5234- AArch64InstrInfo::isFpOrNEON (MI))
5234+ if (MFI.isScalableStackID (*FI) || AArch64InstrInfo::isFpOrNEON (MI))
52355235 FrameObjects[*FI].Accesses |= FrameObject::AccessFPR;
52365236 else
52375237 FrameObjects[*FI].Accesses |= FrameObject::AccessGPR;
@@ -5589,7 +5589,7 @@ void AArch64FrameLowering::emitRemarks(
55895589 }
55905590
55915591 unsigned RegTy = StackAccess::AccessType::GPR;
5592- if (MFI.getStackID (FrameIdx) == TargetStackID::ScalableVector ) {
5592+ if (MFI.isScalableStackID (FrameIdx)) {
55935593 // SPILL_PPR_TO_ZPR_SLOT_PSEUDO and FILL_PPR_FROM_ZPR_SLOT_PSEUDO
55945594 // spill/fill the predicate as a data vector (so are an FPR acess).
55955595 if (MI.getOpcode () != AArch64::SPILL_PPR_TO_ZPR_SLOT_PSEUDO &&
0 commit comments