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