Page MenuHomePhabricator

[mlir] Use TypedValue in single result traits

Authored by rkayaith on Jan 29 2023, 3:50 PM.



Ops with a single result currently get a getResult() method +
conversion operator to Value through the OneResult trait. By moving
these to the OneTypedResult trait instead, we can use TypedValue as
the return type to get more specfic types.

When the result type is unknown ODS adds the
OneTypedResult<mlir::Type> trait, in which case there is no change in
the resulting API.

Diff Detail

Event Timeline

rkayaith created this revision.Jan 29 2023, 3:50 PM
Herald added a project: Restricted Project. · View Herald Transcript
rkayaith published this revision for review.Jan 29 2023, 8:10 PM
rkayaith added reviewers: jpienaar, mehdi_amini.
rriddle accepted this revision.Jan 30 2023, 10:54 PM
This revision is now accepted and ready to land.Jan 30 2023, 10:54 PM
This revision was automatically updated to reflect the committed changes.