[PATCH] D36160: Liveness issues in tail merging, and the ARM::LR saved-but-not-restored
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 1 11:31:24 PDT 2017
efriedma added a comment.
Fundamentally, the problem with LR on ARM is that it isn't really a callee-save register. We just pretend it's callee-save to avoid explicitly tracking its lifetime throughout the function. Actually, ARM isn't the only architecture that does this; the weird part about ARM is that it has the instruction "pop {pc}" (which loads the return address directly from the stack, without loading it back into LR).
If we are going to add a marking to CalleeSavedInfo, it would probably be better to add it in assignCalleeSavedSpillSlots, where we construct the CalleeSavedInfo, rather than waiting until restoreCalleeSavedRegisters.
Repository:
rL LLVM
https://reviews.llvm.org/D36160
More information about the llvm-commits
mailing list