This commit shuffles SPIR-V code around to better follow MLIR
convention. Specifically,
* Created IR/, Transforms/, Linking/, and Utils/ subdirectories and
moved suitable code inside.
* Created SPIRVEnums.{h|cpp} for SPIR-V C/C++ enums generated from
SPIR-V spec. Previously they are cluttered inside SPIRVTypes.{h|cpp}.
* Fixed include guards in various header files (both .h and .td).
* Moved serialization tests under test/Target/SPIRV.
* Renamed TableGen backend -gen-spirv-op-utils into -gen-spirv-attr-utils
as it is only generating utility functions for attributes.
Reviewed By: mravishankar
Differential Revision: https://reviews.llvm.org/D93407
37 lines
692 B
CMake
37 lines
692 B
CMake
set(LLVM_OPTIONAL_SOURCES
|
|
DecorateCompositeTypeLayoutPass.cpp
|
|
LowerABIAttributesPass.cpp
|
|
RewriteInsertsPass.cpp
|
|
SPIRVConversion.cpp
|
|
UpdateVCEPass.cpp
|
|
)
|
|
|
|
add_mlir_dialect_library(MLIRSPIRVConversion
|
|
SPIRVConversion.cpp
|
|
|
|
ADDITIONAL_HEADER_DIRS
|
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SPIRV
|
|
|
|
LINK_LIBS PUBLIC
|
|
MLIRSPIRV
|
|
MLIRTransformUtils
|
|
)
|
|
|
|
add_mlir_dialect_library(MLIRSPIRVTransforms
|
|
DecorateCompositeTypeLayoutPass.cpp
|
|
LowerABIAttributesPass.cpp
|
|
RewriteInsertsPass.cpp
|
|
UpdateVCEPass.cpp
|
|
|
|
ADDITIONAL_HEADER_DIRS
|
|
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SPIRV
|
|
|
|
DEPENDS
|
|
MLIRSPIRVPassIncGen
|
|
|
|
LINK_LIBS PUBLIC
|
|
MLIRPass
|
|
MLIRSPIRVConversion
|
|
MLIRSPIRVUtils
|
|
)
|