[MLIR][SPIRVToLLVM] Implementation of SPIR-V module conversion pattern
authorGeorge Mitenkov <georgemitenk0v@gmail.com>
Thu, 25 Jun 2020 00:42:39 +0000 (20:42 -0400)
committerLei Zhang <antiagainst@google.com>
Thu, 25 Jun 2020 00:42:50 +0000 (20:42 -0400)
commitb5c24c24a473d7e0f3ae04101c54c08cbdc8d190
tree4179609dd08a00e27abc8f7ea5ebc1c801f31f2d
parente6a343e491d4ee52b4085bf2b2c24669f1f9a6ce
[MLIR][SPIRVToLLVM] Implementation of SPIR-V module conversion pattern

This patch introduces conversion patterns for `spv.module` and `spv._module_end`.
SPIR-V module is converted into `ModuleOp`. This will play a role of enclosing
scope to LLVM ops. At the moment, SPIR-V module attributes (such as memory model,
etc) are ignored.

Differential Revision: https://reviews.llvm.org/D82468
mlir/include/mlir/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.h
mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp
mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVMPass.cpp
mlir/test/Conversion/SPIRVToLLVM/module-ops-to-llvm.mlir [new file with mode: 0644]