[PATCH] D78717: [SystemZ] Implement -fstack-clash-protection
Ulrich Weigand via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 5 08:52:19 PDT 2020
uweigand accepted this revision.
uweigand added a comment.
This revision is now accepted and ready to land.
A few cosmetic issues mentioned inline, otherwise this now looks good to me. Thanks!
================
Comment at: llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp:410
auto *ZII =
- static_cast<const SystemZInstrInfo *>(MF.getSubtarget().getInstrInfo());
+ static_cast<const SystemZInstrInfo *>(STI.getInstrInfo());
SystemZMachineFunctionInfo *ZFI = MF.getInfo<SystemZMachineFunctionInfo>();
----------------
I believe this will now fit onto a single line.
================
Comment at: llvm/lib/Target/SystemZ/SystemZISelLowering.cpp:6860
+ // Round down to the stack alignment.
+ StackProbeSize &= (~0U ^ (StackAlign - 1));
+ return StackProbeSize ? StackProbeSize : StackAlign;
----------------
The RHS can be simplified to ~(StackAlign - 1)
================
Comment at: llvm/lib/Target/SystemZ/SystemZInstrInfo.td:38
+
+let hasNoSchedulingInfo = 1 in
+ def STACKALLOC_W_PROBING : Pseudo<(outs), (ins i64imm:$stacksize), []>;
----------------
Doesn't this also need Defs and Uses to be fully correct?
================
Comment at: llvm/lib/Target/SystemZ/SystemZInstrInfo.td:39
+let hasNoSchedulingInfo = 1 in
+ def STACKALLOC_W_PROBING : Pseudo<(outs), (ins i64imm:$stacksize), []>;
----------------
For consistency with the PROBED_ALLOCA name, maybe this should be called PROBED_STACKALLOC?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78717/new/
https://reviews.llvm.org/D78717
More information about the llvm-commits
mailing list