This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Select no-return atomic ops in BUFInstructions.td
ClosedPublic

Authored by abinavpp on Feb 24 2022, 10:37 PM.

Details

Summary

This change adds the selection of no-return buffer_* instructions in
tblgen. The motivation for this is to get the no-return atomic isel
working without relying on post-isel hooks so that GlobalISel can start
selecting them (once GlobalISelEmitter allows no return atomic patterns
like how DAGISel does).

This change handles the selection of no-return mubuf_atomic_cmpswap in
tblgen without changing the extract_subreg generation for the return
variant. This handling was done by the post-isel hook.

Diff Detail

Event Timeline

abinavpp created this revision.Feb 24 2022, 10:37 PM
abinavpp requested review of this revision.Feb 24 2022, 10:37 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 24 2022, 10:37 PM
arsenm added inline comments.Feb 25 2022, 7:37 AM
llvm/lib/Target/AMDGPU/BUFInstructions.td
1367–1418

Usually vt is lowercase

llvm/lib/Target/AMDGPU/SIInstrInfo.td
174

I think forcing the SDNode and PatFrags definitions in the same multiclass is awkward here

187

You might as well split this into a separate class at this point

abinavpp updated this revision to Diff 411766.Feb 28 2022, 2:26 AM
  • Rebased
  • VT -> vt
  • Use separate multiclass for PatFrag defs in SIInstrInfo.td
  • PatFrags -> PatFrag
abinavpp marked 3 inline comments as done.Feb 28 2022, 2:27 AM
arsenm accepted this revision.Feb 28 2022, 10:21 AM
This revision is now accepted and ready to land.Feb 28 2022, 10:21 AM
This revision was landed with ongoing or failed builds.Mar 1 2022, 7:44 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2022, 7:44 PM