[Mlir-commits] [mlir] [mlir][py] invalidate nested operations when parent is deleted (PR #93339)

Oleksandr Alex Zinenko llvmlistbot at llvm.org
Thu May 30 01:06:01 PDT 2024


ftynse wrote:

> Is there going to be opposition to this because (so far) the only use-case is supporting the Python bindings?

We won't know until we try... There are pure C++ use cases, e.g., all the operation maps in various rewrite drivers could use weak references, at least under some debugging flag/ifdef. Having a hook in `Operation::erase` would have saved countless hours of debugging rewrite patterns that bypass `RewriterBase::eraseOp leading to non-asan'able errors.

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


More information about the Mlir-commits mailing list