[PATCH] D96004: [AArch64] Stack probing for function prologues

Oliver Stannard (Linaro) via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 9 09:00:55 PST 2021


ostannard planned changes to this revision.
ostannard added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64FrameLowering.h:153
+  /// Replace a StackProbe stub (if any) with the actual probe code inline
+  virtual void inlineStackProbe(MachineFunction &MF,
+                                MachineBasicBlock &PrologueMBB) const override;
----------------
serge-sans-paille wrote:
> Why did you set that one virtual?
It's an override of a virtual function called by the target-independent part of the prologue/epilogue pass.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:16515
+  // more than 1024 bytes above SP.
+  return 1024;
+}
----------------
serge-sans-paille wrote:
> Can you give any hint about why 1024 was chosen, and why it's independent from `getStackProbeSize` ?
This matches GCC's ABI, which doesn't appear to be explicitly documented anywhere, other then comments in the GCC code: https://github.com/gcc-mirror/gcc/blob/master/gcc/config/aarch64/aarch64.c#L8190


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96004/new/

https://reviews.llvm.org/D96004



More information about the llvm-commits mailing list