forked from OSchip/llvm-project
[MLIR] Remove redundant library dependencies
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
This commit is contained in:
parent
2f265e3528
commit
e1cb15c8f9
|
@ -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
|
||||
)
|
||||
|
|
|
@ -14,12 +14,3 @@ add_mlir_conversion_library(MLIRAffineToStandard
|
|||
LLVMCore
|
||||
LLVMSupport
|
||||
)
|
||||
add_dependencies(
|
||||
MLIRAffineToStandard
|
||||
|
||||
MLIRAffineOps
|
||||
MLIRStandardOps
|
||||
MLIRIR
|
||||
LLVMCore
|
||||
LLVMSupport
|
||||
)
|
||||
|
|
|
@ -13,11 +13,3 @@ add_mlir_conversion_library(MLIRLoopToStandard
|
|||
LLVMCore
|
||||
LLVMSupport
|
||||
)
|
||||
add_dependencies(
|
||||
MLIRLoopToStandard
|
||||
|
||||
MLIRLoopOps
|
||||
MLIRTransforms
|
||||
LLVMCore
|
||||
LLVMSupport
|
||||
)
|
||||
|
|
|
@ -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})
|
||||
|
|
|
@ -13,11 +13,3 @@ add_mlir_conversion_library(MLIRStandardToLLVM
|
|||
LLVMCore
|
||||
LLVMSupport
|
||||
)
|
||||
add_dependencies(
|
||||
MLIRStandardToLLVM
|
||||
|
||||
MLIRLLVMIR
|
||||
MLIRTransforms
|
||||
LLVMCore
|
||||
LLVMSupport
|
||||
)
|
||||
|
|
|
@ -13,10 +13,6 @@ add_mlir_dialect_library(MLIRAffineOps
|
|||
LLVMSupport
|
||||
)
|
||||
add_dependencies(MLIRAffineOps
|
||||
|
||||
MLIRAffineOpsIncGen
|
||||
MLIREDSC
|
||||
MLIRIR
|
||||
MLIRLoopLikeInterfaceIncGen
|
||||
MLIRStandardOps
|
||||
)
|
||||
|
|
|
@ -16,9 +16,5 @@ add_mlir_dialect_library(MLIRFxpMathOps
|
|||
LLVMSupport
|
||||
)
|
||||
add_dependencies(MLIRFxpMathOps
|
||||
MLIRFxpMathOpsIncGen
|
||||
MLIRQuantOps
|
||||
MLIRIR
|
||||
MLIRPass
|
||||
MLIRSupport
|
||||
MLIRStandardOps)
|
||||
MLIRFxpMathOpsIncGen
|
||||
)
|
||||
|
|
|
@ -21,10 +21,4 @@ add_mlir_dialect_library(MLIRGPU
|
|||
)
|
||||
add_dependencies(MLIRGPU
|
||||
MLIRGPUOpsIncGen
|
||||
MLIREDSC
|
||||
MLIRIR
|
||||
MLIRLLVMIR
|
||||
MLIRLoopOps
|
||||
MLIRSupport
|
||||
MLIRTransformUtils
|
||||
LLVMSupport)
|
||||
)
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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})
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
set(LIBS
|
||||
add_mlir_dialect_library(MLIRLinalgEDSC
|
||||
Builders.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
|
||||
|
||||
DEPENDS
|
||||
intrinsics_gen
|
||||
|
||||
LINK_LIBS
|
||||
MLIREDSC
|
||||
MLIRIR
|
||||
MLIRAffineOps
|
||||
|
@ -8,17 +16,3 @@ set(LIBS
|
|||
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}
|
||||
)
|
||||
|
||||
add_dependencies(MLIRLinalgEDSC ${LIBS})
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
|
@ -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})
|
||||
|
|
|
@ -13,12 +13,8 @@ add_mlir_dialect_library(MLIRLoopOps
|
|||
LLVMSupport
|
||||
)
|
||||
add_dependencies(MLIRLoopOps
|
||||
|
||||
MLIREDSC
|
||||
MLIRLoopLikeInterfaceIncGen
|
||||
MLIRLoopOpsIncGen
|
||||
MLIRStandardOps
|
||||
LLVMSupport
|
||||
)
|
||||
|
||||
add_subdirectory(Transforms)
|
||||
|
|
|
@ -21,8 +21,5 @@ add_mlir_dialect_library(MLIRQuantOps
|
|||
LLVMSupport
|
||||
)
|
||||
add_dependencies(MLIRQuantOps
|
||||
MLIRIR
|
||||
MLIRPass
|
||||
MLIRQuantOpsIncGen
|
||||
MLIRSupport
|
||||
MLIRStandardOps)
|
||||
MLIRQuantOpsIncGen
|
||||
)
|
||||
|
|
|
@ -10,4 +10,3 @@ add_mlir_dialect_library(MLIRSDBM
|
|||
MLIRSupport
|
||||
LLVMSupport
|
||||
)
|
||||
add_dependencies(MLIRSDBM MLIRIR)
|
||||
|
|
|
@ -14,10 +14,6 @@ add_mlir_dialect_library(MLIRStandardOps
|
|||
LLVMSupport
|
||||
)
|
||||
add_dependencies(MLIRStandardOps
|
||||
|
||||
MLIRCallOpInterfacesIncGen
|
||||
MLIREDSC
|
||||
MLIRIR
|
||||
MLIRStandardOpsIncGen
|
||||
LLVMSupport
|
||||
)
|
||||
|
|
|
@ -27,4 +27,3 @@ add_llvm_library(MLIREDSCInterface
|
|||
MLIRParser
|
||||
LLVMSupport
|
||||
)
|
||||
add_dependencies(MLIREDSCInterface MLIRIR)
|
||||
|
|
|
@ -10,4 +10,7 @@ add_llvm_library(MLIRIR
|
|||
LLVMSupport
|
||||
${LLVM_PTHREAD_LIB}
|
||||
)
|
||||
add_dependencies(MLIRIR MLIRCallOpInterfacesIncGen MLIROpAsmInterfacesIncGen MLIRSupport LLVMSupport)
|
||||
add_dependencies(MLIRIR
|
||||
MLIRCallOpInterfacesIncGen
|
||||
MLIROpAsmInterfacesIncGen
|
||||
)
|
||||
|
|
|
@ -11,4 +11,3 @@ add_llvm_library(MLIRParser
|
|||
MLIRAnalysis
|
||||
LLVMSupport
|
||||
)
|
||||
add_dependencies(MLIRParser MLIRIR MLIRAnalysis)
|
||||
|
|
|
@ -12,4 +12,3 @@ add_llvm_library(MLIRPass
|
|||
LLVMIRReader
|
||||
LLVMSupport
|
||||
)
|
||||
add_dependencies(MLIRPass MLIRAnalysis MLIRIR LLVMSupport)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue