This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Clean up SReg classes
ClosedPublic

Authored by foad on Dec 14 2022, 4:22 AM.

Details

Reviewers
rampitec
mbrkusanin
arsenm
Joe_Nash
Group Reviewers
Restricted Project
Commits
rG113aafbf23ba: [AMDGPU] Clean up SReg classes
Summary

Remove unused LO16 classes SReg_LO16_XM0_XEXEC, SReg_LO16_XEXEC_HI and
SReg_LO16_XM0.

Simplify the definition of SReg_32.

Add SReg_32_XEXEC and use it to improve SReg_1_XEXEC which previously
excluded M0 for no good reason.

Improve SReg_1 which previously excluded EXEC_HI for no good reason.

Diff Detail

Event Timeline

foad created this revision.Dec 14 2022, 4:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 14 2022, 4:22 AM
foad requested review of this revision.Dec 14 2022, 4:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 14 2022, 4:22 AM
foad added a comment.Dec 14 2022, 4:23 AM

Remove unused LO16 classes SReg_LO16_XM0_XEXEC, SReg_LO16_XEXEC_HI and
SReg_LO16_XM0.

@rampitec did you want to keep these classes to use in future?

Does this multiply the number of generated register classes for all the without_subX cases?

foad added a comment.Dec 14 2022, 5:36 AM

Does this multiply the number of generated register classes for all the without_subX cases?

I think you mean "with" not "without"? Anyway the total number of register classes decreases from 545 to 543. The diff is:

+SReg_1_with_lo16_in_M0_CLASS_LO16RegClassID
-SReg_LO16_XEXEC_HIRegClassID
-SReg_LO16_XM0RegClassID
-SReg_LO16_XEXEC_HI_and_SReg_LO16_XM0RegClassID
-SReg_LO16_XM0_XEXECRegClassID
-SRegOrLds_32_and_SReg_1RegClassID
+SReg_32_XEXECRegClassID
+SReg_32_XEXEC_HI_and_SReg_32_XM0RegClassID
arsenm accepted this revision.Dec 14 2022, 7:54 AM
This revision is now accepted and ready to land.Dec 14 2022, 7:54 AM
Joe_Nash accepted this revision.Dec 14 2022, 7:55 AM
Joe_Nash added a subscriber: Joe_Nash.

LGTM

This revision was automatically updated to reflect the committed changes.

Remove unused LO16 classes SReg_LO16_XM0_XEXEC, SReg_LO16_XEXEC_HI and
SReg_LO16_XM0.

@rampitec did you want to keep these classes to use in future?

No, we can always add it back if needed.