[MLIR] Remove redundant library dependencies
authorStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Thu, 20 Feb 2020 06:56:38 +0000 (22:56 -0800)
committerStephen Neuendorffer <stephen.neuendorffer@xilinx.com>
Sat, 29 Feb 2020 18:47:27 +0000 (10:47 -0800)
In cmake, it is redundant to have a target list under target_link_libraries()
and add_dependency().  This patch removes the redundant dependency from
add_dependency().

Differential Revision: https://reviews.llvm.org/D74929

24 files changed:
mlir/lib/Analysis/CMakeLists.txt
mlir/lib/Conversion/AffineToStandard/CMakeLists.txt
mlir/lib/Conversion/LoopToStandard/CMakeLists.txt
mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt
mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt
mlir/lib/Dialect/AffineOps/CMakeLists.txt
mlir/lib/Dialect/FxpMathOps/CMakeLists.txt
mlir/lib/Dialect/GPU/CMakeLists.txt
mlir/lib/Dialect/LLVMIR/CMakeLists.txt
mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt
mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt
mlir/lib/Dialect/Linalg/IR/CMakeLists.txt
mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt
mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt
mlir/lib/Dialect/LoopOps/CMakeLists.txt
mlir/lib/Dialect/QuantOps/CMakeLists.txt
mlir/lib/Dialect/SDBM/CMakeLists.txt
mlir/lib/Dialect/StandardOps/CMakeLists.txt
mlir/lib/EDSC/CMakeLists.txt
mlir/lib/IR/CMakeLists.txt
mlir/lib/Parser/CMakeLists.txt
mlir/lib/Pass/CMakeLists.txt
mlir/lib/Quantizer/CMakeLists.txt
mlir/test/lib/IR/CMakeLists.txt

