[MLIR][SPIRVToLLVM] Add skeleton for SPIR-V to LLVM dialect conversion
authorGeorge Mitenkov <georgemitenk0v@gmail.com>
Mon, 8 Jun 2020 22:20:52 +0000 (18:20 -0400)
committerLei Zhang <antiagainst@google.com>
Mon, 8 Jun 2020 22:22:42 +0000 (18:22 -0400)
commitfda5192d4fa67e44f211b1a5dc04168670aa86ef
treec6c247e6af11927899d70364afcb94fd09390d3e
parenta6d6b0ac93095571de743ea1f63f0b421687a275
[MLIR][SPIRVToLLVM] Add skeleton for SPIR-V to LLVM dialect conversion

These commits set up the skeleton for SPIR-V to LLVM dialect conversion.
I created SPIR-V to LLVM pass, registered it in Passes.td, InitAllPasses.h.
Added a pattern for `spv.BitwiseAndOp` and tests for it. Integer, float
and vector types are converted through LLVMTypeConverter.

Differential Revision: https://reviews.llvm.org/D81100
mlir/include/mlir/Conversion/Passes.td
mlir/include/mlir/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.h [new file with mode: 0644]
mlir/include/mlir/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVMPass.h [new file with mode: 0644]
mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h
mlir/include/mlir/InitAllPasses.h
mlir/lib/Conversion/CMakeLists.txt
mlir/lib/Conversion/SPIRVToLLVM/CMakeLists.txt [new file with mode: 0644]
mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVM.cpp [new file with mode: 0644]
mlir/lib/Conversion/SPIRVToLLVM/ConvertSPIRVToLLVMPass.cpp [new file with mode: 0644]
mlir/test/Conversion/SPIRVToLLVM/convert-to-llvm.mlir [new file with mode: 0644]