================ @@ -4227,10 +4310,20 @@ static bool getSVECalleeSaveSlotRange(const MachineFrameInfo &MFI, // Fills in the first and last callee-saved frame indices into // Min/MaxCSFrameIndex, respectively. // Returns the size of the stack. -static int64_t determineSVEStackObjectOffsets(MachineFrameInfo &MFI, - int &MinCSFrameIndex, - int &MaxCSFrameIndex, - bool AssignOffsets) { +static SVEStackSizes +determineSVEStackObjectOffsets(MachineFunction &MF, bool AssignOffsets, + bool SplitSVEObjects = false) { + MachineFrameInfo &MFI = MF.getFrameInfo(); + + int64_t ZPRStack = 0; + int64_t PPRStack = 0; + + auto [ZPROffset, PPROffset] = [&] { + if (SplitSVEObjects) + return std::tie(ZPRStack, PPRStack); + return std::tie(ZPRStack, ZPRStack); + }(); ---------------- sdesmalen-arm wrote:
This seems a lot more readable: ```suggestion int64_t &ZPROffset = ZPRStack; int64_t &PPROffset = SplitSVEObjects ? PPRStack : ZPRStack; ``` Also, can you add a brief comment describing why you create two aliases? https://github.com/llvm/llvm-project/pull/142391 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits