Create 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   Passes/FunctionReducer.cpp
36   ReductionNode.cpp
37   ReductionTreePass.cpp
38   mlir-reduce.cpp
39
40   ADDITIONAL_HEADER_DIRS
41   ${MLIR_MAIN_INCLUDE_DIR}/mlir/Reducer
42
43   DEPENDS
44   MLIRReducerIncGen
45   )
46
47 target_link_libraries(mlir-reduce PRIVATE ${LIBS})
48 llvm_update_compile_flags(mlir-reduce)
49
50 mlir_check_all_link_libraries(mlir-reduce)