1 set(LLVM_LINK_COMPONENTS
12 set(ANALYSIS_TEST_SOURCES
14 AliasSetTrackerTest.cpp
15 AssumeBundleQueriesTest.cpp
16 BasicAliasAnalysisTest.cpp
17 BlockFrequencyInfoTest.cpp
18 BranchProbabilityInfoTest.cpp
20 CaptureTrackingTest.cpp
22 CGSCCPassManagerTest.cpp
23 ConstraintSystemTest.cpp
25 DomTreeUpdaterTest.cpp
27 FunctionPropertiesAnalysisTest.cpp
29 IRSimilarityIdentifierTest.cpp
35 MemoryBuiltinsTest.cpp
36 MemoryProfileInfoTest.cpp
40 PluginInlineAdvisorAnalysisTest.cpp
41 PluginInlineOrderAnalysisTest.cpp
42 ProfileSummaryInfoTest.cpp
43 ScalarEvolutionTest.cpp
44 VectorFunctionABITest.cpp
46 TargetLibraryInfoTest.cpp
49 UnrollAnalyzerTest.cpp
55 set(MLGO_TESTS TFUtilsTest.cpp)
58 LIST(APPEND ANALYSIS_TEST_SOURCES ${MLGO_TESTS})
60 LIST(APPEND LLVM_OPTIONAL_SOURCES ${MLGO_TESTS})
63 add_llvm_unittest_with_input_files(AnalysisTests
64 ${ANALYSIS_TEST_SOURCES}
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")
77 # Export symbols from the plugins shared objects.
79 export_executable_symbols_for_plugins(AnalysisTests)
82 add_subdirectory(InlineAdvisorPlugin)
83 add_subdirectory(InlineOrderPlugin)