This is an archive of the discontinued LLVM Phabricator instance.

[mlir] add OperationType to the Transform dialect
ClosedPublic

Authored by ftynse on Oct 10 2022, 7:42 AM.

Details

Summary

Add a new OperationType handle type to the Transform dialect. This
transform type is parameterized by the name of the payload operation it
can point to. It is intended as a constraint on transformations that are
only applicable to a specific kind of payload operations. If a
transformation is applicable to a small set of operation classes, it can
be wrapped into a transform op by using a disjunctive constraint, such
as `Type<Or<[Transform_ConcreteOperation<"foo">.predicate,
Transform_ConcreteOperation<"bar">.predicate]>>` for its operand without
modifying this type. Broader sets of accepted operations should be
modeled as specific types.

Diff Detail

Event Timeline

ftynse created this revision.Oct 10 2022, 7:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 10 2022, 7:42 AM
ftynse requested review of this revision.Oct 10 2022, 7:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 10 2022, 7:42 AM

It is intended as a constraint on transformations that are only applicable to a sepcific kind of payload operations.

s/sepcific/specific/

If a transformation is applicable to a small set of operation classes, it can be wrapped into a transform op by using a disjunctive constraint for its operand without modifying this type.
Broader sets of accepted operations should be modeled as specific types.

Can you give some IR examples (even pseudo-IR in the commit message would be useful).

This revision is now accepted and ready to land.Oct 11 2022, 12:23 AM
ftynse updated this revision to Diff 466745.Oct 11 2022, 2:30 AM

Address review.

ftynse edited the summary of this revision. (Show Details)Oct 11 2022, 2:32 AM
This revision was landed with ongoing or failed builds.Oct 11 2022, 2:55 AM
This revision was automatically updated to reflect the committed changes.