1 if (DEFINED LLVM_HAVE_TF_AOT OR DEFINED LLVM_HAVE_TF_API)
2 include(TensorFlowCompile)
3 set(LLVM_RAEVICT_MODEL_PATH_DEFAULT "models/regalloc-eviction")
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_RAEVICT_MODEL_CURRENT_URL "https://github.com/google/ml-compiler-opt/releases/download/regalloc-evict-v1.0/regalloc-evict-e67430c-v1.0.tar.gz")
10 if (DEFINED LLVM_HAVE_TF_AOT)
12 ${LLVM_RAEVICT_MODEL_PATH}
13 ${LLVM_RAEVICT_MODEL_CURRENT_URL}
14 ${LLVM_RAEVICT_MODEL_PATH_DEFAULT}
15 "../Analysis/models/gen-regalloc-eviction-test-model.py"
19 llvm::RegallocEvictModel
23 if (DEFINED LLVM_HAVE_TF_API)
24 list(APPEND MLLinkDeps ${tensorflow_c_api} ${tensorflow_fx})
28 add_llvm_component_library(LLVMCodeGen
29 AggressiveAntiDepBreaker.cpp
33 BasicTargetTransformInfo.cpp
37 BasicBlockSections.cpp
44 CodeGenPassBuilder.cpp
47 CriticalAntiDepBreaker.cpp
48 DeadMachineInstructionElim.cpp
54 EHContGuardCatchret.cpp
55 ExecutionDomainFix.cpp
57 ExpandPostRAPseudos.cpp
59 ExpandVectorPredication.cpp
63 FixupStatepointCallerSaved.cpp
71 ImplicitNullChecks.cpp
72 IndirectBrExpandPass.cpp
75 InterleavedAccessPass.cpp
76 InterleavedLoadCombinePass.cpp
79 LatencyPriorityQueue.cpp
80 LazyMachineBlockFrequencyInfo.cpp
82 LiveDebugVariables.cpp
96 LocalStackSlotAllocation.cpp
100 MachineBasicBlock.cpp
101 MachineBlockFrequencyInfo.cpp
102 MachineBlockPlacement.cpp
103 MachineBranchProbabilityInfo.cpp
105 MachineCopyPropagation.cpp
107 MachineCheckDebugify.cpp
108 MachineCycleAnalysis.cpp
110 MachineDominanceFrontier.cpp
111 MachineDominators.cpp
114 MachineFunctionPass.cpp
115 MachineFunctionPrinterPass.cpp
116 MachineFunctionSplitter.cpp
117 MachineInstrBundle.cpp
122 MachineModuleInfo.cpp
123 MachineModuleInfoImpls.cpp
124 MachineModuleSlotTracker.cpp
126 MachineOptimizationRemarkEmitter.cpp
128 MachinePassManager.cpp
130 MachinePostDominators.cpp
131 MachineRegionInfo.cpp
132 MachineRegisterInfo.cpp
136 MachineSSAContext.cpp
137 MachineSSAUpdater.cpp
138 MachineStripDebug.cpp
139 MachineTraceMetrics.cpp
141 MIRFSDiscriminator.cpp
144 MLRegallocEvictAdvisor.cpp
146 MultiHazardRecognizer.cpp
147 PatchableFunction.cpp
152 NonRelocatableStringpool.cpp
155 PeepholeOptimizer.cpp
157 PHIEliminationUtils.cpp
158 PostRAHazardRecognizer.cpp
159 PostRASchedulerList.cpp
160 PreISelIntrinsicLowering.cpp
161 ProcessImplicitDefs.cpp
162 PrologEpilogInserter.cpp
163 PseudoProbeInserter.cpp
164 PseudoSourceValue.cpp
168 ReachingDefAnalysis.cpp
171 RegAllocEvictionAdvisor.cpp
176 RegisterClassInfo.cpp
177 RegisterCoalescer.cpp
179 RegisterScavenging.cpp
180 RemoveRedundantDebugValues.cpp
181 RenameIndependentSubregs.cpp
182 MachineStableHash.cpp
183 MIRVRegNamerUtils.cpp
185 MIRCanonicalizerPass.cpp
186 RegisterUsageInfo.cpp
187 RegUsageInfoCollector.cpp
188 RegUsageInfoPropagate.cpp
189 ReplaceWithVeclib.cpp
190 ResetMachineFunctionPass.cpp
196 ScheduleDAGInstrs.cpp
197 ScheduleDAGPrinter.cpp
198 ScoreboardHazardRecognizer.cpp
199 ShadowStackGCLowering.cpp
206 StackMapLivenessAnalysis.cpp
209 StackSlotColoring.cpp
210 SwiftErrorValueTracking.cpp
211 SwitchLoweringUtils.cpp
214 TargetFrameLoweringImpl.cpp
216 TargetLoweringBase.cpp
217 TargetLoweringObjectFileImpl.cpp
218 TargetOptionsImpl.cpp
220 TargetRegisterInfo.cpp
222 TargetSubtargetInfo.cpp
224 TwoAddressInstructionPass.cpp
225 UnreachableBlockElim.cpp
227 VLIWMachineScheduler.cpp
231 XRayInstrumentation.cpp
232 ${GeneratedMLSources}
234 LiveDebugValues/LiveDebugValues.cpp
235 LiveDebugValues/VarLocBasedImpl.cpp
236 LiveDebugValues/InstrRefBasedImpl.cpp
238 ADDITIONAL_HEADER_DIRS
239 ${LLVM_MAIN_INCLUDE_DIR}/llvm/CodeGen
240 ${LLVM_MAIN_INCLUDE_DIR}/llvm/CodeGen/PBQP
242 LINK_LIBS ${LLVM_PTHREAD_LIB} ${MLLinkDeps}
261 add_subdirectory(SelectionDAG)
262 add_subdirectory(AsmPrinter)
263 add_subdirectory(MIRParser)
264 add_subdirectory(GlobalISel)