[PATCH] D46232: [SystemZ, IPRA] determineCalleeSaves must always add return register and DP.
Ulrich Weigand via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 30 02:56:23 PDT 2018
uweigand added a comment.
I do not believe we need to do anything special with https://reviews.llvm.org/source/libunwind/. This is only special if it is used as frame pointer, in which case the code before already adds it as caller-saved:
if (HasFP)
SavedRegs.set(SystemZ::R11D);
I agree we need to handle R14, however. This is for the scenario where we have a leaf function (so the MFFrame.hasCalls() check will return false), but R14 is still clobbered by some *other* instruction in the current function. In this case we always need to save and restore it, since the return instruction will implicitly rely on the incoming R14 value.
https://reviews.llvm.org/D46232
More information about the llvm-commits
mailing list