Fix CMake configuration after introduction of LICM and LoopLikeInterface
authorMehdi Amini <aminim@google.com>
Wed, 16 Oct 2019 15:36:51 +0000 (08:36 -0700)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Wed, 16 Oct 2019 15:37:39 +0000 (08:37 -0700)
b843cc5d5a introduced a new op LICM transformation and a LoopLike interface,
but missed the CMake aspects of it. This should fix the build.

PiperOrigin-RevId: 275038533

mlir/include/mlir/CMakeLists.txt
mlir/include/mlir/Transforms/CMakeLists.txt [new file with mode: 0644]
mlir/lib/Dialect/AffineOps/CMakeLists.txt
mlir/lib/Dialect/LoopOps/CMakeLists.txt
mlir/lib/Transforms/CMakeLists.txt

index ccaa717..1a5094d 100644 (file)
@@ -1,3 +1,4 @@
 add_subdirectory(Analysis)
 add_subdirectory(Dialect)
 add_subdirectory(EDSC)
+add_subdirectory(Transforms)
diff --git a/mlir/include/mlir/Transforms/CMakeLists.txt b/mlir/include/mlir/Transforms/CMakeLists.txt
new file mode 100644 (file)
index 0000000..9ac003a
--- /dev/null
@@ -0,0 +1,6 @@
+set(LLVM_TARGET_DEFINITIONS LoopLikeInterface.td)
+mlir_tablegen(LoopLikeInterface.h.inc -gen-op-interface-decls)
+mlir_tablegen(LoopLikeInterface.cpp.inc -gen-op-interface-defs)
+add_public_tablegen_target(MLIRLoopLikeInterfaceIncGen)
+
+
index dbe4693..97d954b 100644 (file)
@@ -5,6 +5,10 @@ add_llvm_library(MLIRAffineOps
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/AffineOps
   )
-add_dependencies(MLIRAffineOps MLIRAffineOpsIncGen MLIRIR MLIRStandardOps)
+add_dependencies(MLIRAffineOps
+  MLIRAffineOpsIncGen
+  MLIRIR
+  MLIRLoopLikeInterfaceIncGen
+  MLIRStandardOps)
 target_link_libraries(MLIRAffineOps MLIRIR MLIRStandardOps)
 
index ce4a666..995e744 100644 (file)
@@ -5,5 +5,5 @@ add_llvm_library(MLIRLoopOps
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/LoopOps
   )
-add_dependencies(MLIRLoopOps MLIRLoopOpsIncGen MLIRStandardOps LLVMSupport)
+add_dependencies(MLIRLoopOps MLIRLoopLikeInterfaceIncGen MLIRLoopOpsIncGen MLIRStandardOps LLVMSupport)
 target_link_libraries(MLIRLoopOps LLVMSupport)
index 184a6f9..10daf85 100644 (file)
@@ -2,6 +2,7 @@ add_subdirectory(Utils)
 
 add_llvm_library(MLIRTransforms
   AffineDataCopyGeneration.cpp
+  AffineLoopInvariantCodeMotion.cpp
   Canonicalizer.cpp
   CSE.cpp
   DialectConversion.cpp
@@ -27,7 +28,9 @@ add_llvm_library(MLIRTransforms
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms
   )
 
-add_dependencies(MLIRTransforms MLIRStandardOpsIncGen)
+add_dependencies(MLIRTransforms
+  MLIRLoopLikeInterfaceIncGen
+  MLIRStandardOpsIncGen)
 target_link_libraries(MLIRTransforms
   MLIRAffineOps
   MLIRAnalysis