[clang] [ARM] make -mtp=TPIDRURO the default if the target architecture support a hardware thread pointer (PR #128901)
Peter Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 27 01:29:03 PST 2025
https://github.com/smithp35 commented:
I assume this is a rewrite of https://github.com/llvm/llvm-project/pull/128728
It looks like we've lost an explicit ``-mtp=auto``. I think that part is important, my apologies if my earlier comment implied that we should remove it. I've made a suggestion for how to support it with some minimal changes.
Please can you update clang/docs/ReleaseNotes.rst in the modified compiler flags section (https://github.com/llvm/llvm-project/blob/main/clang/docs/ReleaseNotes.rst#modified-compiler-flags)
Something like:
```
The ARM AArch32 ``-mtp`` option accepts and defaults to ``auto``, a value of ``auto`` uses the best available method of providing the frame pointer supported by the hardware. This matches the behavior of ``-mtp`` in gcc. This changes the default behavior for ARM targets that provide the ``TPIDRURO`` register as this will be used instead of a call to the ``__aeabi_read_tp``. Programs that use ``__aeabi_read_tp`` but do not use the ``TPIDRURO`` register must use ``-mtp=soft``. Fixes #123864
```
https://github.com/llvm/llvm-project/pull/128901
More information about the cfe-commits
mailing list