[Mlir-commits] [mlir] [MLIR][Transform] friendlier Python-bindings apply_registered_pass op (PR #143159)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Fri Jun 6 09:37:33 PDT 2025


================
@@ -214,6 +214,54 @@ def __init__(
         super().__init__(_get_op_results_or_values(operands), loc=loc, ip=ip)
 
 
+ at _ods_cext.register_operation(_Dialect, replace=True)
+class ApplyRegisteredPassOp(ApplyRegisteredPassOp):
+    def __init__(
+        self,
+        result: Type,
+        pass_name: Union[str, StringAttr],
+        target: Value,
+        *,
+        options: Sequence[Union[str, StringAttr, Value, Operation]] = [],
----------------
ftynse wrote:

Nit: you probably want `_OperationBase` or something like that (don't remember the exact name) so this captures specific instances of operation and not just the base class. Specific instances don't inherit `Operation`.

https://github.com/llvm/llvm-project/pull/143159


More information about the Mlir-commits mailing list