[llvm] [ARM] Fix llvm.returnaddress for Thumb1 with R11 frame-pointer (PR #117735)
Oliver Stannard via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 27 09:14:47 PST 2024
ostannard wrote:
I don't think the decision can be deferred to frame lowering time, because the two choices differ in whether a register value needs to be preserved from entry to the `llvm.returnaddr` call, and frame lowering happens after register allocation. We could preserve and register-allocate that value and ignore it if the prologue can't preserve LR, but that seems wasteful if it doesn't end up being used.
Instead I've gone with preserving the value of LR in the prologue, which sometimes requires re-loading it from the stack, but that can be optimised by picking a different register in most cases.
https://github.com/llvm/llvm-project/pull/117735
More information about the llvm-commits
mailing list