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

Simonas Kazlauskas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 21 06:58:08 PDT 2021


nagisa added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64FrameLowering.cpp:1382
+  if (TLI.hasInlineStackProbe(MF) && AllocateAfter) {
+    Register ScratchReg = findScratchNonCalleeSaveRegister(&MBB);
+    assert(ScratchReg != AArch64::NoRegister);
----------------
kristof.beyls wrote:
> This line of code reminds me that frame setup can also happen in non-entry basic blocks, when shrink wrapping has happened.
> Assuming I checked correctly, there are no test cases in the tests in this patch verifying correct behavior in case shrink wrapping happens. I'm not sure if it's worthwhile to have such tests, but I thought I'd check if you thought about this.
I believe this would fail or produce incorrect results for functions that both have the `no_caller_saved_registers` attribute and request the inline stack probes, right?


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