kamlesh kumar via llvm-dev
2019-Dec-06 18:15 UTC
[llvm-dev] AArch64 always omit leaf frame pointer
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? ./Kamlesh -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191206/4eda9c67/attachment.html>
Fāng-ruì Sòng via llvm-dev
2019-Dec-07 19:17 UTC
[llvm-dev] AArch64 always omit leaf frame pointer
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: https://reviews.llvm.org/D71167 -- 宋方睿