Add support for OpPhi in loop header block
authorLei Zhang <antiagainst@google.com>
Tue, 12 Nov 2019 19:59:34 +0000 (11:59 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Tue, 12 Nov 2019 20:00:28 +0000 (12:00 -0800)
commitb259c26eb0717b6962c2f75ac23a44491b27810d
treef5b93beb71a399ff72b73170c544b5b2065523f1
parent626e1fd95e626c47154c5fe5d546f3d36b39e319
Add support for OpPhi in loop header block

During deserialization, the loop header block will be moved into the
spv.loop's region. If the loop header block has block arguments,
we need to make sure it is correctly carried over to the block where
the new spv.loop resides.

During serialization, we need to make sure block arguments from the
spv.loop's entry block are not silently dropped.

PiperOrigin-RevId: 280021777
mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td
mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
mlir/lib/Dialect/SPIRV/Serialization/Deserializer.cpp
mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp
mlir/test/Dialect/SPIRV/Serialization/loop.mlir