[llvm] [ARM] Fix -mno-omit-leaf-frame-pointer flag doesn't works on 32-bit ARM (PR #109628)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 23 21:15:50 PDT 2024


================
@@ -40,6 +40,20 @@ bool TargetOptions::DisableFramePointerElim(const MachineFunction &MF) const {
   llvm_unreachable("unknown frame pointer flag");
 }
 
+/// DisableLeafFramePointerElim - This returns true if leaf frame pointer
+/// elimination optimization should be disabled for the given machine function.
+bool TargetOptions::DisableLeafFramePointerElim(
----------------
efriedma-quic wrote:

I mean, DisableFramePointerElim() should return true in all the cases where we want to disable frame-pointer elimination.  So you shouldn't need a separate API specifically for leaf functions.  I think if you just replace the call to DisableLeafFramePointerElim with a call to DisableFramePointerElim, you should get the same behavior.  So the target-independent code shouldn't need changes.

Probably at that point, the logic could be refactored a bit.

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


More information about the llvm-commits mailing list