Refactor Reduction Tree Pass
[lldb.git] / mlir / tools / mlir-reduce / CMakeLists.txt
1 get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS)
2 get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS)
3 set(LLVM_LINK_COMPONENTS
4   AllTargetsAsmParsers
5   AllTargetsCodeGens
6   AllTargetsDescs
7   AllTargetsInfos
8   AsmParser
9   Core
10   IRReader
11   Support
12   Target
13   TransformUtils
14   )
15
16 set(LIBS
17   ${dialect_libs}
18   ${conversion_libs}
19   ${test_libs}
20   MLIRAnalysis
21   MLIRDialect
22   MLIREDSC
23   MLIRIR
24   MLIRLoopAnalysis
25   MLIROptLib
26   MLIRParser
27   MLIRPass
28   MLIRReduce
29   MLIRSupport
30   MLIRTransforms
31   MLIRTransformUtils
32   )
33
34 add_llvm_tool(mlir-reduce
35   OptReductionPass.cpp
36   Passes/OpReducer.cpp
37   ReductionNode.cpp
38   ReductionTreeUtils.cpp
39   mlir-reduce.cpp
40
41   ADDITIONAL_HEADER_DIRS
42   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Reducer
43
44   DEPENDS
45   MLIRReducerIncGen
46   )
47
48 target_link_libraries(mlir-reduce PRIVATE ${LIBS})
49 llvm_update_compile_flags(mlir-reduce)
50
51 mlir_check_all_link_libraries(mlir-reduce)