[spirv] Move conversion passes to a new library
authorLei Zhang <antiagainst@google.com>
Fri, 28 Jun 2019 19:31:38 +0000 (12:31 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Fri, 28 Jun 2019 19:32:02 +0000 (12:32 -0700)
PiperOrigin-RevId: 255648303

mlir/lib/SPIRV/CMakeLists.txt
mlir/lib/SPIRV/Transforms/CMakeLists.txt [new file with mode: 0644]
mlir/tools/mlir-opt/CMakeLists.txt

index e06195f..6fcea12 100644 (file)
@@ -3,7 +3,6 @@ add_llvm_library(MLIRSPIRV
   SPIRVDialect.cpp
   SPIRVOps.cpp
   SPIRVTypes.cpp
-  Transforms/StdOpsToSPIRVConversion.cpp
 
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/SPIRV
@@ -11,12 +10,12 @@ add_llvm_library(MLIRSPIRV
 
 add_dependencies(MLIRSPIRV
   MLIRSPIRVOpsIncGen
-  MLIRSPIRVEnumsIncGen
-  MLIRStdOpsToSPIRVConversionIncGen)
+  MLIRSPIRVEnumsIncGen)
 
 target_link_libraries(MLIRSPIRV
   MLIRIR
   MLIRParser
   MLIRSupport)
 
+add_subdirectory(Transforms)
 add_subdirectory(Serialization)
diff --git a/mlir/lib/SPIRV/Transforms/CMakeLists.txt b/mlir/lib/SPIRV/Transforms/CMakeLists.txt
new file mode 100644 (file)
index 0000000..93b6857
--- /dev/null
@@ -0,0 +1,15 @@
+add_llvm_library(MLIRSPIRVConversion
+  StdOpsToSPIRVConversion.cpp
+
+  ADDITIONAL_HEADER_DIRS
+  ${MLIR_MAIN_INCLUDE_DIR}/mlir/SPIRV
+  )
+
+add_dependencies(MLIRSPIRVConversion
+  MLIRStdOpsToSPIRVConversionIncGen)
+
+target_link_libraries(MLIRSPIRVConversion
+  MLIRIR
+  MLIRPass
+  MLIRSPIRV
+  MLIRSupport)
index 83a5225..1608e36 100644 (file)
@@ -32,6 +32,7 @@ set(LIBS
   MLIRQuantizerTransforms
   MLIRQuantOps
   MLIRSPIRV
+  MLIRSPIRVConversion
   MLIRStandardOps
   MLIRStandardToLLVM
   MLIRTransforms