This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ] [z/OS] Use assignCalleeSavedSpillSlots() to mark handle special registers in CSR list instead of determineCalleeSaves
ClosedPublic

Authored by Everybody0523 on May 5 2022, 2:26 PM.

Details

Summary

This PR moves the handling of special registers that need to be saved/restored in the prolog/epilog respectively from determineCalleeSaves to assignCalleeSavedSpillSlots. The documentation of the parent function of assignCalleeSavedSpillSlots explicitly allows the modification of the CSI hence adding the special registers (the stack pointer register, the return address register, and the entry point register) to the CSI list at that stage should be permissible.

This cleans up the code a bit and makes it so that we do not have to place registers that are not actually considered CSRs by the spec in the CSR list, which is something of a hack.

Diff Detail

Event Timeline

Everybody0523 created this revision.May 5 2022, 2:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2022, 2:26 PM
Herald added a subscriber: hiraditya. · View Herald Transcript
Everybody0523 requested review of this revision.May 5 2022, 2:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 5 2022, 2:26 PM
uweigand accepted this revision.May 6 2022, 2:25 AM

LGTM, thanks!

This revision is now accepted and ready to land.May 6 2022, 2:25 AM

rebase to latest main

This revision was landed with ongoing or failed builds.Jul 6 2022, 7:22 PM
This revision was automatically updated to reflect the committed changes.