[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 04:57:09 PDT 2018


uweigand added a comment.

Well, usually this is handled correctly by the isPhysRegModified call in SystemZFrameLowering::determineCalleeSaves.  (The only reason why we even need the extra hasCalls check is that the call instruction is currently not at all stages modeled correctly to show that R14 is clobbered.)

The only problem is that in the IPRA special case, the SystemZFrameLowering::determineCalleeSaves handling is skipped.  I think we simply should do an unconditional check in SystemZ code, like so:

  if (MFFrame.hasCalls() || MRI.isPhysRegModified(SystemZ::R14D))
    SavedRegs.set(SystemZ::R14D);


https://reviews.llvm.org/D46232





More information about the llvm-commits mailing list