omern1 wrote:

Thanks for the prompt review @efriedma-quic!

If you look at the following line:
https://github.com/llvm/llvm-project/blob/084c704f857caa72f1348d5645b98586a5e9568c/clang/lib/Driver/ToolChains/CommonArgs.cpp#L257

`-fno-omit-frame-pointer` translates to `-mframe-pointer=all` on X86 which 
means that it already implies `-mreserve-frame-pointer-reg`.

I'm guessing you meant `-momit-leaf-frame-pointer`.

-----

Thanks for the explanation of what happens on GCC @pinskia.
The issue that I filed (https://github.com/llvm/llvm-project/issues/154379) is 
specifically for frame pointers on X86 about whether 
`-momit-leaf-frame-pointer` should imply `-mreserve-frame-pointer-reg`.

I have no concerns with or opinions on `-momit-leaf-frame-pointer` implying 
`-mreserve-frame-pointer-reg` on `aarch64` where, from what I've gathered so 
far, this appears to be a preference in some cases and a requirement in others 
(I'm not very familiar with aarch64).

I think we should go back to the behaviour that we had on X86 before 
https://github.com/llvm/llvm-project/pull/146638, i.e. 
`-momit-leaf-frame-pointer` should *not* imply `-mreserve-frame-pointer-reg` 
(fp should be allocatable in leaf functions) because this gives us an extra 
register to work with. This would mean that even with Clang this would be 
target dependent making the behaviour the same as GCC again.

https://github.com/llvm/llvm-project/pull/163775
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to