aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorOleksandr "Alex" Zinenko <git@ozinenko.com>2024-05-30 10:06:02 +0200
committerGitHub <noreply@github.com>2024-05-30 10:06:02 +0200
commit67897d77eda4c312cfe81b19a20abed43227ecb8 (patch)
treeae8152c468db91043fb337ba50e5ac2aa3c5665b /clang/lib/CodeGen/CodeGenModule.cpp
parent540a36ad7e31bfeb11e795047a42bb6e30bf9985 (diff)
downloadllvm-67897d77eda4c312cfe81b19a20abed43227ecb8.zip
llvm-67897d77eda4c312cfe81b19a20abed43227ecb8.tar.gz
llvm-67897d77eda4c312cfe81b19a20abed43227ecb8.tar.bz2
[mlir][py] invalidate nested operations when parent is deleted (#93339)
When an operation is erased in Python, its children may still be in the "live" list inside Python bindings. After this, if some of the newly allocated operations happen to reuse the same pointer address, this will trigger an assertion in the bindings. This assertion would be incorrect because the operations aren't actually live. Make sure we remove the children operations from the "live" list when erasing the parent. This also concentrates responsibility over the removal from the "live" list and invalidation in a single place. Note that this requires the IR to be sufficiently structurally valid so a walk through it can succeed. If this invariant was broken by, e.g, C++ pass called from Python, there isn't much we can do.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions