[AMDGPU][NFCI] Refactor BUFInstructions.td#65746
Merged
Conversation
Make the code more consistent: - More pattern classes follow the simpler interface with string instead of pseudos. - CmpSwap patterns are encapsulated in SIBufferAtomicCmpSwapPat. - Pseudo store patterns are separated out, similarly to the load counterparts. - MUBUF_Offset_Load_Pat is now GCNPat, as others.
arsenm
approved these changes
Sep 8, 2023
Sisyph
reviewed
Sep 8, 2023
|
|
||
| def _OFFSET : GCNPat < | ||
| (st store_vt:$vdata, (MUBUFOffset v4i32:$srsrc, i32:$soffset, i32:$offset)), | ||
| (!cast<MUBUF_Pseudo>(BaseInst # _OFFSET) store_vt:$vdata, v4i32:$srsrc, i32:$soffset, i32:$offset)>; |
Contributor
There was a problem hiding this comment.
This part of the refactor may be a slight downgrade in sense that you need to explicitly specify the operands of the instruction when the pat is separate rather than part of the instruction definition.
Contributor
There was a problem hiding this comment.
This also makes it easier to fix arbitrary types for the mubuf global path
Sisyph
approved these changes
Sep 8, 2023
ZijunZhaoCCK
pushed a commit
to ZijunZhaoCCK/llvm-project
that referenced
this pull request
Sep 19, 2023
Make the code more consistent: - More pattern classes follow the simpler interface with string instead of pseudos. - CmpSwap patterns are encapsulated in SIBufferAtomicCmpSwapPat. - Pseudo store patterns are separated out, similarly to the load counterparts. - MUBUF_Offset_Load_Pat is now GCNPat, as others.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make the code more consistent: