This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][AsmParser][NFC] Refine defining i8- and i16-typed custom operands.
ClosedPublic

Authored by kosarev on Dec 31 2022, 2:25 AM.

Diff Detail

Event Timeline

kosarev created this revision.Dec 31 2022, 2:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 31 2022, 2:25 AM
kosarev requested review of this revision.Dec 31 2022, 2:25 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 31 2022, 2:25 AM

This intentionally doesn't cover all cases and aims to merely demonstrate the general approach.

dp added a comment.Jan 10 2023, 4:24 AM

In general, I like your idea and I see that further improvements are possible. Your second patch seems to better justify this approach.

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

This is actually unused.

1201

Are you going to further generalize this class?
The name does not reflect limitations on the expected syntax (an int with prefix).

1209

Ditto.

kosarev added inline comments.Jan 12 2023, 5:26 AM
llvm/lib/Target/AMDGPU/SIInstrInfo.td
1201

Would NamedIntOperandClass do?

dp added inline comments.Jan 12 2023, 5:48 AM
llvm/lib/Target/AMDGPU/SIInstrInfo.td
1201

I think it would be perfect.

kosarev updated this revision to Diff 488704.Jan 12 2023, 10:00 AM

Addressed feedback notes.

kosarev marked 4 inline comments as done.Jan 12 2023, 10:01 AM
dp accepted this revision.Jan 12 2023, 10:42 AM

LGTM.

This revision is now accepted and ready to land.Jan 12 2023, 10:42 AM
This revision was landed with ongoing or failed builds.Jan 13 2023, 1:50 AM
This revision was automatically updated to reflect the committed changes.