This is an archive of the discontinued LLVM Phabricator instance.

[mlir][AttrDefGen] Add support for specifying the value type of an attribute
ClosedPublic

Authored by rriddle on Feb 26 2021, 3:16 PM.

Details

Summary

The value type of the attribute can be specified by either overriding the typeBuilder field on the AttrDef, or by providing a parameter of type AttributeSelfTypeParameter. This removes the need to define custom storage class constructors for attributes that have a value type other than NoneType.

Depends On D97589

Diff Detail

Event Timeline

rriddle created this revision.Feb 26 2021, 3:16 PM
rriddle requested review of this revision.Feb 26 2021, 3:16 PM
bondhugula added inline comments.
mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
487

Missing doc comment.

mehdi_amini accepted this revision.Mar 3 2021, 9:46 PM
mehdi_amini added inline comments.
mlir/tools/mlir-tblgen/AttrOrTypeDefGen.cpp
487

(Please fix)

This revision is now accepted and ready to land.Mar 3 2021, 9:46 PM
This revision was landed with ongoing or failed builds.Mar 4 2021, 1:04 PM
This revision was automatically updated to reflect the committed changes.
rriddle marked 2 inline comments as done.