@@ -695,7 +695,7 @@ void AArch64FrameLowering::emitCalleeSavedGPRLocations(
695695 CFIInstBuilder CFIBuilder (MBB, MBBI, MachineInstr::FrameSetup);
696696 for (const auto &Info : CSI) {
697697 unsigned FrameIdx = Info.getFrameIdx ();
698- if (MFI.getStackID (FrameIdx) == TargetStackID::ScalableVector )
698+ if (MFI.isScalableStackID (FrameIdx))
699699 continue ;
700700
701701 assert (!Info.isSpilledToReg () && " Spilling to registers not implemented" );
@@ -728,7 +728,7 @@ void AArch64FrameLowering::emitCalleeSavedSVELocations(
728728 }
729729
730730 for (const auto &Info : CSI) {
731- if (MFI.getStackID (Info.getFrameIdx ()) != TargetStackID::ScalableVector )
731+ if (! MFI.isScalableStackID (Info.getFrameIdx ()))
732732 continue ;
733733
734734 // Not all unwinders may know about SVE registers, so assume the lowest
@@ -795,8 +795,7 @@ static void emitCalleeSavedRestores(MachineBasicBlock &MBB,
795795 CFIInstBuilder CFIBuilder (MBB, MBBI, MachineInstr::FrameDestroy);
796796
797797 for (const auto &Info : CSI) {
798- if (SVE !=
799- (MFI.getStackID (Info.getFrameIdx ()) == TargetStackID::ScalableVector))
798+ if (SVE != MFI.isScalableStackID (Info.getFrameIdx ()))
800799 continue ;
801800
802801 MCRegister Reg = Info.getReg ();
@@ -2898,7 +2897,7 @@ AArch64FrameLowering::getFrameIndexReferenceFromSP(const MachineFunction &MF,
28982897 const auto *AFI = MF.getInfo <AArch64FunctionInfo>();
28992898 bool FPAfterSVECalleeSaves =
29002899 isTargetWindows (MF) && AFI->getSVECalleeSavedStackSize ();
2901- if (MFI.getStackID (FI) == TargetStackID::ScalableVector ) {
2900+ if (MFI.isScalableStackID (FI)) {
29022901 if (FPAfterSVECalleeSaves &&
29032902 -ObjectOffset <= (int64_t )AFI->getSVECalleeSavedStackSize ())
29042903 return StackOffset::getScalable (ObjectOffset);
@@ -2964,7 +2963,7 @@ StackOffset AArch64FrameLowering::resolveFrameIndexReference(
29642963 const auto &MFI = MF.getFrameInfo ();
29652964 int64_t ObjectOffset = MFI.getObjectOffset (FI);
29662965 bool isFixed = MFI.isFixedObjectIndex (FI);
2967- bool isSVE = MFI.getStackID (FI) == TargetStackID::ScalableVector ;
2966+ bool isSVE = MFI.isScalableStackID (FI);
29682967 return resolveFrameOffsetReference (MF, ObjectOffset, isFixed, isSVE, FrameReg,
29692968 PreferFP, ForSimm);
29702969}
@@ -3687,10 +3686,14 @@ bool AArch64FrameLowering::spillCalleeSavedRegisters(
36873686 }
36883687 // Update the StackIDs of the SVE stack slots.
36893688 MachineFrameInfo &MFI = MF.getFrameInfo ();
3690- if (RPI.Type == RegPairInfo::ZPR || RPI. Type == RegPairInfo::PPR ) {
3689+ if (RPI.Type == RegPairInfo::ZPR) {
36913690 MFI.setStackID (FrameIdxReg1, TargetStackID::ScalableVector);
36923691 if (RPI.isPaired ())
36933692 MFI.setStackID (FrameIdxReg2, TargetStackID::ScalableVector);
3693+ } else if (RPI.Type == RegPairInfo::PPR) {
3694+ MFI.setStackID (FrameIdxReg1, TargetStackID::ScalablePredVector);
3695+ if (RPI.isPaired ())
3696+ MFI.setStackID (FrameIdxReg2, TargetStackID::ScalablePredVector);
36943697 }
36953698 }
36963699 return true ;
@@ -3898,8 +3901,7 @@ void AArch64FrameLowering::determineStackHazardSlot(
38983901 for (auto &MI : MBB) {
38993902 std::optional<int > FI = getLdStFrameID (MI, MFI);
39003903 if (FI && *FI >= 0 && *FI < (int )FrameObjects.size ()) {
3901- if (MFI.getStackID (*FI) == TargetStackID::ScalableVector ||
3902- AArch64InstrInfo::isFpOrNEON (MI))
3904+ if (MFI.isScalableStackID (*FI) || AArch64InstrInfo::isFpOrNEON (MI))
39033905 FrameObjects[*FI] |= 2 ;
39043906 else
39053907 FrameObjects[*FI] |= 1 ;
@@ -4344,7 +4346,7 @@ static int64_t determineSVEStackObjectOffsets(MachineFrameInfo &MFI,
43444346#ifndef NDEBUG
43454347 // First process all fixed stack objects.
43464348 for (int I = MFI.getObjectIndexBegin (); I != 0 ; ++I)
4347- assert (MFI.getStackID (I) != TargetStackID::ScalableVector &&
4349+ assert (! MFI.isScalableStackID (I) &&
43484350 " SVE vectors should never be passed on the stack by value, only by "
43494351 " reference." );
43504352#endif
@@ -4378,12 +4380,11 @@ static int64_t determineSVEStackObjectOffsets(MachineFrameInfo &MFI,
43784380 int StackProtectorFI = -1 ;
43794381 if (MFI.hasStackProtectorIndex ()) {
43804382 StackProtectorFI = MFI.getStackProtectorIndex ();
4381- if (MFI.getStackID (StackProtectorFI) == TargetStackID::ScalableVector )
4383+ if (MFI.isScalableStackID (StackProtectorFI))
43824384 ObjectsToAllocate.push_back (StackProtectorFI);
43834385 }
43844386 for (int I = 0 , E = MFI.getObjectIndexEnd (); I != E; ++I) {
4385- unsigned StackID = MFI.getStackID (I);
4386- if (StackID != TargetStackID::ScalableVector)
4387+ if (!MFI.isScalableStackID (I))
43874388 continue ;
43884389 if (I == StackProtectorFI)
43894390 continue ;
@@ -5387,8 +5388,7 @@ void AArch64FrameLowering::orderFrameObjects(
53875388 if (AFI.hasStackHazardSlotIndex ()) {
53885389 std::optional<int > FI = getLdStFrameID (MI, MFI);
53895390 if (FI && *FI >= 0 && *FI < (int )FrameObjects.size ()) {
5390- if (MFI.getStackID (*FI) == TargetStackID::ScalableVector ||
5391- AArch64InstrInfo::isFpOrNEON (MI))
5391+ if (MFI.isScalableStackID (*FI) || AArch64InstrInfo::isFpOrNEON (MI))
53925392 FrameObjects[*FI].Accesses |= FrameObject::AccessFPR;
53935393 else
53945394 FrameObjects[*FI].Accesses |= FrameObject::AccessGPR;
@@ -5746,7 +5746,7 @@ void AArch64FrameLowering::emitRemarks(
57465746 }
57475747
57485748 unsigned RegTy = StackAccess::AccessType::GPR;
5749- if (MFI.getStackID (FrameIdx) == TargetStackID::ScalableVector ) {
5749+ if (MFI.isScalableStackID (FrameIdx)) {
57505750 // SPILL_PPR_TO_ZPR_SLOT_PSEUDO and FILL_PPR_FROM_ZPR_SLOT_PSEUDO
57515751 // spill/fill the predicate as a data vector (so are an FPR access).
57525752 if (MI.getOpcode () != AArch64::SPILL_PPR_TO_ZPR_SLOT_PSEUDO &&
0 commit comments