1 set(LLVM_LINK_COMPONENTS
13 set(ANALYSIS_TEST_SOURCES
15 AliasSetTrackerTest.cpp
16 AssumeBundleQueriesTest.cpp
17 BasicAliasAnalysisTest.cpp
18 BlockFrequencyInfoTest.cpp
19 BranchProbabilityInfoTest.cpp
21 CaptureTrackingTest.cpp
23 CGSCCPassManagerTest.cpp
24 ConstraintSystemTest.cpp
26 DomTreeUpdaterTest.cpp
28 FunctionPropertiesAnalysisTest.cpp
30 IRSimilarityIdentifierTest.cpp
36 MemoryBuiltinsTest.cpp
37 MemoryProfileInfoTest.cpp
41 PluginInlineAdvisorAnalysisTest.cpp
42 PluginInlineOrderAnalysisTest.cpp
43 ProfileSummaryInfoTest.cpp
44 ReplaceWithVecLibTest.cpp
45 ScalarEvolutionTest.cpp
47 TargetLibraryInfoTest.cpp
50 UnrollAnalyzerTest.cpp
56 set(MLGO_TESTS TFUtilsTest.cpp)
59 LIST(APPEND ANALYSIS_TEST_SOURCES ${MLGO_TESTS})
61 LIST(APPEND LLVM_OPTIONAL_SOURCES ${MLGO_TESTS})
64 add_llvm_unittest_with_input_files(AnalysisTests
65 ${ANALYSIS_TEST_SOURCES}
68 add_dependencies(AnalysisTests intrinsics_gen)
70 target_link_libraries(AnalysisTests PRIVATE LLVMTestingSupport)
72 # On AIX, enable run-time linking to allow symbols from the plugins shared
73 # objects to be properly bound.
74 if(CMAKE_SYSTEM_NAME STREQUAL "AIX")
75 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-brtl")
78 # Export symbols from the plugins shared objects.
80 export_executable_symbols_for_plugins(AnalysisTests)
83 add_subdirectory(InlineAdvisorPlugin)
84 add_subdirectory(InlineOrderPlugin)