This is an archive of the discontinued LLVM Phabricator instance.

[mlir][transform] SequenceOp: Top-level operations can be used as matchers
ClosedPublic

Authored by springerm on Jun 16 2023, 3:10 AM.

Details

Summary

As a convenience to the user, top-level sequence ops can optionally be used as matchers: the op type is specified by the type of the block argument.

This is similar to how pass pipeline targets can be specified on the command line (-pass-pipeline='builtin.module(func.func(...))).

Depends On: D153113

Diff Detail

Event Timeline

springerm created this revision.Jun 16 2023, 3:10 AM
Herald added a project: Restricted Project. · View Herald Transcript
springerm requested review of this revision.Jun 16 2023, 3:10 AM
ftynse accepted this revision.Jun 16 2023, 5:54 AM

This changes semantics a bit: previously, the first block argument of a sequence was guaranteed to the the payload root, which for example could be used to check if other handles are pointing to operations nested under that. This seems useful, although I am not particularly keen on special-casing the behavior for a specific transform type given that the type system is extensible.

One thing I have been pondering would be to update the syntax so we don't use an explicit block, which could make it clear at least in the syntax that we are applying the sequence to the "batch" of operations instead of one.

This revision is now accepted and ready to land.Jun 16 2023, 5:54 AM