Add Conversion to lower loop::ForOp to spirv::LoopOp.
authorMahesh Ravishankar <ravishankarm@google.com>
Tue, 12 Nov 2019 19:32:54 +0000 (11:32 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Tue, 12 Nov 2019 19:33:27 +0000 (11:33 -0800)
commit104af84f4c8788da2d2202cac720fd7aa62b01cd
treede982c331738c1f6e694b1042a7f8ab4b699ae35
parentf4aca03232467174eaf734c3a201178970bdcef2
Add Conversion to lower loop::ForOp to spirv::LoopOp.

loop::ForOp can be lowered to the structured control flow represented
by spirv::LoopOp by making the continue block of the spirv::LoopOp the
loop latch and the merge block the exit block. The resulting
spirv::LoopOp has a single back edge from the continue to header
block, and a single exit from header to merge.
PiperOrigin-RevId: 280015614
mlir/lib/Conversion/GPUToSPIRV/GPUToSPIRV.cpp
mlir/test/Conversion/GPUToSPIRV/loop.mlir [new file with mode: 0644]