forked from OSchip/llvm-project
5e55a20119
The previous "optimization" that tries to reuse existing block for selection header block can be problematic for deserialization because it effectively pulls in previous ops in the selection op's enclosing block into the selection op's header. When deserializing, those ops will be placed in the selection op's region. If any of the previous ops has usage after the section op, it will break. That is, the following IR cannot round trip: ```mlir ^bb: %def = ... spv.mlir.selection { ... } %use = spv.SomeOp %def ``` This commit removes the "optimization" to always create new blocks for the selection header. Along the way, also made error reporting better in deserialization by turning asserts into proper errors and add check of uses outside of sinked structured control flow region blocks. Reviewed By: Hardcode84 Differential Revision: https://reviews.llvm.org/D115582 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Serialization.cpp | ||
SerializeOps.cpp | ||
Serializer.cpp | ||
Serializer.h |