[llvm-dev] AArch64 always omit leaf frame pointer

Fāng-ruì Sòng via llvm-dev llvm-dev at lists.llvm.org
Sat Dec 7 11:17:12 PST 2019

On Fri, Dec 6, 2019 at 10:16 AM kamlesh kumar via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Hi Devs,
> By default AArch64 omit the frame pointer for leaf function.
> But surprisingly, even after passing option -mno-omit-leaf-frame-pointer behavior remain same.
> it is handled at
> https://github.com/llvm-mirror/llvm/blob/master/lib/Target/AArch64/AArch64FrameLowering.cpp#L242
> Here is a testcase
> https://godbolt.org/z/653p3q
> Before going for fix,
> Like to know community thought on this wether this is a bug or not?

X86 and Mips respect -mno-omit-leaf-frame-pointer. gcc aarch64
defaults to -mno-omit-leaf-frame-pointer. So it seems we should
probably fix AArch64. PowerPC has a similar problem.

We need a clang driver patch to make AArch64 similar to PS4, which
defaults to -mno-omit-leaf-frame-pointer:


More information about the llvm-dev mailing list