[Mlir-commits] [mlir] [MLIR][Python] Support canonicalization hooks for Python-defined ops (PR #224806)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Sep 25 21:27:31 PDT 2026
================
@@ -69,17 +69,6 @@ class PyPatternRewriter : public PyRewriterBase<PyPatternRewriter> {
// PyRewritePatternSet
//===----------------------------------------------------------------------===//
-PyRewritePatternSet::PyRewritePatternSet(MlirContext ctx)
- : patterns(mlirRewritePatternSetCreate(ctx)), owned(true) {}
-
-PyRewritePatternSet::PyRewritePatternSet(MlirRewritePatternSet patterns)
- : patterns(patterns), owned(false) {}
-
-PyRewritePatternSet::~PyRewritePatternSet() {
- if (owned && patterns.ptr)
- mlirRewritePatternSetDestroy(patterns);
-}
-
----------------
PragmaTwice wrote:
ahh it's because `PyRewritePatternSet` is referenced in `IRCore.cpp` (`PyDynamicOpDefinition::setGetCanonicalizationPatternsFn`)
https://github.com/llvm/llvm-project/pull/224806
More information about the Mlir-commits
mailing list