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

via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 15 07:21:05 PDT 2024


guoxin049 wrote:

> Please add a release note to llvm/docs/ReleaseNotes.rst and clang/docs/ReleaseNotes.rst.
> 
> clang, as far as I can tell, currently defaults to `-mno-omit-leaf-frame-pointer`; do we want to change that, so new versions of clang are consistent with older versions and gcc by default? This is useLeafFramePointerForTargetByDefault in clang/lib/Driver/ToolChains/CommonArgs.cpp .
> 
> (I probably should have mentioned both of these earlier, but I was focused more on the code change itself, not the bigger picture...)


I've added llvm/docs/ReleaseNotes.md and clang/docs/ReleaseNotes.rst.
As far as I know, gcc retains fp after adding the `-fno-omit-frame-pointer` option, which is currently the same as gcc. I understand clang/lib/Driver/ToolChains/CommonArgs.cpp there is no need to change here. Here's my test demo:
https://godbolt.org/z/5TY6E4P5a
So I think it's reasonable to default to `-mno-omit-leaf-frame-pointer`.


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


More information about the cfe-commits mailing list