From: Stephen Neuendorffer Date: Fri, 28 Feb 2020 22:04:58 +0000 (-0800) Subject: Revert "[MLIR] Remove redundant library dependencies" X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fed2acc7f53cd0699a4ddbe96ae18487e9580c3e;p=platform%2Fupstream%2Fllvm.git Revert "[MLIR] Remove redundant library dependencies" This reverts commit e1cb15c8f92215585105fc00d6eab80860dbc68d. --- diff --git a/mlir/lib/Analysis/CMakeLists.txt b/mlir/lib/Analysis/CMakeLists.txt index 8c04988..23dcd05 100644 --- a/mlir/lib/Analysis/CMakeLists.txt +++ b/mlir/lib/Analysis/CMakeLists.txt @@ -31,8 +31,10 @@ add_llvm_library(MLIRAnalysis LLVMSupport ) add_dependencies(MLIRAnalysis + MLIRAffineOps MLIRCallOpInterfacesIncGen MLIRTypeInferOpInterfaceIncGen + MLIRLoopOps ) add_llvm_library(MLIRLoopAnalysis @@ -54,6 +56,8 @@ add_llvm_library(MLIRLoopAnalysis LLVMSupport ) add_dependencies(MLIRLoopAnalysis + MLIRAffineOps MLIRCallOpInterfacesIncGen MLIRTypeInferOpInterfaceIncGen + MLIRLoopOps ) diff --git a/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt b/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt index 8f4e00e..73ea74d 100644 --- a/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt +++ b/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt @@ -14,3 +14,12 @@ add_mlir_conversion_library(MLIRAffineToStandard LLVMCore LLVMSupport ) +add_dependencies( + MLIRAffineToStandard + + MLIRAffineOps + MLIRStandardOps + MLIRIR + LLVMCore + LLVMSupport +) diff --git a/mlir/lib/Conversion/LoopToStandard/CMakeLists.txt b/mlir/lib/Conversion/LoopToStandard/CMakeLists.txt index b027485..db17dd8 100644 --- a/mlir/lib/Conversion/LoopToStandard/CMakeLists.txt +++ b/mlir/lib/Conversion/LoopToStandard/CMakeLists.txt @@ -13,3 +13,11 @@ add_mlir_conversion_library(MLIRLoopToStandard LLVMCore LLVMSupport ) +add_dependencies( + MLIRLoopToStandard + + MLIRLoopOps + MLIRTransforms + LLVMCore + LLVMSupport +) diff --git a/mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt b/mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt index a23fc13..739c5b8 100644 --- a/mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt +++ b/mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt @@ -1,11 +1,4 @@ -add_mlir_conversion_library(MLIRLoopsToGPU - LoopsToGPU.cpp - LoopsToGPUPass.cpp - - ADDITIONAL_HEADER_DIRS - ${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/LoopsToGPU - - LINK_LIBS +set(LIBS MLIRAffineOps MLIRAffineToStandard MLIRGPU @@ -18,4 +11,16 @@ add_mlir_conversion_library(MLIRLoopsToGPU 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}) diff --git a/mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt b/mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt index 904ad37..36f9d60 100644 --- a/mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt +++ b/mlir/lib/Conversion/StandardToLLVM/CMakeLists.txt @@ -13,3 +13,11 @@ add_mlir_conversion_library(MLIRStandardToLLVM LLVMCore LLVMSupport ) +add_dependencies( + MLIRStandardToLLVM + + MLIRLLVMIR + MLIRTransforms + LLVMCore + LLVMSupport +) diff --git a/mlir/lib/Dialect/AffineOps/CMakeLists.txt b/mlir/lib/Dialect/AffineOps/CMakeLists.txt index 51017de..749e7e2 100644 --- a/mlir/lib/Dialect/AffineOps/CMakeLists.txt +++ b/mlir/lib/Dialect/AffineOps/CMakeLists.txt @@ -13,6 +13,10 @@ add_mlir_dialect_library(MLIRAffineOps LLVMSupport ) add_dependencies(MLIRAffineOps + MLIRAffineOpsIncGen + MLIREDSC + MLIRIR MLIRLoopLikeInterfaceIncGen + MLIRStandardOps ) diff --git a/mlir/lib/Dialect/FxpMathOps/CMakeLists.txt b/mlir/lib/Dialect/FxpMathOps/CMakeLists.txt index 0572901..e631fc6 100644 --- a/mlir/lib/Dialect/FxpMathOps/CMakeLists.txt +++ b/mlir/lib/Dialect/FxpMathOps/CMakeLists.txt @@ -16,5 +16,9 @@ add_mlir_dialect_library(MLIRFxpMathOps LLVMSupport ) add_dependencies(MLIRFxpMathOps - MLIRFxpMathOpsIncGen - ) + MLIRFxpMathOpsIncGen + MLIRQuantOps + MLIRIR + MLIRPass + MLIRSupport + MLIRStandardOps) diff --git a/mlir/lib/Dialect/GPU/CMakeLists.txt b/mlir/lib/Dialect/GPU/CMakeLists.txt index 018291a..595f8b7 100644 --- a/mlir/lib/Dialect/GPU/CMakeLists.txt +++ b/mlir/lib/Dialect/GPU/CMakeLists.txt @@ -21,4 +21,10 @@ add_mlir_dialect_library(MLIRGPU ) add_dependencies(MLIRGPU MLIRGPUOpsIncGen - ) + MLIREDSC + MLIRIR + MLIRLLVMIR + MLIRLoopOps + MLIRSupport + MLIRTransformUtils + LLVMSupport) diff --git a/mlir/lib/Dialect/LLVMIR/CMakeLists.txt b/mlir/lib/Dialect/LLVMIR/CMakeLists.txt index 71465c1..eb32510 100644 --- a/mlir/lib/Dialect/LLVMIR/CMakeLists.txt +++ b/mlir/lib/Dialect/LLVMIR/CMakeLists.txt @@ -11,10 +11,7 @@ add_mlir_dialect_library(MLIRLLVMIR MLIRIR MLIRSupport ) -add_dependencies(MLIRLLVMIR - MLIRLLVMOpsIncGen - MLIRLLVMConversionsIncGen - ) +add_dependencies(MLIRLLVMIR MLIRLLVMOpsIncGen MLIRLLVMConversionsIncGen LLVMAsmParser LLVMCore LLVMSupport) add_mlir_dialect_library(MLIRNVVMIR IR/NVVMDialect.cpp @@ -29,11 +26,7 @@ add_mlir_dialect_library(MLIRNVVMIR LLVMSupport LLVMCore ) -add_dependencies(MLIRNVVMIR - MLIRNVVMOpsIncGen - MLIRNVVMConversionsIncGen - ) - +add_dependencies(MLIRNVVMIR MLIRNVVMOpsIncGen MLIRNVVMConversionsIncGen LLVMAsmParser LLVMCore LLVMSupport) add_mlir_dialect_library(MLIRROCDLIR @@ -48,7 +41,4 @@ add_mlir_dialect_library(MLIRROCDLIR LLVMSupport MLIRIR ) -add_dependencies(MLIRROCDLIR - MLIRROCDLOpsIncGen - MLIRROCDLConversionsIncGen - ) +add_dependencies(MLIRROCDLIR MLIRROCDLOpsIncGen MLIRROCDLConversionsIncGen LLVMAsmParser LLVMCore LLVMSupport) diff --git a/mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt index 53a9c79f..629e071 100644 --- a/mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt +++ b/mlir/lib/Dialect/Linalg/Analysis/CMakeLists.txt @@ -1,15 +1,21 @@ +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 - MLIRIR - MLIRLinalgOps - MLIRStandardOps - LLVMSupport + ${LIBS} ) + +add_dependencies(MLIRLinalgAnalysis ${LIBS}) diff --git a/mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt b/mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt index e6b3479..6c0cc3c 100644 --- a/mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt +++ b/mlir/lib/Dialect/Linalg/EDSC/CMakeLists.txt @@ -1,18 +1,24 @@ +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 - MLIREDSC - MLIRIR - MLIRAffineOps - MLIRLinalgOps - MLIRLoopOps - MLIRStandardOps - LLVMSupport + ${LIBS} ) + +add_dependencies(MLIRLinalgEDSC ${LIBS}) diff --git a/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt b/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt index 70daa7c..3988daa 100644 --- a/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt +++ b/mlir/lib/Dialect/Linalg/IR/CMakeLists.txt @@ -1,10 +1,16 @@ +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 @@ -14,7 +20,10 @@ add_mlir_dialect_library(MLIRLinalgOps MLIRSupport LLVMSupport ) + add_dependencies(MLIRLinalgOps + + ${LIBS} MLIRLinalgOpsIncGen MLIRLinalgStructuredOpsIncGen MLIRLinalgStructuredOpsInterfaceIncGen diff --git a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt index 7287324..5c1df04 100644 --- a/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt +++ b/mlir/lib/Dialect/Linalg/Transforms/CMakeLists.txt @@ -1,16 +1,5 @@ -add_mlir_dialect_library(MLIRLinalgTransforms - Fusion.cpp - LinalgTransforms.cpp - LinalgToLoops.cpp - Promotion.cpp - Tiling.cpp +set(LIBS - ADDITIONAL_HEADER_DIRS - ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg - DEPENDS - intrinsics_gen - - LINK_LIBS MLIRAffineOps MLIRAnalysis MLIREDSC @@ -27,6 +16,25 @@ add_mlir_dialect_library(MLIRLinalgTransforms 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 ) diff --git a/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt b/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt index 754688f..2bf36d0 100644 --- a/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt +++ b/mlir/lib/Dialect/Linalg/Utils/CMakeLists.txt @@ -1,13 +1,4 @@ -add_mlir_dialect_library(MLIRLinalgUtils - Utils.cpp - - ADDITIONAL_HEADER_DIRS - ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg - - DEPENDS - intrinsics_gen - - LINK_LIBS +set(LIBS MLIRAffineOps MLIREDSC MLIRIR @@ -18,3 +9,17 @@ add_mlir_dialect_library(MLIRLinalgUtils 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}) diff --git a/mlir/lib/Dialect/LoopOps/CMakeLists.txt b/mlir/lib/Dialect/LoopOps/CMakeLists.txt index 635bbde..e228654 100644 --- a/mlir/lib/Dialect/LoopOps/CMakeLists.txt +++ b/mlir/lib/Dialect/LoopOps/CMakeLists.txt @@ -13,8 +13,12 @@ add_mlir_dialect_library(MLIRLoopOps LLVMSupport ) add_dependencies(MLIRLoopOps + + MLIREDSC MLIRLoopLikeInterfaceIncGen MLIRLoopOpsIncGen + MLIRStandardOps + LLVMSupport ) add_subdirectory(Transforms) diff --git a/mlir/lib/Dialect/QuantOps/CMakeLists.txt b/mlir/lib/Dialect/QuantOps/CMakeLists.txt index c9d1041..14acb91 100644 --- a/mlir/lib/Dialect/QuantOps/CMakeLists.txt +++ b/mlir/lib/Dialect/QuantOps/CMakeLists.txt @@ -21,5 +21,8 @@ add_mlir_dialect_library(MLIRQuantOps LLVMSupport ) add_dependencies(MLIRQuantOps - MLIRQuantOpsIncGen - ) + MLIRIR + MLIRPass + MLIRQuantOpsIncGen + MLIRSupport + MLIRStandardOps) diff --git a/mlir/lib/Dialect/SDBM/CMakeLists.txt b/mlir/lib/Dialect/SDBM/CMakeLists.txt index 2c753d6..b75e257 100644 --- a/mlir/lib/Dialect/SDBM/CMakeLists.txt +++ b/mlir/lib/Dialect/SDBM/CMakeLists.txt @@ -10,3 +10,4 @@ add_mlir_dialect_library(MLIRSDBM MLIRSupport LLVMSupport ) +add_dependencies(MLIRSDBM MLIRIR) diff --git a/mlir/lib/Dialect/StandardOps/CMakeLists.txt b/mlir/lib/Dialect/StandardOps/CMakeLists.txt index acf47df..e802e0c 100644 --- a/mlir/lib/Dialect/StandardOps/CMakeLists.txt +++ b/mlir/lib/Dialect/StandardOps/CMakeLists.txt @@ -14,6 +14,10 @@ add_mlir_dialect_library(MLIRStandardOps LLVMSupport ) add_dependencies(MLIRStandardOps + MLIRCallOpInterfacesIncGen + MLIREDSC + MLIRIR MLIRStandardOpsIncGen + LLVMSupport ) diff --git a/mlir/lib/EDSC/CMakeLists.txt b/mlir/lib/EDSC/CMakeLists.txt index 660efc5b..3d0290a 100644 --- a/mlir/lib/EDSC/CMakeLists.txt +++ b/mlir/lib/EDSC/CMakeLists.txt @@ -27,3 +27,4 @@ add_llvm_library(MLIREDSCInterface MLIRParser LLVMSupport ) +add_dependencies(MLIREDSCInterface MLIRIR) diff --git a/mlir/lib/IR/CMakeLists.txt b/mlir/lib/IR/CMakeLists.txt index f3788e2..8802f6c 100644 --- a/mlir/lib/IR/CMakeLists.txt +++ b/mlir/lib/IR/CMakeLists.txt @@ -10,7 +10,4 @@ add_llvm_library(MLIRIR LLVMSupport ${LLVM_PTHREAD_LIB} ) -add_dependencies(MLIRIR - MLIRCallOpInterfacesIncGen - MLIROpAsmInterfacesIncGen - ) +add_dependencies(MLIRIR MLIRCallOpInterfacesIncGen MLIROpAsmInterfacesIncGen MLIRSupport LLVMSupport) diff --git a/mlir/lib/Parser/CMakeLists.txt b/mlir/lib/Parser/CMakeLists.txt index 978a674..36ede65 100644 --- a/mlir/lib/Parser/CMakeLists.txt +++ b/mlir/lib/Parser/CMakeLists.txt @@ -11,3 +11,4 @@ add_llvm_library(MLIRParser MLIRAnalysis LLVMSupport ) +add_dependencies(MLIRParser MLIRIR MLIRAnalysis) diff --git a/mlir/lib/Pass/CMakeLists.txt b/mlir/lib/Pass/CMakeLists.txt index 9df404c..54407d9 100644 --- a/mlir/lib/Pass/CMakeLists.txt +++ b/mlir/lib/Pass/CMakeLists.txt @@ -12,3 +12,4 @@ add_llvm_library(MLIRPass LLVMIRReader LLVMSupport ) +add_dependencies(MLIRPass MLIRAnalysis MLIRIR LLVMSupport) diff --git a/mlir/lib/Quantizer/CMakeLists.txt b/mlir/lib/Quantizer/CMakeLists.txt index 34d0eff..d87b7da 100644 --- a/mlir/lib/Quantizer/CMakeLists.txt +++ b/mlir/lib/Quantizer/CMakeLists.txt @@ -18,6 +18,12 @@ add_llvm_library(MLIRQuantizerSupport LLVMSupport ) +add_dependencies(MLIRQuantizerSupport + MLIRIR + MLIRQuantOps + MLIRSupport + MLIRStandardOps) + # Configurations. add_llvm_library(MLIRQuantizerFxpMathConfig Configurations/FxpMathConfig.cpp @@ -35,8 +41,8 @@ add_llvm_library(MLIRQuantizerFxpMathConfig ) add_dependencies(MLIRQuantizerFxpMathConfig - MLIRFxpMathOpsIncGen - ) + MLIRFxpMathOpsIncGen + MLIRQuantizerSupport) # Transforms. add_llvm_library(MLIRQuantizerTransforms @@ -56,3 +62,7 @@ add_llvm_library(MLIRQuantizerTransforms MLIRTransformUtils LLVMSupport ) +add_dependencies(MLIRQuantizerTransforms + MLIRQuantizerFxpMathConfig + MLIRQuantizerSupport + MLIRPass) diff --git a/mlir/test/lib/IR/CMakeLists.txt b/mlir/test/lib/IR/CMakeLists.txt index 121ba44..355facc 100644 --- a/mlir/test/lib/IR/CMakeLists.txt +++ b/mlir/test/lib/IR/CMakeLists.txt @@ -13,3 +13,6 @@ add_llvm_library(MLIRTestIR ) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../TestDialect) include_directories(${CMAKE_CURRENT_BINARY_DIR}/../TestDialect) +add_dependencies(MLIRTestIR + MLIRTestDialect + )