This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] [NFC]: Organize the code around reserving registers.
ClosedPublic

Authored by hsmhsm on Mar 22 2022, 3:07 AM.

Details

Summary

First, add code to reserve all required special purpose registers,
followed by code to reserve SGPRs, followed by code to reserve
VGPRs/AGPRs.

This patch is prepared as a pre-requisite to fix an issue related to
GFX90A hardware.

Diff Detail

Event Timeline

hsmhsm created this revision.Mar 22 2022, 3:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 22 2022, 3:07 AM
hsmhsm requested review of this revision.Mar 22 2022, 3:07 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 22 2022, 3:07 AM
arsenm added inline comments.Mar 22 2022, 5:49 AM
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
603

I think this loop should be grouped together with the ones below reserving registers used for spills

hsmhsm updated this revision to Diff 417268.Mar 22 2022, 6:10 AM

Fix review comments by Matt.

hsmhsm marked an inline comment as done.Mar 22 2022, 6:10 AM
arsenm added inline comments.Mar 22 2022, 6:13 AM
llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp
668

Typo Theoritically

hsmhsm updated this revision to Diff 417275.Mar 22 2022, 6:23 AM

Fix further review comments by Matt.

hsmhsm marked an inline comment as done.Mar 22 2022, 6:23 AM
hsmhsm updated this revision to Diff 417459.Mar 22 2022, 6:36 PM

Rebase and remove newly added confusing TODO comments.

arsenm accepted this revision.Mar 22 2022, 6:41 PM
This revision is now accepted and ready to land.Mar 22 2022, 6:41 PM
This revision was landed with ongoing or failed builds.Mar 22 2022, 6:48 PM
This revision was automatically updated to reflect the committed changes.