diff --git a/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt b/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt --- a/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt +++ b/mlir/lib/Conversion/AffineToStandard/CMakeLists.txt @@ -17,7 +17,10 @@ MLIRAffineToStandard MLIRAffineOps + MLIRLoopOps + MLIRPass MLIRStandardOps + MLIRTransforms MLIRIR LLVMCore LLVMSupport diff --git a/mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt b/mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt --- a/mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt +++ b/mlir/lib/Conversion/GPUToNVVM/CMakeLists.txt @@ -15,4 +15,6 @@ MLIRLLVMIR MLIRNVVMIR MLIRPass + MLIRStandardToLLVM + MLIRTransformUtils ) diff --git a/mlir/lib/Conversion/GPUToROCDL/CMakeLists.txt b/mlir/lib/Conversion/GPUToROCDL/CMakeLists.txt --- a/mlir/lib/Conversion/GPUToROCDL/CMakeLists.txt +++ b/mlir/lib/Conversion/GPUToROCDL/CMakeLists.txt @@ -7,4 +7,5 @@ MLIRLLVMIR MLIRROCDLIR MLIRPass + MLIRStandardToLLVM ) diff --git a/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt b/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt --- a/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt +++ b/mlir/lib/Conversion/LinalgToLLVM/CMakeLists.txt @@ -5,8 +5,13 @@ ${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/LinalgToLLVM ) set(LIBS + MLIRAffineToStandard + MLIREDSC + MLIRIR MLIRLinalg MLIRLLVMIR + MLIRStandardToLLVM + MLIRVectorToLLVM MLIRTransforms LLVMCore LLVMSupport diff --git a/mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt b/mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt --- a/mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt +++ b/mlir/lib/Conversion/LoopsToGPU/CMakeLists.txt @@ -1,5 +1,6 @@ set(LIBS MLIRAffineOps + MLIRAffineToStandard MLIRGPU MLIRIR MLIRLinalg diff --git a/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt b/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt --- a/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt +++ b/mlir/lib/Conversion/VectorToLLVM/CMakeLists.txt @@ -6,6 +6,7 @@ ) set(LIBS MLIRLLVMIR + MLIRStandardToLLVM MLIRTransforms LLVMCore LLVMSupport diff --git a/mlir/lib/Conversion/VectorToLoops/CMakeLists.txt b/mlir/lib/Conversion/VectorToLoops/CMakeLists.txt --- a/mlir/lib/Conversion/VectorToLoops/CMakeLists.txt +++ b/mlir/lib/Conversion/VectorToLoops/CMakeLists.txt @@ -5,6 +5,7 @@ ${MLIR_MAIN_INCLUDE_DIR}/mlir/Conversion/VectorToLoops ) set(LIBS + MLIREDSC MLIRLLVMIR MLIRTransforms LLVMCore diff --git a/mlir/lib/Dialect/FxpMathOps/CMakeLists.txt b/mlir/lib/Dialect/FxpMathOps/CMakeLists.txt --- a/mlir/lib/Dialect/FxpMathOps/CMakeLists.txt +++ b/mlir/lib/Dialect/FxpMathOps/CMakeLists.txt @@ -5,11 +5,13 @@ ADDITIONAL_HEADER_DIRS ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/FxpMathOps + + LINK_LIBS + MLIRQuantOps + MLIRIR + MLIRPass + MLIRSupport + MLIRStandardOps ) add_dependencies(MLIRFxpMathOps - MLIRFxpMathOpsIncGen - MLIRQuantOps - MLIRIR - MLIRPass - MLIRSupport - MLIRStandardOps) + MLIRFxpMathOpsIncGen) diff --git a/mlir/lib/Dialect/GPU/CMakeLists.txt b/mlir/lib/Dialect/GPU/CMakeLists.txt --- a/mlir/lib/Dialect/GPU/CMakeLists.txt +++ b/mlir/lib/Dialect/GPU/CMakeLists.txt @@ -9,18 +9,14 @@ ) add_dependencies(MLIRGPU MLIRGPUOpsIncGen - MLIREDSC - MLIRIR - MLIRLLVMIR - MLIRLoopOps - MLIRSupport - MLIRTransformUtils - LLVMSupport) + ) target_link_libraries(MLIRGPU MLIREDSC MLIRIR MLIRLLVMIR MLIRLoopOps + MLIRPass + MLIRStandardOps MLIRSupport MLIRTransformUtils LLVMSupport) diff --git a/mlir/lib/Dialect/LLVMIR/CMakeLists.txt b/mlir/lib/Dialect/LLVMIR/CMakeLists.txt --- a/mlir/lib/Dialect/LLVMIR/CMakeLists.txt +++ b/mlir/lib/Dialect/LLVMIR/CMakeLists.txt @@ -14,7 +14,7 @@ ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/LLVMIR ) add_dependencies(MLIRNVVMIR MLIRNVVMOpsIncGen MLIRNVVMConversionsIncGen LLVMAsmParser LLVMCore LLVMSupport) -target_link_libraries(MLIRNVVMIR LLVMAsmParser LLVMCore LLVMSupport MLIRIR) +target_link_libraries(MLIRNVVMIR LLVMAsmParser MLIRIR MLIRLLVMIR LLVMSupport LLVMCore) add_llvm_library(MLIRROCDLIR IR/ROCDLDialect.cpp diff --git a/mlir/lib/Dialect/Linalg/CMakeLists.txt b/mlir/lib/Dialect/Linalg/CMakeLists.txt --- a/mlir/lib/Dialect/Linalg/CMakeLists.txt +++ b/mlir/lib/Dialect/Linalg/CMakeLists.txt @@ -15,17 +15,19 @@ ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/Linalg DEPENDS intrinsics_gen - ) - -add_dependencies(MLIRLinalg + LINK_LIBS MLIRAffineOps MLIRAnalysis MLIREDSC - MLIRLinalgOpsIncGen - MLIRLinalgStructuredOpsIncGen - MLIRLinalgTransformPatternsIncGen MLIRStandardOps MLIRStandardToLLVM MLIRVectorOps ) + +add_dependencies(MLIRLinalg + + MLIRLinalgOpsIncGen + MLIRLinalgStructuredOpsIncGen + MLIRLinalgTransformPatternsIncGen + ) diff --git a/mlir/lib/Dialect/LoopOps/CMakeLists.txt b/mlir/lib/Dialect/LoopOps/CMakeLists.txt --- a/mlir/lib/Dialect/LoopOps/CMakeLists.txt +++ b/mlir/lib/Dialect/LoopOps/CMakeLists.txt @@ -5,5 +5,5 @@ ADDITIONAL_HEADER_DIRS ${MLIR_MAIN_INCLUDE_DIR}/mlir/LoopOps ) -add_dependencies(MLIRLoopOps MLIRLoopLikeInterfaceIncGen MLIRLoopOpsIncGen MLIRStandardOps LLVMSupport) -target_link_libraries(MLIRLoopOps LLVMSupport) +add_dependencies(MLIRLoopOps MLIRLoopLikeInterfaceIncGen MLIRLoopOpsIncGen) +target_link_libraries(MLIRLoopOps MLIRStandardOps LLVMSupport MLIRIR) diff --git a/mlir/lib/Dialect/QuantOps/CMakeLists.txt b/mlir/lib/Dialect/QuantOps/CMakeLists.txt --- a/mlir/lib/Dialect/QuantOps/CMakeLists.txt +++ b/mlir/lib/Dialect/QuantOps/CMakeLists.txt @@ -13,9 +13,14 @@ ADDITIONAL_HEADER_DIRS ${MLIR_MAIN_INCLUDE_DIR}/mlir/Dialect/QuantOps ) -add_dependencies(MLIRQuantOps - MLIRIR - MLIRPass - MLIRQuantOpsIncGen - MLIRSupport - MLIRStandardOps) +add_dependencies( + MLIRQuantOps + MLIRQuantOpsIncGen + ) +target_link_libraries(MLIRQuantOps + MLIRIR + MLIRPass + MLIRSupport + MLIRStandardOps + MLIRTransformUtils + ) diff --git a/mlir/lib/Dialect/SPIRV/Serialization/CMakeLists.txt b/mlir/lib/Dialect/SPIRV/Serialization/CMakeLists.txt --- a/mlir/lib/Dialect/SPIRV/Serialization/CMakeLists.txt +++ b/mlir/lib/Dialect/SPIRV/Serialization/CMakeLists.txt @@ -14,4 +14,5 @@ target_link_libraries(MLIRSPIRVSerialization MLIRIR MLIRSPIRV - MLIRSupport) + MLIRSupport + MLIRTranslation) diff --git a/mlir/lib/Dialect/VectorOps/CMakeLists.txt b/mlir/lib/Dialect/VectorOps/CMakeLists.txt --- a/mlir/lib/Dialect/VectorOps/CMakeLists.txt +++ b/mlir/lib/Dialect/VectorOps/CMakeLists.txt @@ -1,4 +1,4 @@ -add_llvm_library(MLIRVectorOps +add_llvm_library(MLIRVectorOps STATIC DialectRegistration.cpp VectorOps.cpp VectorTransforms.cpp @@ -10,4 +10,4 @@ add_dependencies(MLIRVectorOps MLIRVectorOpsIncGen) add_dependencies(MLIRVectorOps MLIRVectorTransformPatternsIncGen) -target_link_libraries(MLIRVectorOps MLIRIR) +target_link_libraries(MLIRVectorOps MLIRAnalysis MLIRIR MLIRStandardOps) diff --git a/mlir/lib/EDSC/CMakeLists.txt b/mlir/lib/EDSC/CMakeLists.txt --- a/mlir/lib/EDSC/CMakeLists.txt +++ b/mlir/lib/EDSC/CMakeLists.txt @@ -15,12 +15,14 @@ ) target_link_libraries(MLIREDSC PUBLIC - MLIRAffineOps - MLIRLoopOps - MLIRStandardOps - MLIRTransformUtils - MLIRVectorOps - ) + MLIRAffineOps + MLIRIR + MLIRLoopOps + MLIRStandardOps + MLIRSupport + MLIRTransformUtils + MLIRVectorOps + ) add_llvm_library(MLIREDSCInterface CoreAPIs.cpp @@ -29,9 +31,9 @@ ${MLIR_MAIN_INCLUDE_DIR}/mlir/EDSC ) add_dependencies(MLIREDSCInterface MLIRIR) -target_link_libraries(MLIREDSC +target_link_libraries(MLIREDSCInterface PUBLIC - MLIRIR - MLIRSupport - MLIRParser - ) + MLIRIR + MLIRSupport + MLIRParser + ) diff --git a/mlir/lib/ExecutionEngine/CMakeLists.txt b/mlir/lib/ExecutionEngine/CMakeLists.txt --- a/mlir/lib/ExecutionEngine/CMakeLists.txt +++ b/mlir/lib/ExecutionEngine/CMakeLists.txt @@ -14,7 +14,15 @@ LLVMBitWriter LLVMExecutionEngine LLVMOrcJIT + LLVMJITLink LLVMSupport + LLVMAnalysis + LLVMAggressiveInstCombine + LLVMInstCombine + LLVMMC + LLVMScalarOpts + LLVMTarget + LLVMVectorize LLVMTransformUtils ${outlibs}) diff --git a/mlir/lib/Quantizer/CMakeLists.txt b/mlir/lib/Quantizer/CMakeLists.txt --- a/mlir/lib/Quantizer/CMakeLists.txt +++ b/mlir/lib/Quantizer/CMakeLists.txt @@ -9,22 +9,30 @@ Support/UniformSolvers.cpp ADDITIONAL_HEADER_DIRS + + LINK_LIBS + MLIRIR + MLIRQuantOps + MLIRSupport + MLIRStandardOps + LLVMSupport ) -add_dependencies(MLIRQuantizerSupport - MLIRIR - MLIRQuantOps - MLIRSupport - MLIRStandardOps) # Configurations. add_llvm_library(MLIRQuantizerFxpMathConfig Configurations/FxpMathConfig.cpp ADDITIONAL_HEADER_DIRS + + LINK_LIBS + MLIRIR + MLIRFxpMathOps + MLIRQuantOps + MLIRQuantizerSupport ) add_dependencies(MLIRQuantizerFxpMathConfig - MLIRFxpMathOpsIncGen - MLIRQuantizerSupport) + MLIRFxpMathOpsIncGen + ) # Transforms. add_llvm_library(MLIRQuantizerTransforms @@ -34,11 +42,10 @@ ADDITIONAL_HEADER_DIRS ) -add_dependencies(MLIRQuantizerTransforms - MLIRQuantizerFxpMathConfig - MLIRQuantizerSupport - MLIRPass) target_link_libraries(MLIRQuantizerTransforms + MLIRIR MLIRQuantizerFxpMathConfig MLIRQuantizerSupport - MLIRPass) + MLIRQuantOps + MLIRPass + LLVMSupport) diff --git a/mlir/lib/Support/CMakeLists.txt b/mlir/lib/Support/CMakeLists.txt --- a/mlir/lib/Support/CMakeLists.txt +++ b/mlir/lib/Support/CMakeLists.txt @@ -25,6 +25,7 @@ ) target_link_libraries(MLIROptMain MLIRPass + MLIRParser LLVMSupport MLIRSupport ) @@ -35,7 +36,7 @@ ADDITIONAL_HEADER_DIRS ${MLIR_MAIN_INCLUDE_DIR}/mlir/Support ) -target_link_libraries(MLIRTranslateClParser LLVMSupport) +target_link_libraries(MLIRTranslateClParser LLVMSupport MLIRIR MLIRTranslation MLIRParser) add_llvm_library(MLIRJitRunner BUILDTREE_ONLY JitRunner.cpp diff --git a/mlir/test/lib/IR/CMakeLists.txt b/mlir/test/lib/IR/CMakeLists.txt --- a/mlir/test/lib/IR/CMakeLists.txt +++ b/mlir/test/lib/IR/CMakeLists.txt @@ -4,12 +4,11 @@ TestSymbolUses.cpp ADDITIONAL_HEADER_DIRS + + LINK_LIBS MLIRPass ) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../TestDialect) include_directories(${CMAKE_CURRENT_BINARY_DIR}/../TestDialect) add_dependencies(MLIRTestIR MLIRTestDialect -) -target_link_libraries(MLIRTestIR - MLIRPass ) diff --git a/mlir/test/lib/Pass/CMakeLists.txt b/mlir/test/lib/Pass/CMakeLists.txt --- a/mlir/test/lib/Pass/CMakeLists.txt +++ b/mlir/test/lib/Pass/CMakeLists.txt @@ -3,8 +3,8 @@ ADDITIONAL_HEADER_DIRS ${MLIR_MAIN_INCLUDE_DIR}/mlir/Pass - ) -target_link_libraries(MLIRTestPass + + LINK_LIBS MLIRIR MLIRPass ) diff --git a/mlir/test/lib/TestDialect/CMakeLists.txt b/mlir/test/lib/TestDialect/CMakeLists.txt --- a/mlir/test/lib/TestDialect/CMakeLists.txt +++ b/mlir/test/lib/TestDialect/CMakeLists.txt @@ -14,15 +14,17 @@ add_llvm_library(MLIRTestDialect TestDialect.cpp TestPatterns.cpp + + LINK_LIBS + MLIRDialect + MLIRIR + MLIRLinalg + MLIRPass + MLIRTransforms + MLIRTransformUtils + LLVMSupport ) add_dependencies(MLIRTestDialect MLIRTestOpsIncGen - MLIRIR - LLVMSupport MLIRTypeInferOpInterfaceIncGen ) -target_link_libraries(MLIRTestDialect - MLIRDialect - MLIRIR - LLVMSupport -) diff --git a/mlir/test/lib/Transforms/CMakeLists.txt b/mlir/test/lib/Transforms/CMakeLists.txt --- a/mlir/test/lib/Transforms/CMakeLists.txt +++ b/mlir/test/lib/Transforms/CMakeLists.txt @@ -16,21 +16,24 @@ ADDITIONAL_HEADER_DIRS ${MLIR_MAIN_INCLUDE_DIR}/mlir/Transforms - ) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../TestDialect) -include_directories(${CMAKE_CURRENT_BINARY_DIR}/../TestDialect) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../DeclarativeTransforms) -include_directories(${CMAKE_CURRENT_BINARY_DIR}/../DeclarativeTransforms) -add_dependencies(MLIRTestTransforms MLIRStandardOpsIncGen) -add_dependencies(MLIRTestTransforms MLIRTestLinalgTransformPatternsIncGen) -add_dependencies(MLIRTestTransforms MLIRTestVectorTransformPatternsIncGen) -target_link_libraries(MLIRTestTransforms + + LINK_LIBS MLIRAffineOps MLIRAnalysis MLIREDSC MLIRGPU MLIRLoopOps + MLIRLinalg MLIRPass MLIRTestDialect + MLIRTransformUtils + MLIRVectorToLoops MLIRVectorOps ) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../TestDialect) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/../TestDialect) +include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../DeclarativeTransforms) +include_directories(${CMAKE_CURRENT_BINARY_DIR}/../DeclarativeTransforms) +add_dependencies(MLIRTestTransforms MLIRStandardOpsIncGen) +add_dependencies(MLIRTestTransforms MLIRTestLinalgTransformPatternsIncGen) +add_dependencies(MLIRTestTransforms MLIRTestVectorTransformPatternsIncGen) diff --git a/mlir/tools/mlir-opt/CMakeLists.txt b/mlir/tools/mlir-opt/CMakeLists.txt --- a/mlir/tools/mlir-opt/CMakeLists.txt +++ b/mlir/tools/mlir-opt/CMakeLists.txt @@ -5,6 +5,7 @@ set(LIB_LIBS MLIRAnalysis MLIRLLVMIR + MLIROptMain MLIRParser MLIRPass MLIRTransforms @@ -12,8 +13,8 @@ ) add_llvm_library(MLIRMlirOptLib BUILDTREE_ONLY mlir-opt.cpp + LINK_LIBS ${LIB_LIBS} ) -target_link_libraries(MLIRMlirOptLib ${LIB_LIBS}) set(LIBS MLIRAnalysis