CMakeLists.txt
1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
set(LLVM_OPTIONAL_SOURCES
null.cpp
)
set(LIB_LIBS
MLIRAnalysis
MLIRLLVMIR
MLIRParser
MLIRPass
MLIRTransforms
MLIRSupport
)
add_llvm_library(MLIRMlirOptLib
mlir-opt.cpp
)
target_link_libraries(MLIRMlirOptLib ${LIB_LIBS})
set(LIBS
MLIRAnalysis
MLIRAffineOps
MLIRAffineToStandard
MLIRLoopsToGPU
MLIRLinalgToLLVM
MLIRLoopToStandard
MLIREDSC
MLIRFxpMathOps
MLIRGPU
MLIRGPUtoNVVMTransforms
MLIRGPUtoROCDLTransforms
MLIRGPUtoSPIRVTransforms
MLIRLinalg
MLIRLLVMIR
MLIRLoopOps
MLIRNVVMIR
MLIROptMain
MLIRParser
MLIRPass
MLIRQuantizerTransforms
MLIRQuantOps
MLIRROCDLIR
MLIRSPIRV
MLIRStandardToSPIRVTransforms
MLIRSPIRVTestPasses
MLIRSPIRVTransforms
MLIRStandardOps
MLIRStandardToLLVM
MLIRTransforms
MLIRTestDialect
MLIRTestIR
MLIRTestPass
MLIRTestTransforms
MLIRSupport
MLIRVectorOps
MLIRVectorToLLVM
MLIRVectorToLoops
)
if(MLIR_CUDA_CONVERSIONS_ENABLED)
list(APPEND LIBS
MLIRGPUtoCUDATransforms
)
endif()
add_llvm_tool(mlir-opt
mlir-opt.cpp
)
llvm_update_compile_flags(mlir-opt)
whole_archive_link(mlir-opt ${LIBS})
target_link_libraries(mlir-opt PRIVATE MLIRIR MLIRMlirOptLib ${LIBS} LLVMSupport)