This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Deduplicate VOP tablegen asm & ins
ClosedPublic

Authored by Joe_Nash on Jan 5 2021, 10:49 AM.

Details

Summary

VOP3 and VOP DPP subroutines to generate input
operands and asm strings were essentially copy
pasted several times. They are deduplicated to
reduce the maintenance burden and allow faster
development.

Diff Detail

Event Timeline

Joe_Nash created this revision.Jan 5 2021, 10:49 AM
Joe_Nash requested review of this revision.Jan 5 2021, 10:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 5 2021, 10:49 AM
Joe_Nash added a reviewer: dp.Jan 5 2021, 10:52 AM
foad added a comment.Jan 5 2021, 11:04 AM

I don't really follow the details but it looks like quite a nice simplification.

llvm/lib/Target/AMDGPU/SIInstrInfo.td
1674–1675

You can use a single !con with 3 arguments.

Joe_Nash updated this revision to Diff 314673.Jan 5 2021, 11:29 AM

combined !con per comment by foad

Joe_Nash marked an inline comment as done.Jan 5 2021, 11:30 AM
dp accepted this revision.Jan 11 2021, 6:50 AM

LGTM except for minor notes. Very nice simplification, thanks!

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

Maybe vop3pFields would be more clear

1731

misleading margin

1748

misleading margin

1914

Missing space

This revision is now accepted and ready to land.Jan 11 2021, 6:50 AM
Joe_Nash updated this revision to Diff 315848.Jan 11 2021, 10:03 AM
Joe_Nash marked 4 inline comments as done.

Apply nfc edits suggested by dp

This revision was landed with ongoing or failed builds.Jan 11 2021, 10:56 AM
This revision was automatically updated to reflect the committed changes.