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

via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 24 06:47:57 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(
----------------
guoxin049 wrote:

Okay, thank you for your advice. I'll remove `DisableFramePointerElim()` and refactor CanEliminateFrame like this:
`bool CanEliminateFrame = !(requiresAAPCSFrameRecord(MF) && hasFP(MF)) ||
      !(MF.getFunction().hasFnAttribute("frame-pointer") && MF.getFunction().getFnAttribute("frame-pointer").getValueAsString() == "all");`

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


More information about the llvm-commits mailing list