This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Omit buffer resource with flat scratch.
ClosedPublic

Authored by rampitec on Nov 6 2020, 2:59 PM.

Diff Detail

Event Timeline

rampitec created this revision.Nov 6 2020, 2:59 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 6 2020, 2:59 PM
rampitec requested review of this revision.Nov 6 2020, 2:59 PM
arsenm accepted this revision.Nov 6 2020, 3:10 PM
This revision is now accepted and ready to land.Nov 6 2020, 3:10 PM
rampitec updated this revision to Diff 303585.Nov 6 2020, 4:30 PM

I have realized that SI_SPILL_* opcodes need a valid SReg_128, even if it is unused and will dropped after expansion. With this change ScratchRSrcReg is a $noreg which is not valid for the verifier.

I am using ttmp tuple as any reserved SReg_128 will work and at the end it will not be used. In general I could create a new unallocatable pseudo RC with SGPR_128 + PRIVATE_RSRC_REG just for that, but it looks like an overkill.

rampitec requested review of this revision.Nov 6 2020, 4:30 PM
arsenm added a comment.Nov 6 2020, 4:59 PM

We should drop the registers from the spill pseudos since we need reserved registers anyway and can insert them when frame indexes are handled

We should drop the registers from the spill pseudos since we need reserved registers anyway and can insert them when frame indexes are handled

Makes sense. I can do it as a separate patch, as it is really a separate thing.

arsenm accepted this revision.Nov 6 2020, 6:12 PM
This revision is now accepted and ready to land.Nov 6 2020, 6:12 PM
This revision was automatically updated to reflect the committed changes.