Page MenuHomePhabricator

[mlir] Remove the need to define `kindof` on attribute and type classes.

Authored by rriddle on Aug 5 2020, 1:28 PM.



This revision refactors the default definition of the attribute and type classof methods to use the TypeID of the concrete class instead of invoking the kindof method. The TypeID is already used as part of uniquing, and this allows for removing the need for users to define any of the type casting utilities themselves.

Depends On D85348

Diff Detail

Event Timeline

rriddle created this revision.Aug 5 2020, 1:28 PM
Herald added 1 blocking reviewer(s): jpienaar. · View Herald Transcript
Herald added a reviewer: silvas. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
rriddle requested review of this revision.Aug 5 2020, 1:28 PM
ftynse accepted this revision.Aug 5 2020, 3:49 PM

Cool, thanks! I have just run into the problem of having to define kindof when implementing LLVM types, this new approach is much cleaner.

Harbormaster completed remote builds in B67216: Diff 283429.
mehdi_amini accepted this revision.Aug 5 2020, 8:37 PM


DavidTruby resigned from this revision.Aug 7 2020, 6:52 AM
This revision was not accepted when it landed; it landed in state Needs Review.Aug 7 2020, 1:44 PM
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.