llvm-project/mlir/tools
Markus Böck 850b2c6b3c [mlir] Fix `Region`s `takeBody` method if the region is not empty
The current implementation of takeBody first clears the Region, before then taking ownership of the blocks of the other regions. The issue here however, is that when clearing the region, it does not take into account references of operations to each other. In particular, blocks are deleted from front to back, and operations within a block are very likely to be deleted despite still having uses, causing an assertion to trigger [0].

This patch fixes that issue by simply calling dropAllReferences()before clearing the blocks.

[0] 9a8bb4bc63/mlir/lib/IR/Operation.cpp (L154)

Differential Revision: https://reviews.llvm.org/D123913
2022-04-21 15:32:59 +02:00
..
mlir-cpu-runner Reland [mlir] Remove uses of LLVM's legacy pass manager 2022-04-11 16:53:32 -07:00
mlir-linalg-ods-gen [mlir][linalg] Add ods-gen helper to simplify the build methods. 2022-04-20 13:14:38 +00:00
mlir-lsp-server [mlir:Analysis] Move the LoopAnalysis library to Dialect/Affine/Analysis 2022-01-18 10:28:22 -08:00
mlir-opt [mlir] Fix `Region`s `takeBody` method if the region is not empty 2022-04-21 15:32:59 +02:00
mlir-parser-fuzzer Apply clang-tidy fixes for readability-identifier-naming in mlir-parser-fuzzer.cpp (NFC) 2022-04-16 00:44:51 +00:00
mlir-pdll [PDLL] Add support for tablegen includes and importing ODS information 2022-03-03 16:14:03 -08:00
mlir-pdll-lsp-server [mlir][PDLL] Add an initial language server for PDLL 2022-03-19 13:28:23 -07:00
mlir-reduce [MLIR] Move TestDialect to ::test namespace 2021-08-14 13:24:41 -07:00
mlir-shlib [MLIR] Reapply: Adjust libMLIR building to more closely follow libClang 2020-05-04 20:47:57 -07:00
mlir-spirv-cpu-runner Reland [mlir] Remove uses of LLVM's legacy pass manager 2022-04-11 16:53:32 -07:00
mlir-tblgen Apply clang-tidy fixes for readability-identifier-naming in OpFormatGen.cpp (NFC) 2022-04-16 06:36:12 +00:00
mlir-translate [mlir][NFC] Move Translation.h to a Tools/mlir-translate directory 2022-03-07 01:05:38 -08:00
mlir-vulkan-runner Reland [mlir] Remove uses of LLVM's legacy pass manager 2022-04-11 16:53:32 -07:00
CMakeLists.txt [mlir] Add simple fuzzer for textual format 2022-03-23 14:33:50 -07:00