[spirv] Add spv.ReturnValue
authorLei Zhang <antiagainst@google.com>
Mon, 19 Aug 2019 17:57:43 +0000 (10:57 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Mon, 19 Aug 2019 17:58:10 +0000 (10:58 -0700)
commit64abcd983ddcde4b9f27377fd718d04e88e35ab9
treeda31ee4b67170fa8796abbaac034cc810afca677
parent9bf69e6a2e9d1ef60ac9e4efa8fda9b6c3560e63
[spirv] Add spv.ReturnValue

This CL adds the spv.ReturnValue op and its tests. Also adds a
InFunctionScope trait to make sure that the op stays inside
a function. To be consistent, ModuleOnly trait is changed to
InModuleScope.

PiperOrigin-RevId: 264193081
mlir/include/mlir/Dialect/SPIRV/SPIRVBase.td
mlir/include/mlir/Dialect/SPIRV/SPIRVOps.td
mlir/include/mlir/Dialect/SPIRV/SPIRVStructureOps.td
mlir/lib/Dialect/SPIRV/SPIRVOps.cpp
mlir/test/Dialect/SPIRV/Serialization/terminator.mlir [new file with mode: 0644]
mlir/test/Dialect/SPIRV/ops.mlir
mlir/test/Dialect/SPIRV/structure-ops.mlir