This is an archive of the discontinued LLVM Phabricator instance.

[mlir][transform][structured][python] Allow str arg in match_op_names.
ClosedPublic

Authored by ingomueller-net on Jul 20 2023, 3:01 AM.

Details

Summary

Allow the names argument in MatchOp.match_op_names to be of type
str in addition to Sequence[str]. In this case, the argument is
treated as a list with one name, i.e., it is possible to write
MatchOp.match_op_names(..., "test.dummy") instead of
MatchOp.match_op_names(..., ["test.dummy"]).

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2023, 3:01 AM
ingomueller-net requested review of this revision.Jul 20 2023, 3:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 20 2023, 3:01 AM
ftynse accepted this revision.Jul 21 2023, 12:59 AM
This revision is now accepted and ready to land.Jul 21 2023, 12:59 AM