1 if (DEFINED LLVM_HAVE_TF_AOT OR DEFINED LLVM_HAVE_TF_API)
2 include(TensorFlowCompile)
3 set(LLVM_INLINER_MODEL_PATH_DEFAULT "models/inliner-Oz")
5 # This url points to the most recent most which is known to be compatible with
6 # LLVM. When better models are published, this url should be updated to aid
8 set(LLVM_INLINER_MODEL_CURRENT_URL "https://github.com/google/ml-compiler-opt/releases/download/inlining-Oz-v1.1/inlining-Oz-99f0063-v1.1.tar.gz")
10 if (DEFINED LLVM_HAVE_TF_AOT)
11 # If the path is empty, autogenerate the model
12 if (NOT DEFINED LLVM_INLINER_MODEL_PATH OR "${LLVM_INLINER_MODEL_PATH}" STREQUAL "")
13 set(LLVM_INLINER_MODEL_PATH "autogenerate")
14 message(WARNING "LLVM_INLINER_MODEL_PATH was not set: autogenerating a model to finish the build.")
18 ${LLVM_INLINER_MODEL_PATH}
19 ${LLVM_INLINER_MODEL_CURRENT_URL}
20 ${LLVM_INLINER_MODEL_PATH_DEFAULT}
21 "models/inlining/config.py"
25 llvm::InlinerSizeModel
29 if (DEFINED LLVM_HAVE_TF_API)
30 list(APPEND MLLinkDeps ${tensorflow_c_api} ${tensorflow_fx})
34 add_llvm_component_library(LLVMAnalysis
36 AliasAnalysisEvaluator.cpp
37 AliasAnalysisSummary.cpp
40 AssumeBundleQueries.cpp
42 BasicAliasAnalysis.cpp
43 BlockFrequencyInfo.cpp
44 BlockFrequencyInfoImpl.cpp
45 BranchProbabilityInfo.cpp
48 CFLAndersAliasAnalysis.cpp
49 CFLSteensAliasAnalysis.cpp
64 DependenceAnalysis.cpp
65 DependenceGraphBuilder.cpp
66 DevelopmentModeInlineAdvisor.cpp
67 DivergenceAnalysis.cpp
72 FunctionPropertiesAnalysis.cpp
76 IRSimilarityIdentifier.cpp
79 ImportedFunctionsInliningStatistics.cpp
80 IndirectCallPromotionAnalysis.cpp
83 InlineSizeEstimatorAnalysis.cpp
85 InstructionPrecedenceTracking.cpp
86 InstructionSimplify.cpp
89 LazyBranchProbabilityInfo.cpp
90 LazyBlockFrequencyInfo.cpp
93 LegacyDivergenceAnalysis.cpp
96 LoopAccessAnalysis.cpp
97 LoopAnalysisManager.cpp
100 LoopUnrollAnalyzer.cpp
107 MemoryDependenceAnalysis.cpp
111 ModuleDebugInfoPrinter.cpp
112 ModuleSummaryAnalysis.cpp
114 ObjCARCAliasAnalysis.cpp
115 ObjCARCAnalysisUtils.cpp
117 OptimizationRemarkEmitter.cpp
118 OverflowInstAnalysis.cpp
122 ProfileSummaryInfo.cpp
127 ReleaseModeModelRunner.cpp
128 ReplayInlineAdvisor.cpp
130 ScalarEvolutionAliasAnalysis.cpp
131 ScalarEvolutionDivision.cpp
132 ScalarEvolutionNormalization.cpp
134 StackSafetyAnalysis.cpp
135 SyncDependenceAnalysis.cpp
136 SyntheticCountsUtils.cpp
138 TargetLibraryInfo.cpp
139 TargetTransformInfo.cpp
141 TypeBasedAliasAnalysis.cpp
142 TypeMetadataUtils.cpp
145 ValueLatticeUtils.cpp
149 ${GeneratedMLSources}
151 ADDITIONAL_HEADER_DIRS
152 ${LLVM_MAIN_INCLUDE_DIR}/llvm/Analysis