This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Init scratch only if necessary
ClosedPublic

Authored by sebastian-ne on Jul 13 2021, 11:01 AM.

Details

Summary

If no scratch or flat instructions are used, we do not need to
initialize the flat scratch hardware register.

Diff Detail

Event Timeline

sebastian-ne created this revision.Jul 13 2021, 11:01 AM
sebastian-ne requested review of this revision.Jul 13 2021, 11:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 13 2021, 11:01 AM
This revision is now accepted and ready to land.Jul 13 2021, 3:25 PM
t-tye added a comment.Jul 13 2021, 5:32 PM

It is also not necessary to request the scratch SRD to be set up in the User SGPRs. There is a significant performance cost for small kernels to requesting this unneeded set of 4 SGPRs to be initialized by the hardware.

This revision was landed with ongoing or failed builds.Jul 14 2021, 1:47 AM
This revision was automatically updated to reflect the committed changes.