[llvm] [ARM] Optimise non-ABI frame pointers (PR #110286)

Lucas Duarte Prates via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 06:15:00 PDT 2024


================
@@ -2998,6 +2998,17 @@ bool ARMFrameLowering::assignCalleeSavedSpillSlots(
       // on the stack.
       CSI.insert(CSI.begin(), CalleeSavedInfo(ARM::R12));
       break;
+    case ARMSubtarget::NoSplit:
+      assert(!MF.getTarget().Options.DisableFramePointerElim(MF) &&
+             "ABI-required frame pointers need a CSR split when signing return "
+             "address.");
+      CSI.insert(find_if(CSI,
+                         [=](const auto &CS) {
----------------
pratlucas wrote:

I don't think this lambda requires any captures, so the `[=]` can be replaced ` []`.

https://github.com/llvm/llvm-project/pull/110286


More information about the llvm-commits mailing list