[all-commits] [llvm/llvm-project] fa19ef: [mlir][python] Clear PyOperations instead of inval...
Ingo Müller via All-commits
all-commits at lists.llvm.org
Tue Oct 24 22:18:10 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fa19ef7a10869bf0f8325681be111f7d97b2544e
https://github.com/llvm/llvm-project/commit/fa19ef7a10869bf0f8325681be111f7d97b2544e
Author: Ingo Müller <ingomueller at google.com>
Date: 2023-10-25 (Wed, 25 Oct 2023)
Changed paths:
M mlir/include/mlir-c/IR.h
M mlir/lib/Bindings/Python/IRCore.cpp
M mlir/lib/Bindings/Python/IRModule.h
M mlir/lib/Bindings/Python/Pass.cpp
M mlir/test/python/pass_manager.py
Log Message:
-----------
[mlir][python] Clear PyOperations instead of invalidating them. (#70044)
`PyOperations` are Python-level handles to `Operation *` instances. When
the latter are modified by C++, the former need to be invalidated.
#69746 implements such invalidation mechanism by setting all
`PyReferences` to `invalid`. However, that is not enough: they also need
to be removed from the `liveOperations` map since other parts of the
code (such as `PyOperation::createDetached`) assume that that map only
contains valid refs.
This is required to actually solve the issue in #69730.
More information about the All-commits
mailing list