Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / unittests / Analysis / CMakeLists.txt
blob847430bf17697ab1108f17f86732b07f8938645b
1 set(LLVM_LINK_COMPONENTS
2   Analysis
3   AsmParser
4   Core
5   Passes
6   Support
7   TargetParser
8   TransformUtils
9   IPO
10   )
12 set(ANALYSIS_TEST_SOURCES
13   AliasAnalysisTest.cpp
14   AliasSetTrackerTest.cpp
15   AssumeBundleQueriesTest.cpp
16   BasicAliasAnalysisTest.cpp
17   BlockFrequencyInfoTest.cpp
18   BranchProbabilityInfoTest.cpp
19   CallGraphTest.cpp
20   CaptureTrackingTest.cpp
21   CFGTest.cpp
22   CGSCCPassManagerTest.cpp
23   ConstraintSystemTest.cpp
24   DDGTest.cpp
25   DomTreeUpdaterTest.cpp
26   GlobalsModRefTest.cpp
27   FunctionPropertiesAnalysisTest.cpp
28   InlineCostTest.cpp
29   IRSimilarityIdentifierTest.cpp
30   IVDescriptorsTest.cpp
31   LazyCallGraphTest.cpp
32   LoadsTest.cpp
33   LoopInfoTest.cpp
34   LoopNestTest.cpp
35   MemoryBuiltinsTest.cpp
36   MemoryProfileInfoTest.cpp
37   MemorySSATest.cpp
38   MLModelRunnerTest.cpp
39   PhiValuesTest.cpp
40   PluginInlineAdvisorAnalysisTest.cpp
41   PluginInlineOrderAnalysisTest.cpp
42   ProfileSummaryInfoTest.cpp
43   ScalarEvolutionTest.cpp
44   VectorFunctionABITest.cpp
45   SparsePropagation.cpp
46   TargetLibraryInfoTest.cpp
47   TensorSpecTest.cpp
48   TBAATest.cpp
49   UnrollAnalyzerTest.cpp
50   ValueLatticeTest.cpp
51   ValueTrackingTest.cpp
52   VectorUtilsTest.cpp
53   )
55 set(MLGO_TESTS TFUtilsTest.cpp)
57 if (LLVM_HAVE_TFLITE)
58   LIST(APPEND ANALYSIS_TEST_SOURCES ${MLGO_TESTS})
59 else()
60   LIST(APPEND LLVM_OPTIONAL_SOURCES ${MLGO_TESTS})
61 endif()
63 add_llvm_unittest_with_input_files(AnalysisTests
64   ${ANALYSIS_TEST_SOURCES}
65   )
67 add_dependencies(AnalysisTests intrinsics_gen)
69 target_link_libraries(AnalysisTests PRIVATE LLVMTestingSupport)
71 # On AIX, enable run-time linking to allow symbols from the plugins shared
72 # objects to be properly bound.
73 if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
74   set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-brtl")
75 endif()
77 # Export symbols from the plugins shared objects.
78 if(NOT WIN32)
79   export_executable_symbols_for_plugins(AnalysisTests)
80 endif()
82 add_subdirectory(InlineAdvisorPlugin)
83 add_subdirectory(InlineOrderPlugin)