[llvm] [ARM] Fix -mno-omit-leaf-frame-pointer flag doesn't works on 32-bit ARM (PR #109628)
Paul Kirth via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 23 12:12:23 PDT 2024
https://github.com/ilovepi commented:
I'm not sure I understand this patch fully. We already have ways of specifying how frame pointer elimination works through function attributes, so if those are incorrect, then we should correct how they are applied. Can you elaborate on why we need to add an interface to `TargetOptions` instead of using the existing mechanisms?
Additionally, it seems that perhaps the inconsistency is in how clang applies attribute and perhaps the logic in https://github.com/llvm/llvm-project/blob/416c3ce0138ff4039dab13ff634ee6392b9a3c7b/clang/lib/Driver/ToolChains/CommonArgs.cpp#L179 is incomplete. My guess is that if we shore up the logic here and get the right attributes on functions, then we don't need any additional machinery in the backend.
Lastly, I'm not sure why so many existing tests were changed from `frame-pointer=all` to `frame-pointer=none`. That seems incorrect, though if the tests didn't change, perhaps the attribute isn't needed in many cases. In any case, I'm hesitant to say those are appropriate w/o more rationale.
https://github.com/llvm/llvm-project/pull/109628
More information about the llvm-commits
mailing list