[Mlir-commits] [mlir] [MLIR][Python] Support canonicalization hooks for Python-defined ops (PR #224806)

Maksim Levental llvmlistbot at llvm.org
Fri Sep 25 20:21:26 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);
-}
-
----------------
makslevental wrote:

just curious - why does this move out of the cpp and into the header?

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


More information about the Mlir-commits mailing list