This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Allow use of TTMP registers in AMDGPUResourceUsageAnalysis
ClosedPublic

Authored by foad on Apr 13 2023, 8:20 AM.

Details

Summary

With architected SGPRs, workgroup IDs are passed into a compute shader
in TTMP registers. Allow for this in AMDGPUResourceUsageAnalysis instead
of failing an assertion.

Diff Detail

Event Timeline

foad created this revision.Apr 13 2023, 8:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2023, 8:20 AM
foad requested review of this revision.Apr 13 2023, 8:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2023, 8:20 AM
cdevadas added inline comments.Apr 13 2023, 8:42 AM
llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp
359

Shouldn't we retain the assertion for TTMP reg sizes bigger than 32-bit?
We don't have any TTMP tuple usage, I guess.

foad added inline comments.Apr 13 2023, 8:48 AM
llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp
359

I just don't see the point of the assertion, for any reg size.

cdevadas accepted this revision.Apr 13 2023, 8:50 AM
This revision is now accepted and ready to land.Apr 13 2023, 8:50 AM
This revision was landed with ongoing or failed builds.Apr 13 2023, 8:59 AM
This revision was automatically updated to reflect the committed changes.