[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
Wed Sep 25 06:49:38 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:
like this,
```_t1:
@ %bb.0:
push {r7, lr}
mov r7, sp
movw r0, :lower16:_message1
movt r0, :upper16:_message1
add r0, r0, #5
movw r1, #64
movw r2, #10
and r1, r1, #255
bl _memset
pop {r7, pc}
@ -- End function
.globl _t2 @ -- Begin function t2
.p2align 2
.code 32 @ @t2
```
Because this judgment is at the front
https://github.com/llvm/llvm-project/blob/22829f757dc76b23071d9438ae9c6ddc3e966db0/llvm/lib/CodeGen/TargetOptionsImpl.cpp#L24-L31
https://github.com/llvm/llvm-project/pull/109628
More information about the llvm-commits
mailing list