This is an archive of the discontinued LLVM Phabricator instance.

[X86][NFC] Reorganize X86InstrInfo.td
ClosedPublic

Authored by XinWang10 on Feb 17 2023, 12:57 AM.

Details

Summary

For now X86InstrInfo.td has many definitions for some instrs
and patterns which I think should not exist here, extract them
and move to other files.

It will be more clear to me that X86InstrInfo just define some
X86 specific properties and would not include detailed instrs
definition.

Diff Detail

Event Timeline

XinWang10 created this revision.Feb 17 2023, 12:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2023, 12:57 AM
XinWang10 requested review of this revision.Feb 17 2023, 12:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2023, 12:57 AM
skan added inline comments.Feb 17 2023, 1:43 AM
llvm/lib/Target/X86/X86InstrAsmAlias.td
572

We can move the alias of conditional instructions to here too. Try grep "InstAlias" in X86 td files

llvm/lib/Target/X86/X86InstrBasic.td
1 ↗(On Diff #498277)

Actually, the instructions here are not basic. I think "Misc" is more situatable

9 ↗(On Diff #498277)

Update the comment

XinWang10 edited reviewers, added: craig.topper, RKSimon; removed: yubing.Feb 17 2023, 1:49 AM
XinWang10 updated this revision to Diff 498299.Feb 17 2023, 2:35 AM
  • rename filename
XinWang10 edited the summary of this revision. (Show Details)Feb 17 2023, 2:37 AM
XinWang10 updated this revision to Diff 498303.Feb 17 2023, 2:52 AM
  • collect InstrAlias except vectors
skan accepted this revision.Feb 17 2023, 3:10 AM

LGTM. Please wait for some days for other reviewers.

This revision is now accepted and ready to land.Feb 17 2023, 3:10 AM

LGTM - although it might be nice to pull out more ISAs from X86InstrMisc into their own files (X86InstrTBM, etc.) as its always annoying trying to find their defs.

XinWang10 updated this revision to Diff 498763.Feb 20 2023, 1:29 AM
  • mv TBM instrs from Misc

LGTM - although it might be nice to pull out more ISAs from X86InstrMisc into their own files (X86InstrTBM, etc.) as its always annoying trying to find their defs.

Many instructions are too small size, like UINTR..

Thanks for your reviews!

skan retitled this revision from [X86]rearange X86InstrInfo.td to [X86] Reorganize X86InstrInfo.td.Feb 20 2023, 6:16 PM
skan retitled this revision from [X86] Reorganize X86InstrInfo.td to [X86][NFC] Reorganize X86InstrInfo.td.Feb 20 2023, 6:37 PM
This revision was landed with ongoing or failed builds.Feb 20 2023, 7:03 PM
Closed by commit rGb9ea7327c092: [X86][NFC] Reorganize X86InstrInfo.td (authored by XinWang10, committed by skan). · Explain Why
This revision was automatically updated to reflect the committed changes.
llvm/lib/Target/X86/X86InstrControl.td