[llvm] [AArch64] Stop reserved registers from being saved in prolog/epilog (PR #138448)
Peter Smith via llvm-commits
llvm-commits at lists.llvm.org
Mon May 12 01:28:36 PDT 2025
smithp35 wrote:
>
> > There wasn't any clear specification of how it should behave and using callee-save registers is at the users own risk.
>
> @smithp35, Well, since it indeed is the users' own risk, and GCC/riscv64 llvm exhibits the behavior this PR implements, I believe this PR is a correct decision rather than leaving behavior inconsistent across targets and compilers.
Just to be clear, this was just reporting what the GCC Team had said, not presenting this as an argument that this should not be done. There's a defacto implementation, and unless GCC are going to change (no plans), it is better to match GCC than not.
I would recommend that if a user has a choice of register to reserve, a temporary register is lower risk than a callee-save, but that's out of scope of this change.
https://github.com/llvm/llvm-project/pull/138448
More information about the llvm-commits
mailing list