[Mlir-commits] [mlir] [MLIR][Python] Expose the insertion point of pattern rewriter (PR #161001)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri Oct 3 20:49:25 PDT 2025
================
@@ -841,6 +841,8 @@ class PyInsertionPoint {
PyInsertionPoint(const PyBlock &block);
/// Creates an insertion point positioned before a reference operation.
PyInsertionPoint(PyOperationBase &beforeOperationBase);
+ /// Creates an insertion point positioned before a reference operation.
+ PyInsertionPoint(PyOperationRef beforeOperationRef);
----------------
PragmaTwice wrote:
Yes, but that feels a bit roundabout — this object already stores a `PyOperationRef`. If I use the other constructor, I’d have to first convert the `PyOperationRef` to a `PyOperationBase&`, and then the constructor would just convert it back to a `PyOperationRef` internally.
https://github.com/llvm/llvm-project/pull/161001
More information about the Mlir-commits
mailing list