[PATCH] D78717: [SystemZ] Implement -fstack-clash-protection

serge via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 07:00:24 PDT 2020


serge-sans-paille added inline comments.


================
Comment at: llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp:670
+
+  if (NumFullBlocks < 3) {
+    // Emit unrolled probe statements.
----------------
Maybe we should syndicate that unroll parameter somewhere across architectures?


================
Comment at: llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp:708
+  if (Residual)
+    allocateAndProbe(*MBB, MBBI, Residual, true/*EmitCFI*/);
+
----------------
On X86, we don't need to probe that final allocation because the two ways the stack could grow after the final alloca are

1. A function call, and in that case we get a free probe when we make a function call
2. A PROBED_ALLOCA, and in that case we get a probe at Residual + PAGE_SIZE, which is right into the Page Guard.

I assume that's different for SystemZ? 


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

https://reviews.llvm.org/D78717





More information about the llvm-commits mailing list