1if (DEFINED LLVM_HAVE_TF_AOT OR DEFINED LLVM_HAVE_TF_API)
2  if (DEFINED LLVM_HAVE_TF_AOT)
3    include(TensorFlowCompile)
4    tfcompile(models/inliner serve action InlinerSizeModel llvm::InlinerSizeModel)
5    list(APPEND GeneratedMLSources
6      $<TARGET_OBJECTS:tf_xla_runtime_objects>
7      ${GENERATED_OBJS}
8    )
9  endif()
10
11  if (DEFINED LLVM_HAVE_TF_API)
12    LIST(APPEND MLLinkDeps ${tensorflow_c_api})
13  endif()
14endif()
15
16add_llvm_component_library(LLVMAnalysis
17  AliasAnalysis.cpp
18  AliasAnalysisEvaluator.cpp
19  AliasAnalysisSummary.cpp
20  AliasSetTracker.cpp
21  Analysis.cpp
22  AssumeBundleQueries.cpp
23  AssumptionCache.cpp
24  BasicAliasAnalysis.cpp
25  BlockFrequencyInfo.cpp
26  BlockFrequencyInfoImpl.cpp
27  BranchProbabilityInfo.cpp
28  CFG.cpp
29  CFGPrinter.cpp
30  CFLAndersAliasAnalysis.cpp
31  CFLSteensAliasAnalysis.cpp
32  CGSCCPassManager.cpp
33  CallGraph.cpp
34  CallGraphSCCPass.cpp
35  CallPrinter.cpp
36  CaptureTracking.cpp
37  CmpInstAnalysis.cpp
38  CostModel.cpp
39  CodeMetrics.cpp
40  ConstantFolding.cpp
41  DDG.cpp
42  ConstraintSystem.cpp
43  Delinearization.cpp
44  DemandedBits.cpp
45  DependenceAnalysis.cpp
46  DependenceGraphBuilder.cpp
47  DevelopmentModeInlineAdvisor.cpp
48  DivergenceAnalysis.cpp
49  DomPrinter.cpp
50  DomTreeUpdater.cpp
51  DominanceFrontier.cpp
52  EHPersonalities.cpp
53  FunctionPropertiesAnalysis.cpp
54  GlobalsModRef.cpp
55  GuardUtils.cpp
56  HeatUtils.cpp
57  IRSimilarityIdentifier.cpp
58  IVDescriptors.cpp
59  IVUsers.cpp
60  IndirectCallPromotionAnalysis.cpp
61  InlineCost.cpp
62  InlineAdvisor.cpp
63  InlineSizeEstimatorAnalysis.cpp
64  InstCount.cpp
65  InstructionPrecedenceTracking.cpp
66  InstructionSimplify.cpp
67  Interval.cpp
68  IntervalPartition.cpp
69  LazyBranchProbabilityInfo.cpp
70  LazyBlockFrequencyInfo.cpp
71  LazyCallGraph.cpp
72  LazyValueInfo.cpp
73  LegacyDivergenceAnalysis.cpp
74  Lint.cpp
75  Loads.cpp
76  LoopAccessAnalysis.cpp
77  LoopAnalysisManager.cpp
78  LoopCacheAnalysis.cpp
79  LoopNestAnalysis.cpp
80  LoopUnrollAnalyzer.cpp
81  LoopInfo.cpp
82  LoopPass.cpp
83  MLInlineAdvisor.cpp
84  MemDepPrinter.cpp
85  MemDerefPrinter.cpp
86  MemoryBuiltins.cpp
87  MemoryDependenceAnalysis.cpp
88  MemoryLocation.cpp
89  MemorySSA.cpp
90  MemorySSAUpdater.cpp
91  ModuleDebugInfoPrinter.cpp
92  ModuleSummaryAnalysis.cpp
93  MustExecute.cpp
94  ObjCARCAliasAnalysis.cpp
95  ObjCARCAnalysisUtils.cpp
96  ObjCARCInstKind.cpp
97  OptimizationRemarkEmitter.cpp
98  PHITransAddr.cpp
99  PhiValues.cpp
100  PostDominators.cpp
101  ProfileSummaryInfo.cpp
102  PtrUseVisitor.cpp
103  RegionInfo.cpp
104  RegionPass.cpp
105  RegionPrinter.cpp
106  ReleaseModeModelRunner.cpp
107  ReplayInlineAdvisor.cpp
108  ScalarEvolution.cpp
109  ScalarEvolutionAliasAnalysis.cpp
110  ScalarEvolutionDivision.cpp
111  ScalarEvolutionNormalization.cpp
112  StackLifetime.cpp
113  StackSafetyAnalysis.cpp
114  SyncDependenceAnalysis.cpp
115  SyntheticCountsUtils.cpp
116  TFUtils.cpp
117  TargetLibraryInfo.cpp
118  TargetTransformInfo.cpp
119  Trace.cpp
120  TypeBasedAliasAnalysis.cpp
121  TypeMetadataUtils.cpp
122  ScopedNoAliasAA.cpp
123  ValueLattice.cpp
124  ValueLatticeUtils.cpp
125  ValueTracking.cpp
126  VectorUtils.cpp
127  VFABIDemangling.cpp
128  ${GeneratedMLSources}
129
130  ADDITIONAL_HEADER_DIRS
131  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Analysis
132
133  DEPENDS
134  intrinsics_gen
135
136  LINK_LIBS
137  ${MLLinkDeps}
138
139  LINK_COMPONENTS
140  BinaryFormat
141  Core
142  Object
143  ProfileData
144  Support
145  )
146