[llvm-branch-commits] [llvm] [AArch64] Prepare for split ZPR and PPR area allocation (NFCI) (PR #142391)

Sander de Smalen via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Jul 10 05:20:06 PDT 2025


================
@@ -4694,12 +4790,8 @@ void AArch64FrameLowering::processFunctionBeforeFrameFinalized(
   assert(getStackGrowthDirection() == TargetFrameLowering::StackGrowsDown &&
          "Upwards growing stack unsupported");
 
-  int MinCSFrameIndex, MaxCSFrameIndex;
-  int64_t SVEStackSize =
-      assignSVEStackObjectOffsets(MFI, MinCSFrameIndex, MaxCSFrameIndex);
-
-  AFI->setStackSizeSVE(alignTo(SVEStackSize, 16U));
-  AFI->setMinMaxSVECSFrameIndex(MinCSFrameIndex, MaxCSFrameIndex);
+  auto [ZPRStackSize, PPRStackSize] = assignSVEStackObjectOffsets(MF);
----------------
sdesmalen-arm wrote:

nit: There's little value in returning from `assignSVEStackObjectOffsets` if their only use is them being passed to `setStackSizeSVE`, so I think assignment can now probably be moved to `determineSVEStackObjectOffsets` (predicated under `AssignOffsets`), removing the need for the aliases that then just call `determineSVEStackObjectOffsets`.

https://github.com/llvm/llvm-project/pull/142391


More information about the llvm-branch-commits mailing list