[PATCH] D114457: [z/OS] Implement prologue and epilogue generation for z/OS target.
Ulrich Weigand via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 7 10:48:13 PST 2021
uweigand added inline comments.
================
Comment at: llvm/lib/Target/SystemZ/SystemZCallingConv.td:169
def CSR_SystemZ_XPLINK64 : CalleeSavedRegs<(add (sequence "R%dD", 7, 15),
+ (sequence "R%dD", 4, 4),
(sequence "F%dD", 15, 8))>;
----------------
I'm wondering if it wouldn't be more straightforward to handle this in determineCalleeSaves, in the place where the frame pointer register is handled?
================
Comment at: llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp:1055
+uint64_t SystemZXPLINKFrameLowering::getAllocatedStackSize(
+ const MachineFunction &MF) const {
+
----------------
This is no longer called anywhere and should be deleted.
================
Comment at: llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp:1180
+
+StackOffset SystemZXPLINKFrameLowering::getFrameIndexReference(
+ const MachineFunction &MF, int FI, Register &FrameReg) const {
----------------
This function is now actually identical to the default implementation and should also be deleted.
================
Comment at: llvm/lib/Target/SystemZ/SystemZISelLowering.cpp:1504
+ int64_t ArgSPOffset = VA.getLocMemOffset();
+ if (Subtarget.isTargetXPLINK64()) {
+ auto &XPRegs = Subtarget.getSpecialRegisters<SystemZXPLINK64Registers>();
----------------
It's a bit ugly, but I'd be OK with it for now. It would be good to add a FIXME saying that ideally the call frame size should have already been included in the offset.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114457/new/
https://reviews.llvm.org/D114457
More information about the llvm-commits
mailing list