This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][AsmParser][NFC] Simplify the EndpgmImm operand definition.
ClosedPublic

Authored by kosarev on May 29 2023, 11:46 PM.

Details

Summary

Clears the road to eliminating custom default operand handlers. Also
unifies naming of related entities.

Part of https://github.com/llvm/llvm-project/issues/62629.

Diff Detail

Event Timeline

kosarev created this revision.May 29 2023, 11:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 29 2023, 11:46 PM
kosarev requested review of this revision.May 29 2023, 11:46 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 29 2023, 11:46 PM

But maybe we should just rename EndpgmImm to Endpgm instead (and then eventually do the same for the other *Imm operands)?

kosarev updated this revision to Diff 528403.Jun 5 2023, 6:33 AM

Removed the Imm suffix. Endpgm doesn't look any different from other
operands of this kind, so maybe let's be consistent (and concise).

arsenm accepted this revision.Jun 8 2023, 4:33 PM
arsenm added inline comments.
llvm/lib/Target/AMDGPU/SIInstrInfo.td
1026

IIRC endpgm was special to avoid printing it because it's not real and was used for some tooling hack?

This revision is now accepted and ready to land.Jun 8 2023, 4:33 PM
This revision was landed with ongoing or failed builds.Jun 13 2023, 10:46 AM
This revision was automatically updated to reflect the committed changes.
kosarev added inline comments.Jun 13 2023, 11:02 AM
llvm/lib/Target/AMDGPU/SIInstrInfo.td
1026

Yes, we don't print it when it's 0. I guess it might be useful to keep s_endpgm reassemblable when the operand happens to be non-zero, whatever the reason for that might be.