This is an archive of the discontinued LLVM Phabricator instance.

Remove OpTrait, AttrTrait and TypeTrait
ClosedPublic

Authored by sanjoy on Jan 29 2022, 2:48 PM.

Details

Summary
  • Remove the {Op,Attr,Type}Trait TableGen classes and replace with Trait
  • Rename OpTraitList to TraitList and use it in a few places

The bulk of this change is a mechanical s/OpTrait/Trait/ throughout the codebase.

Diff Detail

Event Timeline

sanjoy created this revision.Jan 29 2022, 2:48 PM
sanjoy requested review of this revision.Jan 29 2022, 2:48 PM
sanjoy edited the summary of this revision. (Show Details)Jan 29 2022, 2:52 PM
rriddle accepted this revision.Jan 29 2022, 3:50 PM

Nice! Looks like you are missing updates for flang.

mlir/include/mlir/IR/OpBase.td
2025–2026

Why not just name this TraitList and move it next to Trait?

2078–2079

Could we update this to use TraitList?

mlir/include/mlir/IR/RegionKindInterface.td
56–57

Same here about using TraitList.

sanjoy updated this revision to Diff 404318.Jan 29 2022, 6:15 PM
sanjoy marked 3 inline comments as done.

Address comments.

Herald added a project: Restricted Project. · View Herald TranscriptJan 29 2022, 6:15 PM

Can you please add a commit summary?

sanjoy edited the summary of this revision. (Show Details)Jan 30 2022, 8:26 AM

Can you please add a commit summary?

Done, PTAL.

herhut accepted this revision.Jan 31 2022, 3:06 AM
jpienaar accepted this revision.Jan 31 2022, 5:39 AM
This revision is now accepted and ready to land.Jan 31 2022, 5:39 AM
This revision was automatically updated to reflect the committed changes.