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
3ed02340ea
commit
2488016bae
|
@ -26,11 +26,9 @@ add_llvm_library(MLIRAnalysis
|
|||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis
|
||||
)
|
||||
add_dependencies(MLIRAnalysis
|
||||
MLIRAffineOps
|
||||
MLIRCallOpInterfacesIncGen
|
||||
MLIRControlFlowInterfacesIncGen
|
||||
MLIRTypeInferOpInterfaceIncGen
|
||||
MLIRLoopOps
|
||||
)
|
||||
|
||||
target_link_libraries(MLIRAnalysis
|
||||
|
@ -50,11 +48,9 @@ add_llvm_library(MLIRLoopAnalysis
|
|||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Analysis
|
||||
)
|
||||
add_dependencies(MLIRLoopAnalysis
|
||||
MLIRAffineOps
|
||||
MLIRCallOpInterfacesIncGen
|
||||
MLIRControlFlowInterfacesIncGen
|
||||
MLIRTypeInferOpInterfaceIncGen
|
||||
MLIRLoopOps
|
||||
)
|
||||
|
||||
target_link_libraries(MLIRLoopAnalysis
|
||||
|
|
|
@ -4,15 +4,6 @@ add_mlir_conversion_library(MLIRAffineToStandard
|
|||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/AffineToStandard
|
||||
)
|
||||
add_dependencies(
|
||||
MLIRAffineToStandard
|
||||
|
||||
MLIRAffineOps
|
||||
MLIRStandardOps
|
||||
MLIRIR
|
||||
LLVMCore
|
||||
LLVMSupport
|
||||
)
|
||||
target_link_libraries(
|
||||
MLIRAffineToStandard
|
||||
PUBLIC
|
||||
|
@ -24,4 +15,4 @@ target_link_libraries(
|
|||
MLIRIR
|
||||
LLVMCore
|
||||
LLVMSupport
|
||||
)
|
||||
)
|
||||
|
|
|
@ -4,14 +4,6 @@ add_mlir_conversion_library(MLIRLoopToStandard
|
|||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/LoopToStandard
|
||||
)
|
||||
add_dependencies(
|
||||
MLIRLoopToStandard
|
||||
|
||||
MLIRLoopOps
|
||||
MLIRTransforms
|
||||
LLVMCore
|
||||
LLVMSupport
|
||||
)
|
||||
target_link_libraries(
|
||||
MLIRLoopToStandard
|
||||
PUBLIC
|
||||
|
@ -19,4 +11,4 @@ target_link_libraries(
|
|||
MLIRTransforms
|
||||
LLVMCore
|
||||
LLVMSupport
|
||||
)
|
||||
)
|
||||
|
|
|
@ -1,4 +1,12 @@
|
|||
set(LIBS
|
||||
add_mlir_conversion_library(MLIRLoopsToGPU
|
||||
LoopsToGPU.cpp
|
||||
LoopsToGPUPass.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/LoopsToGPU
|
||||
)
|
||||
target_link_libraries(MLIRLoopsToGPU
|
||||
PUBLIC
|
||||
MLIRAffineOps
|
||||
MLIRAffineToStandard
|
||||
MLIRGPU
|
||||
|
@ -9,16 +17,4 @@ set(LIBS
|
|||
MLIRSupport
|
||||
MLIRTransforms
|
||||
LLVMSupport
|
||||
)
|
||||
|
||||
add_mlir_conversion_library(MLIRLoopsToGPU
|
||||
LoopsToGPU.cpp
|
||||
LoopsToGPUPass.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/LoopsToGPU
|
||||
)
|
||||
add_dependencies(MLIRLoopsToGPU ${LIBS})
|
||||
target_link_libraries(MLIRLoopsToGPU
|
||||
PUBLIC
|
||||
${LIBS})
|
||||
)
|
||||
|
|
|
@ -4,14 +4,6 @@ add_mlir_conversion_library(MLIRStandardToLLVM
|
|||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/StandardToLLVM
|
||||
)
|
||||
add_dependencies(
|
||||
MLIRStandardToLLVM
|
||||
|
||||
MLIRLLVMIR
|
||||
MLIRTransforms
|
||||
LLVMCore
|
||||
LLVMSupport
|
||||
)
|
||||
target_link_libraries(
|
||||
MLIRStandardToLLVM
|
||||
PUBLIC
|
||||
|
@ -19,4 +11,4 @@ target_link_libraries(
|
|||
MLIRTransforms
|
||||
LLVMCore
|
||||
LLVMSupport
|
||||
)
|
||||
)
|
||||
|
|
|
@ -7,12 +7,8 @@ add_mlir_dialect_library(MLIRAffineOps
|
|||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/AffineOps
|
||||
)
|
||||
add_dependencies(MLIRAffineOps
|
||||
|
||||
MLIRAffineOpsIncGen
|
||||
MLIREDSC
|
||||
MLIRIR
|
||||
MLIRLoopLikeInterfaceIncGen
|
||||
MLIRStandardOps
|
||||
)
|
||||
target_link_libraries(MLIRAffineOps
|
||||
PUBLIC
|
||||
|
|
|
@ -15,9 +15,5 @@ target_link_libraries(MLIRFxpMathOps
|
|||
MLIRStandardOps
|
||||
)
|
||||
add_dependencies(MLIRFxpMathOps
|
||||
MLIRFxpMathOpsIncGen
|
||||
MLIRQuantOps
|
||||
MLIRIR
|
||||
MLIRPass
|
||||
MLIRSupport
|
||||
MLIRStandardOps)
|
||||
MLIRFxpMathOpsIncGen
|
||||
)
|
||||
|
|
|
@ -10,13 +10,7 @@ add_mlir_dialect_library(MLIRGPU
|
|||
)
|
||||
add_dependencies(MLIRGPU
|
||||
MLIRGPUOpsIncGen
|
||||
MLIREDSC
|
||||
MLIRIR
|
||||
MLIRLLVMIR
|
||||
MLIRLoopOps
|
||||
MLIRSupport
|
||||
MLIRTransformUtils
|
||||
LLVMSupport)
|
||||
)
|
||||
target_link_libraries(MLIRGPU
|
||||
PUBLIC
|
||||
MLIREDSC
|
||||
|
|
|
@ -4,7 +4,11 @@ add_mlir_dialect_library(MLIRLLVMIR
|
|||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/LLVMIR
|
||||
)
|
||||
add_dependencies(MLIRLLVMIR MLIRControlFlowInterfacesIncGen MLIRLLVMOpsIncGen MLIRLLVMConversionsIncGen MLIROpenMP LLVMFrontendOpenMP LLVMAsmParser LLVMCore LLVMSupport)
|
||||
add_dependencies(MLIRLLVMIR
|
||||
MLIRControlFlowInterfacesIncGen
|
||||
MLIRLLVMOpsIncGen
|
||||
MLIRLLVMConversionsIncGen
|
||||
)
|
||||
target_link_libraries(MLIRLLVMIR
|
||||
PUBLIC
|
||||
LLVMAsmParser
|
||||
|
@ -12,7 +16,9 @@ target_link_libraries(MLIRLLVMIR
|
|||
LLVMSupport
|
||||
LLVMFrontendOpenMP
|
||||
MLIROpenMP
|
||||
MLIRIR)
|
||||
MLIRIR
|
||||
MLIRSupport
|
||||
)
|
||||
|
||||
add_mlir_dialect_library(MLIRNVVMIR
|
||||
IR/NVVMDialect.cpp
|
||||
|
@ -20,14 +26,18 @@ add_mlir_dialect_library(MLIRNVVMIR
|
|||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/LLVMIR
|
||||
)
|
||||
add_dependencies(MLIRNVVMIR MLIRNVVMOpsIncGen MLIRNVVMConversionsIncGen LLVMAsmParser LLVMCore LLVMSupport)
|
||||
add_dependencies(MLIRNVVMIR
|
||||
MLIRNVVMOpsIncGen
|
||||
MLIRNVVMConversionsIncGen
|
||||
)
|
||||
target_link_libraries(MLIRNVVMIR
|
||||
PUBLIC
|
||||
LLVMAsmParser
|
||||
MLIRIR
|
||||
MLIRLLVMIR
|
||||
LLVMSupport
|
||||
LLVMCore)
|
||||
LLVMCore
|
||||
)
|
||||
|
||||
add_mlir_dialect_library(MLIRROCDLIR
|
||||
IR/ROCDLDialect.cpp
|
||||
|
@ -35,10 +45,14 @@ add_mlir_dialect_library(MLIRROCDLIR
|
|||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/LLVMIR
|
||||
)
|
||||
add_dependencies(MLIRROCDLIR MLIRROCDLOpsIncGen MLIRROCDLConversionsIncGen LLVMAsmParser LLVMCore LLVMSupport)
|
||||
add_dependencies(MLIRROCDLIR
|
||||
MLIRROCDLOpsIncGen
|
||||
MLIRROCDLConversionsIncGen
|
||||
)
|
||||
target_link_libraries(MLIRROCDLIR
|
||||
PUBLIC
|
||||
LLVMAsmParser
|
||||
LLVMCore
|
||||
LLVMSupport
|
||||
MLIRIR)
|
||||
MLIRIR
|
||||
)
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
set(LIBS
|
||||
|
||||
MLIRLinalgOps
|
||||
MLIRStandardOps
|
||||
)
|
||||
|
||||
|
||||
add_mlir_dialect_library(MLIRLinalgAnalysis
|
||||
DependenceAnalysis.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
|
||||
|
||||
DEPENDS
|
||||
intrinsics_gen
|
||||
)
|
||||
|
||||
add_dependencies(MLIRLinalgAnalysis ${LIBS})
|
||||
target_link_libraries(MLIRLinalgAnalysis
|
||||
PUBLIC
|
||||
${LIBS})
|
||||
MLIRIR
|
||||
MLIRLinalgOps
|
||||
MLIRStandardOps
|
||||
LLVMSupport
|
||||
)
|
||||
|
|
|
@ -1,23 +1,20 @@
|
|||
set(LIBS
|
||||
add_mlir_dialect_library(MLIRLinalgEDSC
|
||||
Builders.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
|
||||
|
||||
DEPENDS
|
||||
intrinsics_gen
|
||||
)
|
||||
|
||||
target_link_libraries(MLIRLinalgEDSC
|
||||
PUBLIC
|
||||
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
|
||||
)
|
||||
|
||||
add_dependencies(MLIRLinalgEDSC ${LIBS})
|
||||
target_link_libraries(MLIRLinalgEDSC
|
||||
PUBLIC
|
||||
${LIBS})
|
||||
|
|
|
@ -1,26 +1,20 @@
|
|||
set(LIBS
|
||||
|
||||
MLIRIR
|
||||
MLIRStandardOps
|
||||
)
|
||||
|
||||
add_mlir_dialect_library(MLIRLinalgOps
|
||||
LinalgOps.cpp
|
||||
LinalgTypes.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg
|
||||
|
||||
DEPENDS
|
||||
intrinsics_gen
|
||||
)
|
||||
|
||||
add_dependencies(MLIRLinalgOps
|
||||
|
||||
${LIBS}
|
||||
MLIRLinalgOpsIncGen
|
||||
MLIRLinalgStructuredOpsIncGen
|
||||
MLIRLinalgStructuredOpsInterfaceIncGen
|
||||
)
|
||||
target_link_libraries(MLIRLinalgOps
|
||||
PUBLIC
|
||||
${LIBS})
|
||||
MLIRIR
|
||||
MLIRStandardOps
|
||||
)
|
||||
|
|
|
@ -1,5 +1,21 @@
|
|||
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
|
||||
)
|
||||
|
||||
add_dependencies(MLIRLinalgTransforms
|
||||
MLIRLinalgTransformPatternsIncGen
|
||||
)
|
||||
target_link_libraries(MLIRLinalgTransforms
|
||||
PUBLIC
|
||||
MLIRAffineOps
|
||||
MLIRAnalysis
|
||||
MLIREDSC
|
||||
|
@ -15,25 +31,3 @@ set(LIBS
|
|||
MLIRTransformUtils
|
||||
MLIRVectorOps
|
||||
)
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
add_dependencies(MLIRLinalgTransforms
|
||||
|
||||
${LIBS}
|
||||
MLIRLinalgTransformPatternsIncGen
|
||||
)
|
||||
target_link_libraries(MLIRLinalgTransforms
|
||||
PUBLIC
|
||||
${LIBS})
|
||||
|
|
|
@ -1,16 +1,4 @@
|
|||
set(LIBS
|
||||
|
||||
MLIREDSC
|
||||
MLIRIR
|
||||
MLIRLinalgOps
|
||||
MLIRLoopOps
|
||||
MLIRPass
|
||||
MLIRStandardOps
|
||||
MLIRTransformUtils
|
||||
)
|
||||
|
||||
add_mlir_dialect_library(MLIRLinalgUtils
|
||||
|
||||
Utils.cpp
|
||||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
|
@ -19,7 +7,14 @@ add_mlir_dialect_library(MLIRLinalgUtils
|
|||
intrinsics_gen
|
||||
)
|
||||
|
||||
add_dependencies(MLIRLinalgUtils ${LIBS})
|
||||
target_link_libraries(MLIRLinalgUtils
|
||||
PUBLIC
|
||||
${LIBS})
|
||||
MLIRAffineOps
|
||||
MLIREDSC
|
||||
MLIRIR
|
||||
MLIRLinalgOps
|
||||
MLIRLoopOps
|
||||
MLIRPass
|
||||
MLIRStandardOps
|
||||
MLIRTransformUtils
|
||||
)
|
||||
|
|
|
@ -7,12 +7,8 @@ add_mlir_dialect_library(MLIRLoopOps
|
|||
${MLIR_MAIN_INCLUDE_DIR}/mlir/LoopOps
|
||||
)
|
||||
add_dependencies(MLIRLoopOps
|
||||
|
||||
MLIREDSC
|
||||
MLIRLoopLikeInterfaceIncGen
|
||||
MLIRLoopOpsIncGen
|
||||
MLIRStandardOps
|
||||
LLVMSupport
|
||||
)
|
||||
target_link_libraries(MLIRLoopOps
|
||||
PUBLIC
|
||||
|
|
|
@ -13,12 +13,8 @@ add_mlir_dialect_library(MLIRQuantOps
|
|||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/QuantOps
|
||||
)
|
||||
add_dependencies(MLIRQuantOps
|
||||
MLIRIR
|
||||
MLIRPass
|
||||
MLIRQuantOpsIncGen
|
||||
MLIRSupport
|
||||
MLIRStandardOps)
|
||||
|
||||
MLIRQuantOpsIncGen
|
||||
)
|
||||
target_link_libraries(MLIRQuantOps
|
||||
PUBLIC
|
||||
MLIRIR
|
||||
|
|
|
@ -5,7 +5,7 @@ add_mlir_dialect_library(MLIRSDBM
|
|||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/SDBM
|
||||
)
|
||||
add_dependencies(MLIRSDBM MLIRIR)
|
||||
target_link_libraries(MLIRSDBM
|
||||
PUBLIC
|
||||
MLIRIR)
|
||||
MLIRIR
|
||||
)
|
||||
|
|
|
@ -7,13 +7,9 @@ add_mlir_dialect_library(MLIRStandardOps
|
|||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/StandardOps
|
||||
)
|
||||
add_dependencies(MLIRStandardOps
|
||||
|
||||
MLIRCallOpInterfacesIncGen
|
||||
MLIRControlFlowInterfacesIncGen
|
||||
MLIREDSC
|
||||
MLIRIR
|
||||
MLIRStandardOpsIncGen
|
||||
LLVMSupport
|
||||
)
|
||||
target_link_libraries(MLIRStandardOps
|
||||
PUBLIC
|
||||
|
|
|
@ -5,5 +5,11 @@ add_llvm_library(MLIRIR
|
|||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/IR
|
||||
)
|
||||
add_dependencies(MLIRIR MLIRCallOpInterfacesIncGen MLIROpAsmInterfacesIncGen MLIRSupport LLVMSupport)
|
||||
target_link_libraries(MLIRIR PUBLIC MLIRSupport LLVMSupport)
|
||||
add_dependencies(MLIRIR
|
||||
MLIRCallOpInterfacesIncGen
|
||||
MLIROpAsmInterfacesIncGen
|
||||
)
|
||||
target_link_libraries(MLIRIR
|
||||
PUBLIC
|
||||
MLIRSupport
|
||||
LLVMSupport)
|
||||
|
|
|
@ -6,7 +6,6 @@ add_llvm_library(MLIRParser
|
|||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Parser
|
||||
)
|
||||
add_dependencies(MLIRParser MLIRIR MLIRAnalysis)
|
||||
target_link_libraries(MLIRParser
|
||||
PUBLIC
|
||||
MLIRIR
|
||||
|
|
|
@ -5,7 +5,6 @@ add_llvm_library(MLIRPass
|
|||
ADDITIONAL_HEADER_DIRS
|
||||
${MLIR_MAIN_INCLUDE_DIR}/mlir/Pass
|
||||
)
|
||||
add_dependencies(MLIRPass MLIRAnalysis MLIRIR LLVMSupport)
|
||||
target_link_libraries(MLIRPass
|
||||
PUBLIC
|
||||
MLIRAnalysis
|
||||
|
|
|
@ -11,11 +11,6 @@ add_llvm_library(MLIRQuantizerSupport
|
|||
ADDITIONAL_HEADER_DIRS
|
||||
)
|
||||
|
||||
add_dependencies(MLIRQuantizerSupport
|
||||
MLIRIR
|
||||
MLIRQuantOps
|
||||
MLIRSupport
|
||||
MLIRStandardOps)
|
||||
target_link_libraries(MLIRQuantizerSupport
|
||||
PUBLIC
|
||||
MLIRIR
|
||||
|
@ -33,8 +28,8 @@ add_llvm_library(MLIRQuantizerFxpMathConfig
|
|||
)
|
||||
|
||||
add_dependencies(MLIRQuantizerFxpMathConfig
|
||||
MLIRFxpMathOpsIncGen
|
||||
MLIRQuantizerSupport)
|
||||
MLIRFxpMathOpsIncGen
|
||||
)
|
||||
target_link_libraries(MLIRQuantizerFxpMathConfig
|
||||
PUBLIC
|
||||
MLIRIR
|
||||
|
@ -51,10 +46,6 @@ add_llvm_library(MLIRQuantizerTransforms
|
|||
|
||||
ADDITIONAL_HEADER_DIRS
|
||||
)
|
||||
add_dependencies(MLIRQuantizerTransforms
|
||||
MLIRQuantizerFxpMathConfig
|
||||
MLIRQuantizerSupport
|
||||
MLIRPass)
|
||||
target_link_libraries(MLIRQuantizerTransforms
|
||||
PUBLIC
|
||||
MLIRIR
|
||||
|
|
|
@ -7,9 +7,7 @@ add_llvm_library(MLIRTestIR
|
|||
)
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../TestDialect)
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR}/../TestDialect)
|
||||
add_dependencies(MLIRTestIR
|
||||
MLIRTestDialect
|
||||
)
|
||||
|
||||
target_link_libraries(MLIRTestIR
|
||||
PUBLIC
|
||||
MLIRPass
|
||||
|
|
Loading…
Reference in New Issue