[Mlir-commits] [mlir] [MLIR][Python] Support Python-defined rewrite patterns (PR #162699)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Oct 9 22:09:48 PDT 2025


================
@@ -0,0 +1,77 @@
+# RUN: %PYTHON %s 2>&1 | FileCheck %s
+
+import gc, sys
+from mlir.ir import *
+from mlir.passmanager import *
+from mlir.dialects.builtin import ModuleOp
+from mlir.dialects import arith
+from mlir.rewrite import *
+
+
+def log(*args):
+    print(*args, file=sys.stderr)
+    sys.stderr.flush()
----------------
PragmaTwice wrote:

Done in https://github.com/llvm/llvm-project/pull/162699/commits/64d98e42960545330ee4842f8d81d12664f12784.

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


More information about the Mlir-commits mailing list