Page MenuHomePhabricator

[NFC][PowerPC] Cleanup 64-bit and Darwin CalleeSavedRegs
ClosedPublic

Authored by daltenty on Apr 1 2020, 12:19 PM.

Details

Summary
  • Remove the no longer used Darwin CalleeSavedRegs
  • Combine the SVR464 callee saved regs and AIX64 since the two are (and should be) identical into PPC64
  • Update tests for 64-bit CSR change

Diff Detail

Event Timeline

daltenty created this revision.Apr 1 2020, 12:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 1 2020, 12:19 PM
sfertile added inline comments.Apr 1 2020, 1:13 PM
llvm/lib/Target/PowerPC/PPCCallingConv.td
328

The SVR4 is no longer appropriate, since this represent the CSRs for all the 64-bit targets, not just ELF. I think CSR_64 is fine, but open to better suggestions.

ZarkoCA added inline comments.Apr 2 2020, 7:05 AM
llvm/lib/Target/PowerPC/PPCCallingConv.td
328

I agree with Sean. If we are going to use this for all 64BIT targets then we should name it appropriately.

You may need to change the following tests when doing so:
llvm/test/CodeGen/PowerPC/block-placement-1.mir
llvm/test/CodeGen/PowerPC/DisableHoistingDueToBlockHotnessProfileData.mir
llvm/test/CodeGen/PowerPC/aantidep-def-ec.mir
llvm/test/CodeGen/PowerPC/DisableHoistingDueToBlockHotnessNoProfileData.mir
llvm/test/CodeGen/PowerPC/machine-backward-cp.mir
llvm/test/CodeGen/PowerPC/licm-tocReg.ll
llvm/test/CodeGen/PowerPC/setcr_bc2.mir
llvm/test/CodeGen/PowerPC/setcr_bc.mir
llvm/test/CodeGen/PowerPC/setcr_bc3.mir

daltenty updated this revision to Diff 254594.Apr 2 2020, 12:20 PM
  • Rename CSR_SRV4 to CSR_PPC64
daltenty marked an inline comment as done.Apr 2 2020, 12:22 PM
daltenty added inline comments.
llvm/lib/Target/PowerPC/PPCCallingConv.td
328

CSR_64 is in use by X86, so to keep things clear I opted for CSR_PPC64

daltenty edited the summary of this revision. (Show Details)Apr 2 2020, 12:23 PM
daltenty retitled this revision from [NFC][PowerPC] Cleanup AIX 64 and Darwin CalleeSavedRegs to [NFC][PowerPC] Cleanup 64-bit and Darwin CalleeSavedRegs.
asbirlea removed a subscriber: asbirlea.Apr 2 2020, 12:51 PM

I would rather we don't rename any of the ViaCopy lists, or CSR_SRV464_TLS_PE_SaveList since they are likely dead. We can write IR that triggers them, but Clang will only generate said IR for Darwin IIUC and from the name of the calling convention it is limited to C++.
Also please clang format the changes.

llvm/lib/Target/PowerPC/PPCCallingConv.td
328

Works for me.

daltenty updated this revision to Diff 255327.Apr 6 2020, 7:23 AM
  • Remove VIACopy changes and fix formating
sfertile accepted this revision as: sfertile.Apr 6 2020, 8:41 AM
sfertile added a reviewer: Restricted Project.

Thanks for the update, LGTM.

This revision is now accepted and ready to land.Apr 6 2020, 8:41 AM
This revision was automatically updated to reflect the committed changes.