[Mlir-commits] [mlir] [MLIR][Python] Support Python-defined passes in MLIR (PR #156000)

Maksim Levental llvmlistbot at llvm.org
Mon Sep 8 06:04:14 PDT 2025


================
@@ -301,6 +301,10 @@ mlirFreezeRewritePattern(MlirRewritePatternSet op);
 MLIR_CAPI_EXPORTED void
 mlirFrozenRewritePatternSetDestroy(MlirFrozenRewritePatternSet op);
 
+MLIR_CAPI_EXPORTED MlirLogicalResult mlirApplyPatternsAndFoldGreedilyForOp(
+    MlirOperation op, MlirFrozenRewritePatternSet patterns,
+    MlirGreedyRewriteDriverConfig);
----------------
makslevental wrote:

We can just use `apply_patterns_and_fold_greedily` here and then add `apply_patterns_and_fold_greedily_with_op` in a follow-up (the existing test passes just fine with `apply_patterns_and_fold_greedily`).

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


More information about the Mlir-commits mailing list