1if (DEFINED LLVM_HAVE_TF_AOT OR DEFINED LLVM_HAVE_TF_API) 2 include(TensorFlowCompile) 3 set(LLVM_RAEVICT_MODEL_PATH_DEFAULT "models/regalloc-eviction") 4 5 set(LLVM_RAEVICT_MODEL_CURRENT_URL "<UNSPECIFIED>") 6 7 if (DEFINED LLVM_HAVE_TF_AOT) 8 tf_find_and_compile( 9 ${LLVM_RAEVICT_MODEL_PATH} 10 ${LLVM_RAEVICT_MODEL_CURRENT_URL} 11 ${LLVM_RAEVICT_MODEL_PATH_DEFAULT} 12 "../Analysis/models/gen-regalloc-eviction-test-model.py" 13 serve 14 action 15 RegallocEvictModel 16 llvm::RegallocEvictModel 17 ) 18 endif() 19 20 if (DEFINED LLVM_HAVE_TF_API) 21 list(APPEND MLLinkDeps ${tensorflow_c_api} ${tensorflow_fx}) 22 endif() 23endif() 24 25add_llvm_component_library(LLVMCodeGen 26 AggressiveAntiDepBreaker.cpp 27 AllocationOrder.cpp 28 Analysis.cpp 29 AtomicExpandPass.cpp 30 BasicTargetTransformInfo.cpp 31 BranchFolding.cpp 32 BranchRelaxation.cpp 33 BreakFalseDeps.cpp 34 BasicBlockSections.cpp 35 BasicBlockSectionsProfileReader.cpp 36 CalcSpillWeights.cpp 37 CallingConvLower.cpp 38 CFGuardLongjmp.cpp 39 CFIFixup.cpp 40 CFIInstrInserter.cpp 41 CodeGen.cpp 42 CodeGenCommonISel.cpp 43 CodeGenPassBuilder.cpp 44 CodeGenPrepare.cpp 45 CommandFlags.cpp 46 CriticalAntiDepBreaker.cpp 47 DeadMachineInstructionElim.cpp 48 DetectDeadLanes.cpp 49 DFAPacketizer.cpp 50 DwarfEHPrepare.cpp 51 EarlyIfConversion.cpp 52 EdgeBundles.cpp 53 EHContGuardCatchret.cpp 54 ExecutionDomainFix.cpp 55 ExpandMemCmp.cpp 56 ExpandPostRAPseudos.cpp 57 ExpandReductions.cpp 58 ExpandVectorPredication.cpp 59 FaultMaps.cpp 60 FEntryInserter.cpp 61 FinalizeISel.cpp 62 FixupStatepointCallerSaved.cpp 63 FuncletLayout.cpp 64 GCMetadata.cpp 65 GCMetadataPrinter.cpp 66 GCRootLowering.cpp 67 GlobalMerge.cpp 68 HardwareLoops.cpp 69 IfConversion.cpp 70 ImplicitNullChecks.cpp 71 IndirectBrExpandPass.cpp 72 InlineSpiller.cpp 73 InterferenceCache.cpp 74 InterleavedAccessPass.cpp 75 InterleavedLoadCombinePass.cpp 76 IntrinsicLowering.cpp 77 JMCInstrumenter.cpp 78 LatencyPriorityQueue.cpp 79 LazyMachineBlockFrequencyInfo.cpp 80 LexicalScopes.cpp 81 LiveDebugVariables.cpp 82 LiveIntervals.cpp 83 LiveInterval.cpp 84 LiveIntervalUnion.cpp 85 LivePhysRegs.cpp 86 LiveRangeCalc.cpp 87 LiveIntervalCalc.cpp 88 LiveRangeEdit.cpp 89 LiveRangeShrink.cpp 90 LiveRegMatrix.cpp 91 LiveRegUnits.cpp 92 LiveStacks.cpp 93 LiveVariables.cpp 94 LLVMTargetMachine.cpp 95 LocalStackSlotAllocation.cpp 96 LoopTraversal.cpp 97 LowLevelType.cpp 98 LowerEmuTLS.cpp 99 MachineBasicBlock.cpp 100 MachineBlockFrequencyInfo.cpp 101 MachineBlockPlacement.cpp 102 MachineBranchProbabilityInfo.cpp 103 MachineCombiner.cpp 104 MachineCopyPropagation.cpp 105 MachineCSE.cpp 106 MachineCheckDebugify.cpp 107 MachineCycleAnalysis.cpp 108 MachineDebugify.cpp 109 MachineDominanceFrontier.cpp 110 MachineDominators.cpp 111 MachineFrameInfo.cpp 112 MachineFunction.cpp 113 MachineFunctionPass.cpp 114 MachineFunctionPrinterPass.cpp 115 MachineFunctionSplitter.cpp 116 MachineInstrBundle.cpp 117 MachineInstr.cpp 118 MachineLICM.cpp 119 MachineLoopInfo.cpp 120 MachineLoopUtils.cpp 121 MachineModuleInfo.cpp 122 MachineModuleInfoImpls.cpp 123 MachineModuleSlotTracker.cpp 124 MachineOperand.cpp 125 MachineOptimizationRemarkEmitter.cpp 126 MachineOutliner.cpp 127 MachinePassManager.cpp 128 MachinePipeliner.cpp 129 MachinePostDominators.cpp 130 MachineRegionInfo.cpp 131 MachineRegisterInfo.cpp 132 MachineScheduler.cpp 133 MachineSink.cpp 134 MachineSizeOpts.cpp 135 MachineSSAContext.cpp 136 MachineSSAUpdater.cpp 137 MachineStripDebug.cpp 138 MachineTraceMetrics.cpp 139 MachineVerifier.cpp 140 MIRFSDiscriminator.cpp 141 MIRSampleProfile.cpp 142 MIRYamlMapping.cpp 143 MLRegallocEvictAdvisor.cpp 144 ModuloSchedule.cpp 145 MultiHazardRecognizer.cpp 146 PatchableFunction.cpp 147 MBFIWrapper.cpp 148 MIRPrinter.cpp 149 MIRPrintingPass.cpp 150 MacroFusion.cpp 151 NonRelocatableStringpool.cpp 152 OptimizePHIs.cpp 153 ParallelCG.cpp 154 PeepholeOptimizer.cpp 155 PHIElimination.cpp 156 PHIEliminationUtils.cpp 157 PostRAHazardRecognizer.cpp 158 PostRASchedulerList.cpp 159 PreISelIntrinsicLowering.cpp 160 ProcessImplicitDefs.cpp 161 PrologEpilogInserter.cpp 162 PseudoProbeInserter.cpp 163 PseudoSourceValue.cpp 164 RDFGraph.cpp 165 RDFLiveness.cpp 166 RDFRegisters.cpp 167 ReachingDefAnalysis.cpp 168 RegAllocBase.cpp 169 RegAllocBasic.cpp 170 RegAllocEvictionAdvisor.cpp 171 RegAllocFast.cpp 172 RegAllocGreedy.cpp 173 RegAllocPBQP.cpp 174 RegAllocScore.cpp 175 RegisterClassInfo.cpp 176 RegisterCoalescer.cpp 177 RegisterPressure.cpp 178 RegisterScavenging.cpp 179 RemoveRedundantDebugValues.cpp 180 RenameIndependentSubregs.cpp 181 MachineStableHash.cpp 182 MIRVRegNamerUtils.cpp 183 MIRNamerPass.cpp 184 MIRCanonicalizerPass.cpp 185 RegisterUsageInfo.cpp 186 RegUsageInfoCollector.cpp 187 RegUsageInfoPropagate.cpp 188 ReplaceWithVeclib.cpp 189 ResetMachineFunctionPass.cpp 190 RegisterBank.cpp 191 RegisterBankInfo.cpp 192 SafeStack.cpp 193 SafeStackLayout.cpp 194 ScheduleDAG.cpp 195 ScheduleDAGInstrs.cpp 196 ScheduleDAGPrinter.cpp 197 ScoreboardHazardRecognizer.cpp 198 SelectOptimize.cpp 199 ShadowStackGCLowering.cpp 200 ShrinkWrap.cpp 201 SjLjEHPrepare.cpp 202 SlotIndexes.cpp 203 SpillPlacement.cpp 204 SplitKit.cpp 205 StackColoring.cpp 206 StackMapLivenessAnalysis.cpp 207 StackMaps.cpp 208 StackProtector.cpp 209 StackSlotColoring.cpp 210 SwiftErrorValueTracking.cpp 211 SwitchLoweringUtils.cpp 212 TailDuplication.cpp 213 TailDuplicator.cpp 214 TargetFrameLoweringImpl.cpp 215 TargetInstrInfo.cpp 216 TargetLoweringBase.cpp 217 TargetLoweringObjectFileImpl.cpp 218 TargetOptionsImpl.cpp 219 TargetPassConfig.cpp 220 TargetRegisterInfo.cpp 221 TargetSchedule.cpp 222 TargetSubtargetInfo.cpp 223 TypePromotion.cpp 224 TwoAddressInstructionPass.cpp 225 UnreachableBlockElim.cpp 226 ValueTypes.cpp 227 VLIWMachineScheduler.cpp 228 VirtRegMap.cpp 229 WasmEHPrepare.cpp 230 WinEHPrepare.cpp 231 XRayInstrumentation.cpp 232 ${GeneratedMLSources} 233 234 LiveDebugValues/LiveDebugValues.cpp 235 LiveDebugValues/VarLocBasedImpl.cpp 236 LiveDebugValues/InstrRefBasedImpl.cpp 237 238 ADDITIONAL_HEADER_DIRS 239 ${LLVM_MAIN_INCLUDE_DIR}/llvm/CodeGen 240 ${LLVM_MAIN_INCLUDE_DIR}/llvm/CodeGen/PBQP 241 242 LINK_LIBS ${LLVM_PTHREAD_LIB} ${MLLinkDeps} 243 244 DEPENDS 245 intrinsics_gen 246 ${MLDeps} 247 248 LINK_COMPONENTS 249 Analysis 250 BitReader 251 BitWriter 252 Core 253 MC 254 ProfileData 255 Scalar 256 Support 257 Target 258 TransformUtils 259 ) 260 261add_subdirectory(SelectionDAG) 262add_subdirectory(AsmPrinter) 263add_subdirectory(MIRParser) 264add_subdirectory(GlobalISel) 265