Commit 0b9a69b
committed
[mlir][Transforms] Dialect conversion: Fix bug in
When an unresolved materializations (`unrealized_conversion_cast` op) is rolled back, the mapping should be rolled back as well, regardless of whether it is a source, target or argument materialization. Otherwise, we accumulate pointers to erased IR in the `mapping`. This is harmless in most cases, but can cause issues when a new operation is allocated at the same memory location and the pointer is "reused".
It is not possible to write a test case for this because I cannot trigger the pointer reuse programmatically.UnresolvedMaterializationRewrite rollback1 parent d7073c5 commit 0b9a69b
1 file changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1062 | 1062 | | |
1063 | 1063 | | |
1064 | 1064 | | |
1065 | | - | |
1066 | | - | |
1067 | | - | |
1068 | | - | |
| 1065 | + | |
| 1066 | + | |
1069 | 1067 | | |
1070 | 1068 | | |
1071 | 1069 | | |
| |||
0 commit comments