index 23dcd05..8c04988 100644 (file)
@@ -31,10 +31,8 @@ add_llvm_library(MLIRAnalysis
   LLVMSupport
   )
 add_dependencies(MLIRAnalysis
-  MLIRAffineOps
   MLIRCallOpInterfacesIncGen
   MLIRTypeInferOpInterfaceIncGen
-  MLIRLoopOps
   )
 
 add_llvm_library(MLIRLoopAnalysis
@@ -56,8 +54,6 @@ add_llvm_library(MLIRLoopAnalysis
   LLVMSupport
   )
 add_dependencies(MLIRLoopAnalysis
-  MLIRAffineOps
   MLIRCallOpInterfacesIncGen
   MLIRTypeInferOpInterfaceIncGen
-  MLIRLoopOps
   )
index 73ea74d..8f4e00e 100644 (file)
@@ -14,12 +14,3 @@ add_mlir_conversion_library(MLIRAffineToStandard
   LLVMCore
   LLVMSupport
   )
-add_dependencies(
-  MLIRAffineToStandard
-
-  MLIRAffineOps
-  MLIRStandardOps
-  MLIRIR
-  LLVMCore
-  LLVMSupport
-)
index db17dd8..b027485 100644 (file)
@@ -13,11 +13,3 @@ add_mlir_conversion_library(MLIRLoopToStandard
   LLVMCore
   LLVMSupport
   )
-add_dependencies(
-  MLIRLoopToStandard
-
-  MLIRLoopOps
-  MLIRTransforms
-  LLVMCore
-  LLVMSupport
-)
index 739c5b8..a23fc13 100644 (file)
@@ -1,4 +1,11 @@
-set(LIBS
+add_mlir_conversion_library(MLIRLoopsToGPU
+  LoopsToGPU.cpp
+  LoopsToGPUPass.cpp
+
+  ADDITIONAL_HEADER_DIRS
+  ${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/LoopsToGPU
+
+  LINK_LIBS
   MLIRAffineOps
   MLIRAffineToStandard
   MLIRGPU
@@ -11,16 +18,4 @@ set(LIBS
   MLIRTransforms
   MLIRTransformUtils
   LLVMSupport
-)
-
-add_mlir_conversion_library(MLIRLoopsToGPU
-  LoopsToGPU.cpp
-  LoopsToGPUPass.cpp
-
-  ADDITIONAL_HEADER_DIRS
-  ${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/LoopsToGPU
-
-  LINK_LIBS
-  ${LIBS}
   )
-add_dependencies(MLIRLoopsToGPU ${LIBS})
index 36f9d60..904ad37 100644 (file)
@@ -13,11 +13,3 @@ add_mlir_conversion_library(MLIRStandardToLLVM
   LLVMCore
   LLVMSupport
   )
-add_dependencies(
-  MLIRStandardToLLVM
-
-  MLIRLLVMIR
-  MLIRTransforms
-  LLVMCore
-  LLVMSupport
-)
index 749e7e2..51017de 100644 (file)
@@ -13,10 +13,6 @@ add_mlir_dialect_library(MLIRAffineOps
   LLVMSupport
   )
 add_dependencies(MLIRAffineOps
-
   MLIRAffineOpsIncGen
-  MLIREDSC
-  MLIRIR
   MLIRLoopLikeInterfaceIncGen
-  MLIRStandardOps
   )
index e631fc6..0572901 100644 (file)
@@ -16,9 +16,5 @@ add_mlir_dialect_library(MLIRFxpMathOps
   LLVMSupport
   )
 add_dependencies(MLIRFxpMathOps
-                 MLIRFxpMathOpsIncGen
-                 MLIRQuantOps
-                 MLIRIR
-                 MLIRPass
-                 MLIRSupport
-                 MLIRStandardOps)
+  MLIRFxpMathOpsIncGen
+  )
index 595f8b7..018291a 100644 (file)
@@ -21,10 +21,4 @@ add_mlir_dialect_library(MLIRGPU
   )
 add_dependencies(MLIRGPU
   MLIRGPUOpsIncGen
-  MLIREDSC
-  MLIRIR
-  MLIRLLVMIR
-  MLIRLoopOps
-  MLIRSupport
-  MLIRTransformUtils
-  LLVMSupport)
+  )
index eb32510..71465c1 100644 (file)
@@ -11,7 +11,10 @@ add_mlir_dialect_library(MLIRLLVMIR
   MLIRIR
   MLIRSupport
   )
-add_dependencies(MLIRLLVMIR MLIRLLVMOpsIncGen MLIRLLVMConversionsIncGen LLVMAsmParser LLVMCore LLVMSupport)
+add_dependencies(MLIRLLVMIR
+  MLIRLLVMOpsIncGen
+  MLIRLLVMConversionsIncGen
+  )
 
 add_mlir_dialect_library(MLIRNVVMIR
   IR/NVVMDialect.cpp
@@ -26,7 +29,11 @@ add_mlir_dialect_library(MLIRNVVMIR
   LLVMSupport
   LLVMCore
   )
-add_dependencies(MLIRNVVMIR MLIRNVVMOpsIncGen MLIRNVVMConversionsIncGen LLVMAsmParser LLVMCore LLVMSupport)
+add_dependencies(MLIRNVVMIR
+  MLIRNVVMOpsIncGen
+  MLIRNVVMConversionsIncGen
+  )
+
 
 
 add_mlir_dialect_library(MLIRROCDLIR
@@ -41,4 +48,7 @@ add_mlir_dialect_library(MLIRROCDLIR
   LLVMSupport
   MLIRIR
   )
-add_dependencies(MLIRROCDLIR MLIRROCDLOpsIncGen MLIRROCDLConversionsIncGen LLVMAsmParser LLVMCore LLVMSupport)
+add_dependencies(MLIRROCDLIR
+  MLIRROCDLOpsIncGen
+  MLIRROCDLConversionsIncGen
+  )
index 629e071..53a9c79 100644 (file)
@@ -1,21 +1,15 @@
-set(LIBS
-  MLIRIR
-  MLIRLinalgOps
-  MLIRStandardOps
-  LLVMSupport
-  )
-
-
 add_mlir_dialect_library(MLIRLinalgAnalysis
   DependenceAnalysis.cpp
   
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
+
   DEPENDS
   intrinsics_gen
 
   LINK_LIBS
-  ${LIBS}
+  MLIRIR
+  MLIRLinalgOps
+  MLIRStandardOps
+  LLVMSupport
   )
-
-add_dependencies(MLIRLinalgAnalysis ${LIBS})
index 6c0cc3c..e6b3479 100644 (file)
@@ -1,24 +1,18 @@
-set(LIBS
-
-  MLIREDSC
-  MLIRIR
-  MLIRAffineOps
-  MLIRLinalgOps
-  MLIRLoopOps
-  MLIRStandardOps
-  LLVMSupport
-  )
-
 add_mlir_dialect_library(MLIRLinalgEDSC
   Builders.cpp
 
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
+
   DEPENDS
   intrinsics_gen
 
   LINK_LIBS
-  ${LIBS}
+  MLIREDSC
+  MLIRIR
+  MLIRAffineOps
+  MLIRLinalgOps
+  MLIRLoopOps
+  MLIRStandardOps
+  LLVMSupport
   )
-
-add_dependencies(MLIRLinalgEDSC ${LIBS})
index 3988daa..70daa7c 100644 (file)
@@ -1,16 +1,10 @@
-set(LIBS
-  MLIRIR
-  MLIRStandardOps
-  MLIRSupport
-  LLVMSupport
-  )
-
 add_mlir_dialect_library(MLIRLinalgOps
   LinalgOps.cpp
   LinalgTypes.cpp
 
   ADDITIONAL_HEADER_DIRS
   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
+
   DEPENDS
   intrinsics_gen
 
@@ -20,10 +14,7 @@ add_mlir_dialect_library(MLIRLinalgOps
   MLIRSupport
   LLVMSupport
   )
-
 add_dependencies(MLIRLinalgOps
-
-  ${LIBS}
   MLIRLinalgOpsIncGen
   MLIRLinalgStructuredOpsIncGen
   MLIRLinalgStructuredOpsInterfaceIncGen
index 5c1df04..7287324 100644 (file)
@@ -1,5 +1,16 @@
-set(LIBS
+add_mlir_dialect_library(MLIRLinalgTransforms
+  Fusion.cpp
+  LinalgTransforms.cpp
+  LinalgToLoops.cpp
+  Promotion.cpp
+  Tiling.cpp
 
+  ADDITIONAL_HEADER_DIRS
+  ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
+  DEPENDS
+  intrinsics_gen
+
+  LINK_LIBS
   MLIRAffineOps
   MLIRAnalysis
   MLIREDSC
@@ -16,25 +27,6 @@ set(LIBS
   MLIRVectorOps
   LLVMSupport
   )
-
-add_mlir_dialect_library(MLIRLinalgTransforms
-  Fusion.cpp
-  LinalgTransforms.cpp
-  LinalgToLoops.cpp
-  Promotion.cpp
-  Tiling.cpp
-
-  ADDITIONAL_HEADER_DIRS
-  ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
-  DEPENDS
-  intrinsics_gen
-
-  LINK_LIBS
-  ${LIBS}
-  )
-
 add_dependencies(MLIRLinalgTransforms
-
-  ${LIBS}
   MLIRLinalgTransformPatternsIncGen
   )
index 2bf36d0..754688f 100644 (file)
@@ -1,4 +1,13 @@
-set(LIBS
+add_mlir_dialect_library(MLIRLinalgUtils
+  Utils.cpp
+
+  ADDITIONAL_HEADER_DIRS
+  ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
+
+  DEPENDS
+  intrinsics_gen
+
+  LINK_LIBS
   MLIRAffineOps
   MLIREDSC
   MLIRIR
@@ -9,17 +18,3 @@ set(LIBS
   MLIRTransformUtils
   LLVMSupport
   )
-
-add_mlir_dialect_library(MLIRLinalgUtils
-
-  Utils.cpp
-
-  ADDITIONAL_HEADER_DIRS
-  ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
-  DEPENDS
-  intrinsics_gen
-
-  LINK_LIBS
-  ${LIBS})
-
-add_dependencies(MLIRLinalgUtils ${LIBS})
index e228654..635bbde 100644 (file)
@@ -13,12 +13,8 @@ add_mlir_dialect_library(MLIRLoopOps
   LLVMSupport
   )
 add_dependencies(MLIRLoopOps
-
-  MLIREDSC
   MLIRLoopLikeInterfaceIncGen
   MLIRLoopOpsIncGen
-  MLIRStandardOps
-  LLVMSupport
   )
 
 add_subdirectory(Transforms)
index 14acb91..c9d1041 100644 (file)
@@ -21,8 +21,5 @@ add_mlir_dialect_library(MLIRQuantOps
   LLVMSupport
   )
 add_dependencies(MLIRQuantOps
-                 MLIRIR
-                 MLIRPass
-                 MLIRQuantOpsIncGen
-                 MLIRSupport
-                 MLIRStandardOps)
+  MLIRQuantOpsIncGen
+  )
index b75e257..2c753d6 100644 (file)
@@ -10,4 +10,3 @@ add_mlir_dialect_library(MLIRSDBM
   MLIRSupport
   LLVMSupport
   )
-add_dependencies(MLIRSDBM MLIRIR)
index e802e0c..acf47df 100644 (file)
@@ -14,10 +14,6 @@ add_mlir_dialect_library(MLIRStandardOps
   LLVMSupport
   )
 add_dependencies(MLIRStandardOps
-
   MLIRCallOpInterfacesIncGen
-  MLIREDSC
-  MLIRIR
   MLIRStandardOpsIncGen
-  LLVMSupport
   )
index 3d0290a..660efc5 100644 (file)
@@ -27,4 +27,3 @@ add_llvm_library(MLIREDSCInterface
   MLIRParser
   LLVMSupport
   )
-add_dependencies(MLIREDSCInterface MLIRIR)
index 8802f6c..f3788e2 100644 (file)
@@ -10,4 +10,7 @@ add_llvm_library(MLIRIR
   LLVMSupport
   ${LLVM_PTHREAD_LIB}
   )
-add_dependencies(MLIRIR MLIRCallOpInterfacesIncGen MLIROpAsmInterfacesIncGen MLIRSupport LLVMSupport)
+add_dependencies(MLIRIR
+  MLIRCallOpInterfacesIncGen
+  MLIROpAsmInterfacesIncGen
+  )
index 36ede65..978a674 100644 (file)
@@ -11,4 +11,3 @@ add_llvm_library(MLIRParser
   MLIRAnalysis
   LLVMSupport
   )
-add_dependencies(MLIRParser MLIRIR MLIRAnalysis)
index 54407d9..9df404c 100644 (file)
@@ -12,4 +12,3 @@ add_llvm_library(MLIRPass
   LLVMIRReader
   LLVMSupport
   )
-add_dependencies(MLIRPass MLIRAnalysis MLIRIR LLVMSupport)
index d87b7da..34d0eff 100644 (file)
@@ -18,12 +18,6 @@ add_llvm_library(MLIRQuantizerSupport
   LLVMSupport
   )
 
-add_dependencies(MLIRQuantizerSupport
-                 MLIRIR
-                 MLIRQuantOps
-                 MLIRSupport
-                 MLIRStandardOps)
-
 # Configurations.
 add_llvm_library(MLIRQuantizerFxpMathConfig
   Configurations/FxpMathConfig.cpp
@@ -41,8 +35,8 @@ add_llvm_library(MLIRQuantizerFxpMathConfig
   )
 
 add_dependencies(MLIRQuantizerFxpMathConfig
-                 MLIRFxpMathOpsIncGen
-                 MLIRQuantizerSupport)
+  MLIRFxpMathOpsIncGen
+  )
 
 # Transforms.
 add_llvm_library(MLIRQuantizerTransforms
@@ -62,7 +56,3 @@ add_llvm_library(MLIRQuantizerTransforms
   MLIRTransformUtils
   LLVMSupport
   )
-add_dependencies(MLIRQuantizerTransforms
-  MLIRQuantizerFxpMathConfig
-  MLIRQuantizerSupport
-  MLIRPass)
index 355facc..121ba44 100644 (file)
@@ -13,6 +13,3 @@ add_llvm_library(MLIRTestIR
   )
 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../TestDialect)
 include_directories(${CMAKE_CURRENT_BINARY_DIR}/../TestDialect)
-add_dependencies(MLIRTestIR
-  MLIRTestDialect
-  )