File tree Expand file tree Collapse file tree 28 files changed +113
-26
lines changed Expand file tree Collapse file tree 28 files changed +113
-26
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ endfunction()
7
7
# TODO: This is to handle the current static registration, but should be
8
8
# factored out a bit.
9
9
function (whole_archive_link target )
10
+ add_dependencies (${target} ${ARGN} )
10
11
if ("${CMAKE_SYSTEM_NAME} " STREQUAL "Darwin" )
11
12
set (link_flags "-L${CMAKE_BINARY_DIR} /lib " )
12
13
FOREACH (LIB ${ARGN} )
Original file line number Diff line number Diff line change @@ -23,6 +23,5 @@ add_dependencies(MLIRAnalysis
23
23
MLIRCallOpInterfacesIncGen
24
24
MLIRTypeInferOpInterfaceIncGen
25
25
MLIRLoopOps
26
- MLIRVectorOps
27
26
)
28
- target_link_libraries (MLIRAnalysis MLIRAffineOps MLIRLoopOps MLIRVectorOps )
27
+ target_link_libraries (MLIRAnalysis MLIRAffineOps MLIRLoopOps )
Original file line number Diff line number Diff line change @@ -17,7 +17,10 @@ target_link_libraries(
17
17
MLIRAffineToStandard
18
18
19
19
MLIRAffineOps
20
+ MLIRLoopOps
21
+ MLIRPass
20
22
MLIRStandardOps
23
+ MLIRTransforms
21
24
MLIRIR
22
25
LLVMCore
23
26
LLVMSupport
Original file line number Diff line number Diff line change @@ -15,4 +15,6 @@ target_link_libraries(MLIRGPUtoNVVMTransforms
15
15
MLIRLLVMIR
16
16
MLIRNVVMIR
17
17
MLIRPass
18
+ MLIRStandardToLLVM
19
+ MLIRTransformUtils
18
20
)
Original file line number Diff line number Diff line change @@ -7,4 +7,5 @@ target_link_libraries(MLIRGPUtoROCDLTransforms
7
7
MLIRLLVMIR
8
8
MLIRROCDLIR
9
9
MLIRPass
10
+ MLIRStandardToLLVM
10
11
)
Original file line number Diff line number Diff line change @@ -5,8 +5,14 @@ add_llvm_library(MLIRLinalgToLLVM
5
5
${MLIR_MAIN_INCLUDE_DIR} /mlir/Conversion/LinalgToLLVM
6
6
)
7
7
set (LIBS
8
+ MLIRAffineToStandard
9
+ MLIREDSC
10
+ MLIRIR
8
11
MLIRLinalgOps
9
12
MLIRLLVMIR
13
+ MLIRLoopToStandard
14
+ MLIRStandardToLLVM
15
+ MLIRVectorToLLVM
10
16
MLIRTransforms
11
17
LLVMCore
12
18
LLVMSupport
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ add_llvm_library(MLIRLinalgToSPIRVTransforms
10
10
target_link_libraries (MLIRLinalgToSPIRVTransforms
11
11
MLIRIR
12
12
MLIRLinalgOps
13
+ MLIRLinalgUtils
13
14
MLIRPass
14
15
MLIRSPIRV
15
16
MLIRSupport
Original file line number Diff line number Diff line change 1
1
set (LIBS
2
2
MLIRAffineOps
3
+ MLIRAffineToStandard
3
4
MLIRGPU
4
5
MLIRIR
5
6
MLIRLinalgOps
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ add_llvm_library(MLIRVectorToLLVM
6
6
)
7
7
set (LIBS
8
8
MLIRLLVMIR
9
+ MLIRStandardToLLVM
10
+ MLIRVectorOps
9
11
MLIRTransforms
10
12
LLVMCore
11
13
LLVMSupport
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ add_llvm_library(MLIRVectorToLoops
5
5
${MLIR_MAIN_INCLUDE_DIR} /mlir/Conversion/VectorToLoops
6
6
)
7
7
set (LIBS
8
+ MLIREDSC
8
9
MLIRLLVMIR
9
10
MLIRTransforms
10
11
LLVMCore
Original file line number Diff line number Diff line change @@ -6,6 +6,14 @@ add_llvm_library(MLIRFxpMathOps
6
6
ADDITIONAL_HEADER_DIRS
7
7
${MLIR_MAIN_INCLUDE_DIR} /mlir/Dialect/FxpMathOps
8
8
)
9
+
10
+ target_link_libraries (MLIRFxpMathOps
11
+ MLIRQuantOps
12
+ MLIRIR
13
+ MLIRPass
14
+ MLIRSupport
15
+ MLIRStandardOps
16
+ )
9
17
add_dependencies (MLIRFxpMathOps
10
18
MLIRFxpMathOpsIncGen
11
19
MLIRQuantOps
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ target_link_libraries(MLIRGPU
22
22
MLIRIR
23
23
MLIRLLVMIR
24
24
MLIRLoopOps
25
+ MLIRPass
26
+ MLIRStandardOps
25
27
MLIRSupport
26
28
MLIRTransformUtils
27
29
LLVMSupport )
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ add_llvm_library(MLIRNVVMIR
14
14
${MLIR_MAIN_INCLUDE_DIR} /mlir/Dialect/LLVMIR
15
15
)
16
16
add_dependencies (MLIRNVVMIR MLIRNVVMOpsIncGen MLIRNVVMConversionsIncGen LLVMAsmParser LLVMCore LLVMSupport )
17
- target_link_libraries (MLIRNVVMIR LLVMAsmParser LLVMCore LLVMSupport MLIRIR )
17
+ target_link_libraries (MLIRNVVMIR LLVMAsmParser MLIRIR MLIRLLVMIR LLVMSupport LLVMCore )
18
18
19
19
add_llvm_library (MLIRROCDLIR
20
20
IR/ROCDLDialect.cpp
Original file line number Diff line number Diff line change 1
1
set (LIBS
2
2
3
3
MLIRIR
4
+ MLIRStandardOps
4
5
)
5
6
6
7
add_llvm_library (MLIRLinalgOps
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ add_llvm_library(MLIRLoopOps
6
6
${MLIR_MAIN_INCLUDE_DIR} /mlir/LoopOps
7
7
)
8
8
add_dependencies (MLIRLoopOps MLIRLoopLikeInterfaceIncGen MLIRLoopOpsIncGen MLIRStandardOps LLVMSupport )
9
- target_link_libraries (MLIRLoopOps LLVMSupport )
9
+ target_link_libraries (MLIRLoopOps MLIRStandardOps LLVMSupport MLIRIR )
Original file line number Diff line number Diff line change @@ -6,3 +6,4 @@ add_llvm_library(MLIROpenMP
6
6
)
7
7
8
8
add_dependencies (MLIROpenMP MLIROpenMPOpsIncGen )
9
+ target_link_libraries (MLIROpenMP MLIRIR )
Original file line number Diff line number Diff line change @@ -19,3 +19,11 @@ add_dependencies(MLIRQuantOps
19
19
MLIRQuantOpsIncGen
20
20
MLIRSupport
21
21
MLIRStandardOps )
22
+
23
+ target_link_libraries (MLIRQuantOps
24
+ MLIRIR
25
+ MLIRPass
26
+ MLIRSupport
27
+ MLIRStandardOps
28
+ MLIRTransformUtils
29
+ )
Original file line number Diff line number Diff line change @@ -14,4 +14,5 @@ add_dependencies(MLIRSPIRVSerialization
14
14
target_link_libraries (MLIRSPIRVSerialization
15
15
MLIRIR
16
16
MLIRSPIRV
17
- MLIRSupport )
17
+ MLIRSupport
18
+ MLIRTranslation )
Original file line number Diff line number Diff line change @@ -11,4 +11,4 @@ add_llvm_library(MLIRVectorOps
11
11
add_dependencies (MLIRVectorOps MLIRVectorOpsIncGen )
12
12
add_dependencies (MLIRVectorOps MLIRVectorTransformPatternsIncGen )
13
13
14
- target_link_libraries (MLIRVectorOps MLIRIR )
14
+ target_link_libraries (MLIRVectorOps MLIRAnalysis MLIRIR MLIRStandardOps MLIRAffineOps MLIRLoopOps )
Original file line number Diff line number Diff line change @@ -15,12 +15,14 @@ add_llvm_library(MLIREDSC
15
15
)
16
16
target_link_libraries (MLIREDSC
17
17
PUBLIC
18
- MLIRAffineOps
19
- MLIRLoopOps
20
- MLIRStandardOps
21
- MLIRTransformUtils
22
- MLIRVectorOps
23
- )
18
+ MLIRAffineOps
19
+ MLIRIR
20
+ MLIRLoopOps
21
+ MLIRStandardOps
22
+ MLIRSupport
23
+ MLIRTransformUtils
24
+ MLIRVectorOps
25
+ )
24
26
25
27
add_llvm_library (MLIREDSCInterface
26
28
CoreAPIs.cpp
@@ -29,9 +31,9 @@ add_llvm_library(MLIREDSCInterface
29
31
${MLIR_MAIN_INCLUDE_DIR} /mlir/EDSC
30
32
)
31
33
add_dependencies (MLIREDSCInterface MLIRIR )
32
- target_link_libraries (MLIREDSC
34
+ target_link_libraries (MLIREDSCInterface
33
35
PUBLIC
34
- MLIRIR
35
- MLIRSupport
36
- MLIRParser
37
- )
36
+ MLIRIR
37
+ MLIRSupport
38
+ MLIRParser
39
+ )
Original file line number Diff line number Diff line change @@ -14,7 +14,15 @@ target_link_libraries(MLIRExecutionEngine
14
14
LLVMBitWriter
15
15
LLVMExecutionEngine
16
16
LLVMOrcJIT
17
+ LLVMJITLink
17
18
LLVMSupport
19
+ LLVMAnalysis
20
+ LLVMAggressiveInstCombine
21
+ LLVMInstCombine
22
+ LLVMMC
23
+ LLVMScalarOpts
24
+ LLVMTarget
25
+ LLVMVectorize
18
26
LLVMTransformUtils
19
27
20
28
${outlibs} )
Original file line number Diff line number Diff line change @@ -10,21 +10,36 @@ add_llvm_library(MLIRQuantizerSupport
10
10
11
11
ADDITIONAL_HEADER_DIRS
12
12
)
13
+
13
14
add_dependencies (MLIRQuantizerSupport
14
15
MLIRIR
15
16
MLIRQuantOps
16
17
MLIRSupport
17
18
MLIRStandardOps )
19
+ target_link_libraries (MLIRQuantizerSupport
20
+ MLIRIR
21
+ MLIRQuantOps
22
+ MLIRSupport
23
+ MLIRStandardOps
24
+ LLVMSupport
25
+ )
18
26
19
27
# Configurations.
20
28
add_llvm_library (MLIRQuantizerFxpMathConfig
21
29
Configurations /FxpMathConfig.cpp
22
30
23
31
ADDITIONAL_HEADER_DIRS
24
32
)
33
+
25
34
add_dependencies (MLIRQuantizerFxpMathConfig
26
35
MLIRFxpMathOpsIncGen
27
36
MLIRQuantizerSupport )
37
+ target_link_libraries (MLIRQuantizerFxpMathConfig
38
+ MLIRIR
39
+ MLIRFxpMathOps
40
+ MLIRQuantOps
41
+ MLIRQuantizerSupport
42
+ )
28
43
29
44
# Transforms.
30
45
add_llvm_library (MLIRQuantizerTransforms
@@ -39,6 +54,10 @@ add_dependencies(MLIRQuantizerTransforms
39
54
MLIRQuantizerSupport
40
55
MLIRPass )
41
56
target_link_libraries (MLIRQuantizerTransforms
57
+ MLIRIR
42
58
MLIRQuantizerFxpMathConfig
43
59
MLIRQuantizerSupport
44
- MLIRPass )
60
+ MLIRQuantOps
61
+ MLIRPass
62
+ LLVMSupport
63
+ )
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ add_llvm_library(MLIROptMain
25
25
)
26
26
target_link_libraries (MLIROptMain
27
27
MLIRPass
28
+ MLIRParser
28
29
LLVMSupport
29
30
MLIRSupport
30
31
)
@@ -35,7 +36,7 @@ add_llvm_library(MLIRTranslateClParser
35
36
ADDITIONAL_HEADER_DIRS
36
37
${MLIR_MAIN_INCLUDE_DIR} /mlir/Support
37
38
)
38
- target_link_libraries (MLIRTranslateClParser LLVMSupport )
39
+ target_link_libraries (MLIRTranslateClParser LLVMSupport MLIRIR MLIRTranslation MLIRParser )
39
40
40
41
add_llvm_library (MLIRJitRunner
41
42
JitRunner.cpp
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ add_llvm_library(MLIRSPIRVTestPasses
6
6
${MLIR_MAIN_INCLUDE_DIR} /mlir/IR
7
7
)
8
8
9
- target_link_libraries (MLIRSPIRVTestPasses
9
+ target_link_libraries (MLIRSPIRVTestPasses PRIVATE
10
10
MLIRIR
11
11
MLIRPass
12
12
MLIRSPIRV
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../TestDialect)
9
9
include_directories (${CMAKE_CURRENT_BINARY_DIR} /../TestDialect )
10
10
add_dependencies (MLIRTestIR
11
11
MLIRTestDialect
12
- )
12
+ )
13
13
target_link_libraries (MLIRTestIR
14
14
MLIRPass
15
15
)
Original file line number Diff line number Diff line change @@ -17,12 +17,14 @@ add_llvm_library(MLIRTestDialect
17
17
)
18
18
add_dependencies (MLIRTestDialect
19
19
MLIRTestOpsIncGen
20
- MLIRIR
21
- LLVMSupport
22
20
MLIRTypeInferOpInterfaceIncGen
23
21
)
24
22
target_link_libraries (MLIRTestDialect
25
23
MLIRDialect
26
24
MLIRIR
25
+ MLIRLinalgTransforms
26
+ MLIRPass
27
+ MLIRTransforms
28
+ MLIRTransformUtils
27
29
LLVMSupport
28
30
)
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ add_llvm_library(MLIRTestTransforms
17
17
18
18
ADDITIONAL_HEADER_DIRS
19
19
${MLIR_MAIN_INCLUDE_DIR} /mlir/Transforms
20
- )
20
+ )
21
+
21
22
include_directories (${CMAKE_CURRENT_SOURCE_DIR} /../TestDialect )
22
23
include_directories (${CMAKE_CURRENT_BINARY_DIR} /../TestDialect )
23
24
include_directories (${CMAKE_CURRENT_SOURCE_DIR} /../DeclarativeTransforms )
@@ -36,5 +37,7 @@ target_link_libraries(MLIRTestTransforms
36
37
MLIRGPU
37
38
MLIRPass
38
39
MLIRTestDialect
40
+ MLIRTransformUtils
41
+ MLIRVectorToLoops
39
42
MLIRVectorOps
40
43
)
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ set(LLVM_OPTIONAL_SOURCES
5
5
set (LIB_LIBS
6
6
MLIRAnalysis
7
7
MLIRLLVMIR
8
+ MLIROptMain
8
9
MLIRParser
9
10
MLIRPass
10
11
MLIRTransforms
@@ -13,12 +14,15 @@ set(LIB_LIBS
13
14
add_llvm_library (MLIRMlirOptLib
14
15
mlir-opt.cpp
15
16
)
16
- target_link_libraries (MLIRMlirOptLib ${LIB_LIBS} )
17
+ target_link_libraries (MLIRMlirOptLib
18
+ ${LIB_LIBS}
19
+ )
17
20
18
21
set (LIBS
19
22
MLIRAnalysis
20
23
MLIRAffineOps
21
24
MLIRAffineToStandard
25
+ MLIRDialect
22
26
MLIRLoopsToGPU
23
27
MLIRLinalgToLLVM
24
28
@@ -30,13 +34,19 @@ set(LIBS
30
34
MLIRGPUtoROCDLTransforms
31
35
MLIRGPUtoSPIRVTransforms
32
36
MLIRLinalgOps
37
+ MLIRLinalgAnalysis
38
+ MLIRLinalgEDSC
39
+ MLIRLinalgTransforms
40
+ MLIRLinalgUtils
33
41
MLIRLLVMIR
34
42
MLIRLoopOps
35
43
MLIRNVVMIR
36
44
MLIROpenMP
37
45
MLIROptMain
38
46
MLIRParser
39
47
MLIRPass
48
+ MLIRQuantizerFxpMathConfig
49
+ MLIRQuantizerSupport
40
50
MLIRQuantizerTransforms
41
51
MLIRQuantOps
42
52
MLIRROCDLIR
@@ -48,6 +58,7 @@ set(LIBS
48
58
MLIRStandardOps
49
59
MLIRStandardToLLVM
50
60
MLIRTransforms
61
+ MLIRTransformUtils
51
62
MLIRTestDialect
52
63
MLIRTestIR
53
64
MLIRTestPass
@@ -66,5 +77,8 @@ add_llvm_tool(mlir-opt
66
77
mlir-opt.cpp
67
78
)
68
79
llvm_update_compile_flags (mlir-opt )
80
+ # It is necessary to use whole_archive_link to ensure that all static
81
+ # initializers are called. However, whole_archive_link libraries cannot
82
+ # also be target_link_libraries
69
83
whole_archive_link (mlir-opt ${LIBS} )
70
- target_link_libraries (mlir-opt PRIVATE MLIRIR MLIRMlirOptLib ${LIBS} LLVMSupport )
84
+ target_link_libraries (mlir-opt PRIVATE MLIRIR MLIROptMain LLVMSupport LLVMCore LLVMAsmParser )
You can’t perform that action at this time.
0 commit comments