[mlir][transform][python] Add extended ApplyPatternsOp.
authorIngo Müller <ingomueller@google.com>
Mon, 17 Jul 2023 10:26:33 +0000 (10:26 +0000)
committerIngo Müller <ingomueller@google.com>
Thu, 20 Jul 2023 14:20:50 +0000 (14:20 +0000)
commit4f30746ca006f91daa6e84d126c11545ecaf195e
tree5b55869baf66e8182fa6926e6af83649034c57b9
parentf62cb13fb285bfce1135be73afb9d2f1c731012b
[mlir][transform][python] Add extended ApplyPatternsOp.

This patch adds a mixin for ApplyPatternsOp to _transform_ops_ext.py
with syntactic sugar for construction such ops. Curiously, the op did
not have any constructors yet, probably because its tablegen definition
said to skip the default builders. The new constructor is thus quite
straightforward. The commit also adds a refined `region` property which
returns the first block of the single region.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D155435
mlir/python/mlir/dialects/_transform_ops_ext.py
mlir/test/python/dialects/transform.py