[Mlir-commits] [mlir] [MLIR][Python] Add bindings for PDL native rewrite function registering (PR #159926)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Sep 23 07:11:00 PDT 2025
================
@@ -78,10 +119,48 @@ class PyFrozenRewritePatternSet {
/// Create the `mlir.rewrite` here.
void mlir::python::populateRewriteSubmodule(nb::module_ &m) {
+ nb::class_<MlirPatternRewriter>(m, "PatternRewriter");
//----------------------------------------------------------------------------
- // Mapping of the top-level PassManager
+ // Mapping of the PDLResultList and PDLModule
//----------------------------------------------------------------------------
#if MLIR_ENABLE_PDL_IN_PATTERNMATCH
+ nb::class_<MlirPDLResultList>(m, "PDLResultList")
+ .def(
+ "push_back",
----------------
PragmaTwice wrote:
Done.
https://github.com/llvm/llvm-project/pull/159926
More information about the Mlir-commits
mailing list