1# Copyright 2016 The SwiftShader Authors. All Rights Reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#    http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15import("../../src/swiftshader.gni")
16
17# Need a separate config to ensure the warnings are added to the end.
18config("swiftshader_llvm_private_config") {
19  cflags = []
20
21  if (is_win) {
22    cflags += [
23      "/wd4005",
24      "/wd4065",
25      "/wd4146",
26      "/wd4245",
27      "/wd4267",
28      "/wd4310",
29      "/wd4319",
30      "/wd4334",
31      "/wd4389",
32      "/wd4624",
33      "/wd4701",
34      "/wd4702",
35      "/wd4703",
36      "/wd4706",
37      "/wd4800",
38    ]
39
40    if (!is_debug) {
41      cflags += [ "/wd4324" ]
42    }
43
44    if (is_clang) {
45      cflags += [
46        "-Wno-format",
47        "-Wno-sign-compare",
48        "-Wno-macro-redefined",
49      ]
50    }
51  }
52
53  if (is_fuchsia) {
54    cflags += [ "-Wno-error" ]
55  }
56
57  if (is_clang) {
58    cflags += [ "-Wno-header-hygiene",
59                "-Wno-error=header-hygiene"
60    ]
61    if (target_cpu == "x86" || target_cpu == "x64") {
62      cflags += [ "-msse2" ]
63    }
64  }
65
66  cflags += [
67    "-Wno-attributes",
68    "-Wno-deprecated-declarations",
69    "-Wno-enum-compare",
70    "-Wno-unused-function",
71    "-Wno-unused-local-typedef",
72    "-Wno-unused-private-field",
73    "-Wno-unused-result",
74    "-Wno-unused-variable",
75  ]
76
77  defines = [
78    "__STDC_CONSTANT_MACROS",
79    "__STDC_LIMIT_MACROS",
80  ]
81}
82
83llvm_include_dirs = [
84  "llvm/include/",
85  "llvm/lib/Target/AArch64/",
86  "llvm/lib/Target/ARM/",
87  "llvm/lib/Target/Mips/",
88  "llvm/lib/Target/X86/",
89  "configs/common/include/",
90  "configs/common/lib/IR/",
91  "configs/common/lib/Target/AArch64/",
92  "configs/common/lib/Target/ARM/",
93  "configs/common/lib/Target/Mips/",
94  "configs/common/lib/Target/X86/",
95  "configs/common/lib/Transforms/InstCombine/",
96]
97
98if (is_linux) {
99  llvm_include_dirs += [ "configs/linux/include/" ]
100} else if (is_fuchsia) {
101  llvm_include_dirs += [ "configs/fuchsia/include/" ]
102} else if (is_win) {
103  llvm_include_dirs += [ "configs/windows/include/" ]
104} else if (is_android) {
105  llvm_include_dirs += [ "configs/android/include/" ]
106} else {
107  assert(false, "llvm-7.0 not configured for target platform")
108}
109
110swiftshader_source_set("swiftshader_llvm") {
111  sources = [
112    "llvm/lib/Analysis/AliasAnalysis.cpp",
113    "llvm/lib/Analysis/AliasAnalysisEvaluator.cpp",
114    "llvm/lib/Analysis/AliasAnalysisSummary.cpp",
115    "llvm/lib/Analysis/AliasSetTracker.cpp",
116    "llvm/lib/Analysis/Analysis.cpp",
117    "llvm/lib/Analysis/AssumptionCache.cpp",
118    "llvm/lib/Analysis/BasicAliasAnalysis.cpp",
119    "llvm/lib/Analysis/BlockFrequencyInfo.cpp",
120    "llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp",
121    "llvm/lib/Analysis/BranchProbabilityInfo.cpp",
122    "llvm/lib/Analysis/CFG.cpp",
123    "llvm/lib/Analysis/CFGPrinter.cpp",
124    "llvm/lib/Analysis/CFLAndersAliasAnalysis.cpp",
125    "llvm/lib/Analysis/CFLSteensAliasAnalysis.cpp",
126    "llvm/lib/Analysis/CGSCCPassManager.cpp",
127    "llvm/lib/Analysis/CallGraph.cpp",
128    "llvm/lib/Analysis/CallGraphSCCPass.cpp",
129    "llvm/lib/Analysis/CallPrinter.cpp",
130    "llvm/lib/Analysis/CaptureTracking.cpp",
131    "llvm/lib/Analysis/CmpInstAnalysis.cpp",
132    "llvm/lib/Analysis/CodeMetrics.cpp",
133    "llvm/lib/Analysis/ConstantFolding.cpp",
134    "llvm/lib/Analysis/CostModel.cpp",
135    "llvm/lib/Analysis/Delinearization.cpp",
136    "llvm/lib/Analysis/DemandedBits.cpp",
137    "llvm/lib/Analysis/DependenceAnalysis.cpp",
138    "llvm/lib/Analysis/DivergenceAnalysis.cpp",
139    "llvm/lib/Analysis/DomPrinter.cpp",
140    "llvm/lib/Analysis/DominanceFrontier.cpp",
141    "llvm/lib/Analysis/EHPersonalities.cpp",
142    "llvm/lib/Analysis/GlobalsModRef.cpp",
143    "llvm/lib/Analysis/IVUsers.cpp",
144    "llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp",
145    "llvm/lib/Analysis/InlineCost.cpp",
146    "llvm/lib/Analysis/InstCount.cpp",
147    "llvm/lib/Analysis/InstructionSimplify.cpp",
148    "llvm/lib/Analysis/Interval.cpp",
149    "llvm/lib/Analysis/IntervalPartition.cpp",
150    "llvm/lib/Analysis/IteratedDominanceFrontier.cpp",
151    "llvm/lib/Analysis/LazyBlockFrequencyInfo.cpp",
152    "llvm/lib/Analysis/LazyBranchProbabilityInfo.cpp",
153    "llvm/lib/Analysis/LazyCallGraph.cpp",
154    "llvm/lib/Analysis/LazyValueInfo.cpp",
155    "llvm/lib/Analysis/Lint.cpp",
156    "llvm/lib/Analysis/Loads.cpp",
157    "llvm/lib/Analysis/LoopAccessAnalysis.cpp",
158    "llvm/lib/Analysis/LoopAnalysisManager.cpp",
159    "llvm/lib/Analysis/LoopInfo.cpp",
160    "llvm/lib/Analysis/LoopPass.cpp",
161    "llvm/lib/Analysis/LoopUnrollAnalyzer.cpp",
162    "llvm/lib/Analysis/MemDepPrinter.cpp",
163    "llvm/lib/Analysis/MemDerefPrinter.cpp",
164    "llvm/lib/Analysis/MemoryBuiltins.cpp",
165    "llvm/lib/Analysis/MemoryDependenceAnalysis.cpp",
166    "llvm/lib/Analysis/MemoryLocation.cpp",
167    "llvm/lib/Analysis/MemorySSA.cpp",
168    "llvm/lib/Analysis/MemorySSAUpdater.cpp",
169    "llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp",
170    "llvm/lib/Analysis/ModuleSummaryAnalysis.cpp",
171    "llvm/lib/Analysis/MustExecute.cpp",
172    "llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp",
173    "llvm/lib/Analysis/ObjCARCAnalysisUtils.cpp",
174    "llvm/lib/Analysis/ObjCARCInstKind.cpp",
175    "llvm/lib/Analysis/OptimizationRemarkEmitter.cpp",
176    "llvm/lib/Analysis/OrderedBasicBlock.cpp",
177    "llvm/lib/Analysis/PHITransAddr.cpp",
178    "llvm/lib/Analysis/PhiValues.cpp",
179    "llvm/lib/Analysis/PostDominators.cpp",
180    "llvm/lib/Analysis/ProfileSummaryInfo.cpp",
181    "llvm/lib/Analysis/PtrUseVisitor.cpp",
182    "llvm/lib/Analysis/RegionInfo.cpp",
183    "llvm/lib/Analysis/RegionPass.cpp",
184    "llvm/lib/Analysis/RegionPrinter.cpp",
185    "llvm/lib/Analysis/ScalarEvolution.cpp",
186    "llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp",
187    "llvm/lib/Analysis/ScalarEvolutionExpander.cpp",
188    "llvm/lib/Analysis/ScalarEvolutionNormalization.cpp",
189    "llvm/lib/Analysis/ScopedNoAliasAA.cpp",
190    "llvm/lib/Analysis/SyntheticCountsUtils.cpp",
191    "llvm/lib/Analysis/TargetLibraryInfo.cpp",
192    "llvm/lib/Analysis/TargetTransformInfo.cpp",
193    "llvm/lib/Analysis/Trace.cpp",
194    "llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp",
195    "llvm/lib/Analysis/TypeMetadataUtils.cpp",
196    "llvm/lib/Analysis/ValueLattice.cpp",
197    "llvm/lib/Analysis/ValueLatticeUtils.cpp",
198    "llvm/lib/Analysis/ValueTracking.cpp",
199    "llvm/lib/Analysis/VectorUtils.cpp",
200    "llvm/lib/AsmParser/LLLexer.cpp",
201    "llvm/lib/AsmParser/LLParser.cpp",
202    "llvm/lib/AsmParser/Parser.cpp",
203    "llvm/lib/BinaryFormat/Dwarf.cpp",
204    "llvm/lib/BinaryFormat/Magic.cpp",
205    "llvm/lib/BinaryFormat/Wasm.cpp",
206    "llvm/lib/Bitcode/Reader/BitReader.cpp",
207    "llvm/lib/Bitcode/Reader/BitcodeReader.cpp",
208    "llvm/lib/Bitcode/Reader/BitstreamReader.cpp",
209    "llvm/lib/Bitcode/Reader/MetadataLoader.cpp",
210    "llvm/lib/Bitcode/Reader/ValueList.cpp",
211    "llvm/lib/Bitcode/Writer/BitWriter.cpp",
212    "llvm/lib/Bitcode/Writer/BitcodeWriter.cpp",
213    "llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp",
214    "llvm/lib/Bitcode/Writer/ValueEnumerator.cpp",
215    "llvm/lib/DebugInfo/CodeView/AppendingTypeTableBuilder.cpp",
216    "llvm/lib/DebugInfo/CodeView/CVSymbolVisitor.cpp",
217    "llvm/lib/DebugInfo/CodeView/CVTypeVisitor.cpp",
218    "llvm/lib/DebugInfo/CodeView/CodeViewError.cpp",
219    "llvm/lib/DebugInfo/CodeView/CodeViewRecordIO.cpp",
220    "llvm/lib/DebugInfo/CodeView/ContinuationRecordBuilder.cpp",
221    "llvm/lib/DebugInfo/CodeView/DebugChecksumsSubsection.cpp",
222    "llvm/lib/DebugInfo/CodeView/DebugCrossExSubsection.cpp",
223    "llvm/lib/DebugInfo/CodeView/DebugCrossImpSubsection.cpp",
224    "llvm/lib/DebugInfo/CodeView/DebugFrameDataSubsection.cpp",
225    "llvm/lib/DebugInfo/CodeView/DebugInlineeLinesSubsection.cpp",
226    "llvm/lib/DebugInfo/CodeView/DebugLinesSubsection.cpp",
227    "llvm/lib/DebugInfo/CodeView/DebugStringTableSubsection.cpp",
228    "llvm/lib/DebugInfo/CodeView/DebugSubsection.cpp",
229    "llvm/lib/DebugInfo/CodeView/DebugSubsectionRecord.cpp",
230    "llvm/lib/DebugInfo/CodeView/DebugSubsectionVisitor.cpp",
231    "llvm/lib/DebugInfo/CodeView/DebugSymbolRVASubsection.cpp",
232    "llvm/lib/DebugInfo/CodeView/DebugSymbolsSubsection.cpp",
233    "llvm/lib/DebugInfo/CodeView/EnumTables.cpp",
234    "llvm/lib/DebugInfo/CodeView/Formatters.cpp",
235    "llvm/lib/DebugInfo/CodeView/GlobalTypeTableBuilder.cpp",
236    "llvm/lib/DebugInfo/CodeView/LazyRandomTypeCollection.cpp",
237    "llvm/lib/DebugInfo/CodeView/Line.cpp",
238    "llvm/lib/DebugInfo/CodeView/MergingTypeTableBuilder.cpp",
239    "llvm/lib/DebugInfo/CodeView/RecordName.cpp",
240    "llvm/lib/DebugInfo/CodeView/RecordSerialization.cpp",
241    "llvm/lib/DebugInfo/CodeView/SimpleTypeSerializer.cpp",
242    "llvm/lib/DebugInfo/CodeView/StringsAndChecksums.cpp",
243    "llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp",
244    "llvm/lib/DebugInfo/CodeView/SymbolRecordMapping.cpp",
245    "llvm/lib/DebugInfo/CodeView/SymbolSerializer.cpp",
246    "llvm/lib/DebugInfo/CodeView/TypeDumpVisitor.cpp",
247    "llvm/lib/DebugInfo/CodeView/TypeHashing.cpp",
248    "llvm/lib/DebugInfo/CodeView/TypeIndex.cpp",
249    "llvm/lib/DebugInfo/CodeView/TypeIndexDiscovery.cpp",
250    "llvm/lib/DebugInfo/CodeView/TypeRecordMapping.cpp",
251    "llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp",
252    "llvm/lib/DebugInfo/CodeView/TypeTableCollection.cpp",
253    "llvm/lib/ExecutionEngine/ExecutionEngine.cpp",
254    "llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp",
255    "llvm/lib/ExecutionEngine/GDBRegistrationListener.cpp",
256    "llvm/lib/ExecutionEngine/Orc/CompileOnDemandLayer.cpp",
257    "llvm/lib/ExecutionEngine/Orc/Core.cpp",
258    "llvm/lib/ExecutionEngine/Orc/ExecutionUtils.cpp",
259    "llvm/lib/ExecutionEngine/Orc/IRCompileLayer.cpp",
260    "llvm/lib/ExecutionEngine/Orc/IRTransformLayer.cpp",
261    "llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp",
262    "llvm/lib/ExecutionEngine/Orc/LLJIT.cpp",
263    "llvm/lib/ExecutionEngine/Orc/Layer.cpp",
264    "llvm/lib/ExecutionEngine/Orc/Legacy.cpp",
265    "llvm/lib/ExecutionEngine/Orc/NullResolver.cpp",
266    "llvm/lib/ExecutionEngine/Orc/ObjectTransformLayer.cpp",
267    "llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp",
268    "llvm/lib/ExecutionEngine/Orc/OrcCBindings.cpp",
269    "llvm/lib/ExecutionEngine/Orc/OrcError.cpp",
270    "llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.cpp",
271    "llvm/lib/ExecutionEngine/Orc/RPCUtils.cpp",
272    "llvm/lib/ExecutionEngine/Orc/RTDyldObjectLinkingLayer.cpp",
273    "llvm/lib/ExecutionEngine/RuntimeDyld/JITSymbol.cpp",
274    "llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp",
275    "llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp",
276    "llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp",
277    "llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp",
278    "llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp",
279    "llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp",
280    "llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldELFMips.cpp",
281    "llvm/lib/ExecutionEngine/SectionMemoryManager.cpp",
282    "llvm/lib/ExecutionEngine/TargetSelect.cpp",
283    "llvm/lib/IRReader/IRReader.cpp",
284    "llvm/lib/MC/ConstantPools.cpp",
285    "llvm/lib/MC/ELFObjectWriter.cpp",
286    "llvm/lib/MC/MCAsmBackend.cpp",
287    "llvm/lib/MC/MCAsmInfo.cpp",
288    "llvm/lib/MC/MCAsmInfoCOFF.cpp",
289    "llvm/lib/MC/MCAsmInfoDarwin.cpp",
290    "llvm/lib/MC/MCAsmInfoELF.cpp",
291    "llvm/lib/MC/MCAsmInfoWasm.cpp",
292    "llvm/lib/MC/MCAsmMacro.cpp",
293    "llvm/lib/MC/MCAsmStreamer.cpp",
294    "llvm/lib/MC/MCAssembler.cpp",
295    "llvm/lib/MC/MCCodeEmitter.cpp",
296    "llvm/lib/MC/MCCodePadder.cpp",
297    "llvm/lib/MC/MCCodeView.cpp",
298    "llvm/lib/MC/MCContext.cpp",
299    "llvm/lib/MC/MCDisassembler/Disassembler.cpp",
300    "llvm/lib/MC/MCDisassembler/MCDisassembler.cpp",
301    "llvm/lib/MC/MCDisassembler/MCExternalSymbolizer.cpp",
302    "llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp",
303    "llvm/lib/MC/MCDisassembler/MCSymbolizer.cpp",
304    "llvm/lib/MC/MCDwarf.cpp",
305    "llvm/lib/MC/MCELFObjectTargetWriter.cpp",
306    "llvm/lib/MC/MCELFStreamer.cpp",
307    "llvm/lib/MC/MCExpr.cpp",
308    "llvm/lib/MC/MCFragment.cpp",
309    "llvm/lib/MC/MCInst.cpp",
310    "llvm/lib/MC/MCInstPrinter.cpp",
311    "llvm/lib/MC/MCInstrAnalysis.cpp",
312    "llvm/lib/MC/MCInstrDesc.cpp",
313    "llvm/lib/MC/MCLabel.cpp",
314    "llvm/lib/MC/MCLinkerOptimizationHint.cpp",
315    "llvm/lib/MC/MCMachOStreamer.cpp",
316    "llvm/lib/MC/MCMachObjectTargetWriter.cpp",
317    "llvm/lib/MC/MCNullStreamer.cpp",
318    "llvm/lib/MC/MCObjectFileInfo.cpp",
319    "llvm/lib/MC/MCObjectStreamer.cpp",
320    "llvm/lib/MC/MCObjectWriter.cpp",
321    "llvm/lib/MC/MCParser/AsmLexer.cpp",
322    "llvm/lib/MC/MCParser/AsmParser.cpp",
323    "llvm/lib/MC/MCParser/COFFAsmParser.cpp",
324    "llvm/lib/MC/MCParser/DarwinAsmParser.cpp",
325    "llvm/lib/MC/MCParser/ELFAsmParser.cpp",
326    "llvm/lib/MC/MCParser/MCAsmLexer.cpp",
327    "llvm/lib/MC/MCParser/MCAsmParser.cpp",
328    "llvm/lib/MC/MCParser/MCAsmParserExtension.cpp",
329    "llvm/lib/MC/MCParser/MCTargetAsmParser.cpp",
330    "llvm/lib/MC/MCRegisterInfo.cpp",
331    "llvm/lib/MC/MCSchedule.cpp",
332    "llvm/lib/MC/MCSection.cpp",
333    "llvm/lib/MC/MCSectionCOFF.cpp",
334    "llvm/lib/MC/MCSectionELF.cpp",
335    "llvm/lib/MC/MCSectionMachO.cpp",
336    "llvm/lib/MC/MCSectionWasm.cpp",
337    "llvm/lib/MC/MCStreamer.cpp",
338    "llvm/lib/MC/MCSubtargetInfo.cpp",
339    "llvm/lib/MC/MCSymbol.cpp",
340    "llvm/lib/MC/MCSymbolELF.cpp",
341    "llvm/lib/MC/MCTargetOptions.cpp",
342    "llvm/lib/MC/MCValue.cpp",
343    "llvm/lib/MC/MCWasmObjectTargetWriter.cpp",
344    "llvm/lib/MC/MCWasmStreamer.cpp",
345    "llvm/lib/MC/MCWin64EH.cpp",
346    "llvm/lib/MC/MCWinCOFFStreamer.cpp",
347    "llvm/lib/MC/MCWinEH.cpp",
348    "llvm/lib/MC/MachObjectWriter.cpp",
349    "llvm/lib/MC/StringTableBuilder.cpp",
350    "llvm/lib/MC/SubtargetFeature.cpp",
351    "llvm/lib/MC/WasmObjectWriter.cpp",
352    "llvm/lib/MC/WinCOFFObjectWriter.cpp",
353    "llvm/lib/Object/Archive.cpp",
354    "llvm/lib/Object/ArchiveWriter.cpp",
355    "llvm/lib/Object/Binary.cpp",
356    "llvm/lib/Object/COFFImportFile.cpp",
357    "llvm/lib/Object/COFFModuleDefinition.cpp",
358    "llvm/lib/Object/COFFObjectFile.cpp",
359    "llvm/lib/Object/Decompressor.cpp",
360    "llvm/lib/Object/ELF.cpp",
361    "llvm/lib/Object/ELFObjectFile.cpp",
362    "llvm/lib/Object/Error.cpp",
363    "llvm/lib/Object/IRObjectFile.cpp",
364    "llvm/lib/Object/IRSymtab.cpp",
365    "llvm/lib/Object/MachOObjectFile.cpp",
366    "llvm/lib/Object/MachOUniversal.cpp",
367    "llvm/lib/Object/ModuleSymbolTable.cpp",
368    "llvm/lib/Object/Object.cpp",
369    "llvm/lib/Object/ObjectFile.cpp",
370    "llvm/lib/Object/RecordStreamer.cpp",
371    "llvm/lib/Object/SymbolSize.cpp",
372    "llvm/lib/Object/SymbolicFile.cpp",
373    "llvm/lib/Object/WasmObjectFile.cpp",
374    "llvm/lib/Object/WindowsResource.cpp",
375    "llvm/lib/ProfileData/GCOV.cpp",
376    "llvm/lib/ProfileData/InstrProf.cpp",
377    "llvm/lib/ProfileData/InstrProfReader.cpp",
378    "llvm/lib/ProfileData/InstrProfWriter.cpp",
379    "llvm/lib/ProfileData/ProfileSummaryBuilder.cpp",
380    "llvm/lib/ProfileData/SampleProf.cpp",
381    "llvm/lib/ProfileData/SampleProfReader.cpp",
382    "llvm/lib/ProfileData/SampleProfWriter.cpp",
383    "llvm/lib/Target/Target.cpp",
384    "llvm/lib/Target/TargetIntrinsicInfo.cpp",
385    "llvm/lib/Target/TargetLoweringObjectFile.cpp",
386    "llvm/lib/Target/TargetMachine.cpp",
387    "llvm/lib/Target/TargetMachineC.cpp",
388  ]
389
390  configs = [ ":swiftshader_llvm_private_config" ]
391
392  include_dirs = llvm_include_dirs
393
394  deps = [
395    ":swiftshader_llvm_codegen",
396    ":swiftshader_llvm_ir",
397    ":swiftshader_llvm_support",
398    ":swiftshader_llvm_transforms",
399  ]
400
401  if (target_cpu == "x86" || target_cpu == "x64") {
402    deps += [":swiftshader_llvm_x86"]
403  } else if (target_cpu == "arm") {
404    deps += [":swiftshader_llvm_arm"]
405  } else if (target_cpu == "arm64") {
406    deps += [":swiftshader_llvm_aarch64"]
407  } else if (target_cpu == "mipsel" || target_cpu == "mips64el") {
408    deps += [":swiftshader_llvm_mips"]
409  } else {
410    assert(false, "Unsupported target_cpu")
411  }
412
413  if (target_cpu != current_cpu &&
414      (current_cpu == "x86" || current_cpu == "x64") ||
415      # Windows ARM64 does cross compilation on Windows x64 host, and requires native
416      # x86 target.
417      (is_win && target_cpu == "arm64")) {
418    deps += [ ":swiftshader_llvm_x86" ]
419  }
420}
421
422swiftshader_source_set("swiftshader_llvm_x86") {
423  sources = [
424    "llvm/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp",
425    "llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp",
426    "llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp",
427    "llvm/lib/Target/X86/InstPrinter/X86InstComments.cpp",
428    "llvm/lib/Target/X86/InstPrinter/X86InstPrinterCommon.cpp",
429    "llvm/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp",
430    "llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp",
431    "llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp",
432    "llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp",
433    "llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp",
434    "llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp",
435    "llvm/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp",
436    "llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp",
437    "llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFStreamer.cpp",
438    "llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFTargetStreamer.cpp",
439    "llvm/lib/Target/X86/ShadowCallStack.cpp",
440    "llvm/lib/Target/X86/TargetInfo/X86TargetInfo.cpp",
441    "llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp",
442    "llvm/lib/Target/X86/X86AsmPrinter.cpp",
443    "llvm/lib/Target/X86/X86AvoidStoreForwardingBlocks.cpp",
444    "llvm/lib/Target/X86/X86CallFrameOptimization.cpp",
445    "llvm/lib/Target/X86/X86CallLowering.cpp",
446    "llvm/lib/Target/X86/X86CallingConv.cpp",
447    "llvm/lib/Target/X86/X86CmovConversion.cpp",
448    "llvm/lib/Target/X86/X86DomainReassignment.cpp",
449    "llvm/lib/Target/X86/X86EvexToVex.cpp",
450    "llvm/lib/Target/X86/X86ExpandPseudo.cpp",
451    "llvm/lib/Target/X86/X86FastISel.cpp",
452    "llvm/lib/Target/X86/X86FixupBWInsts.cpp",
453    "llvm/lib/Target/X86/X86FixupLEAs.cpp",
454    "llvm/lib/Target/X86/X86FixupSetCC.cpp",
455    "llvm/lib/Target/X86/X86FlagsCopyLowering.cpp",
456    "llvm/lib/Target/X86/X86FloatingPoint.cpp",
457    "llvm/lib/Target/X86/X86FrameLowering.cpp",
458    "llvm/lib/Target/X86/X86ISelDAGToDAG.cpp",
459    "llvm/lib/Target/X86/X86ISelLowering.cpp",
460    "llvm/lib/Target/X86/X86IndirectBranchTracking.cpp",
461    "llvm/lib/Target/X86/X86InstrFMA3Info.cpp",
462    "llvm/lib/Target/X86/X86InstrFoldTables.cpp",
463    "llvm/lib/Target/X86/X86InstrInfo.cpp",
464    "llvm/lib/Target/X86/X86InstructionSelector.cpp",
465    "llvm/lib/Target/X86/X86InterleavedAccess.cpp",
466    "llvm/lib/Target/X86/X86LegalizerInfo.cpp",
467    "llvm/lib/Target/X86/X86MCInstLower.cpp",
468    "llvm/lib/Target/X86/X86MachineFunctionInfo.cpp",
469    "llvm/lib/Target/X86/X86MacroFusion.cpp",
470    "llvm/lib/Target/X86/X86OptimizeLEAs.cpp",
471    "llvm/lib/Target/X86/X86PadShortFunction.cpp",
472    "llvm/lib/Target/X86/X86RegisterBankInfo.cpp",
473    "llvm/lib/Target/X86/X86RegisterInfo.cpp",
474    "llvm/lib/Target/X86/X86RetpolineThunks.cpp",
475    "llvm/lib/Target/X86/X86SelectionDAGInfo.cpp",
476    "llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp",
477    "llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp",
478    "llvm/lib/Target/X86/X86Subtarget.cpp",
479    "llvm/lib/Target/X86/X86TargetMachine.cpp",
480    "llvm/lib/Target/X86/X86TargetObjectFile.cpp",
481    "llvm/lib/Target/X86/X86TargetTransformInfo.cpp",
482    "llvm/lib/Target/X86/X86VZeroUpper.cpp",
483    "llvm/lib/Target/X86/X86WinAllocaExpander.cpp",
484    "llvm/lib/Target/X86/X86WinEHState.cpp",
485  ]
486
487  configs = [ ":swiftshader_llvm_private_config" ]
488
489  include_dirs = llvm_include_dirs
490}
491
492swiftshader_source_set("swiftshader_llvm_arm") {
493  sources = [
494    "llvm/lib/Target/ARM/ARMConstantIslandPass.cpp",
495    "llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp",
496    "llvm/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp",
497    "llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp",
498    "llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp",
499    "llvm/lib/Target/ARM/MCTargetDesc/ARMTargetStreamer.cpp",
500    "llvm/lib/Target/ARM/MCTargetDesc/ARMMachORelocationInfo.cpp",
501    "llvm/lib/Target/ARM/MCTargetDesc/ARMMCExpr.cpp",
502    "llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp",
503    "llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp",
504    "llvm/lib/Target/ARM/MCTargetDesc/ARMWinCOFFStreamer.cpp",
505    "llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp",
506    "llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp",
507    "llvm/lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.cpp",
508    "llvm/lib/Target/ARM/ThumbRegisterInfo.cpp",
509    "llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp",
510    "llvm/lib/Target/ARM/ARMFrameLowering.cpp",
511    "llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp",
512    "llvm/lib/Target/ARM/ARMCallLowering.cpp",
513    "llvm/lib/Target/ARM/ARMTargetMachine.cpp",
514    "llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp",
515    "llvm/lib/Target/ARM/Thumb1FrameLowering.cpp",
516    "llvm/lib/Target/ARM/ARMRegisterBankInfo.cpp",
517    "llvm/lib/Target/ARM/Utils/ARMBaseInfo.cpp",
518    "llvm/lib/Target/ARM/ARMComputeBlockSize.cpp",
519    "llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp",
520    "llvm/lib/Target/ARM/ARMInstructionSelector.cpp",
521    "llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp",
522    "llvm/lib/Target/ARM/ARMTargetObjectFile.cpp",
523    "llvm/lib/Target/ARM/ARMISelLowering.cpp",
524    "llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp",
525    "llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp",
526    "llvm/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp",
527    "llvm/lib/Target/ARM/ARMInstrInfo.cpp",
528    "llvm/lib/Target/ARM/MLxExpansionPass.cpp",
529    "llvm/lib/Target/ARM/Thumb2SizeReduction.cpp",
530    "llvm/lib/Target/ARM/ARMConstantPoolValue.cpp",
531    "llvm/lib/Target/ARM/Thumb2InstrInfo.cpp",
532    "llvm/lib/Target/ARM/ARMRegisterInfo.cpp",
533    "llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp",
534    "llvm/lib/Target/ARM/ARMSubtarget.cpp",
535    "llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp",
536    "llvm/lib/Target/ARM/ARMParallelDSP.cpp",
537    "llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp",
538    "llvm/lib/Target/ARM/A15SDOptimizer.cpp",
539    "llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp",
540    "llvm/lib/Target/ARM/ARMFastISel.cpp",
541    "llvm/lib/Target/ARM/ARMMacroFusion.cpp",
542    "llvm/lib/Target/ARM/ARMAsmPrinter.cpp",
543    "llvm/lib/Target/ARM/ARMMCInstLower.cpp",
544    "llvm/lib/Target/ARM/ARMHazardRecognizer.cpp",
545    "llvm/lib/Target/ARM/ARMCodeGenPrepare.cpp",
546    "llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp",
547    "llvm/lib/Target/ARM/Thumb1InstrInfo.cpp",
548    "llvm/lib/Target/ARM/ARMLegalizerInfo.cpp",
549    "llvm/lib/Target/ARM/ARMOptimizeBarriersPass.cpp",
550  ]
551
552  configs = [ ":swiftshader_llvm_private_config" ]
553
554  include_dirs = llvm_include_dirs
555}
556
557swiftshader_source_set("swiftshader_llvm_aarch64") {
558  sources = [
559    "llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp",
560    "llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp",
561    "llvm/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFStreamer.cpp",
562    "llvm/lib/Target/AArch64/MCTargetDesc/AArch64WinCOFFObjectWriter.cpp",
563    "llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp",
564    "llvm/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp",
565    "llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp",
566    "llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp",
567    "llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp",
568    "llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp",
569    "llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp",
570    "llvm/lib/Target/AArch64/AArch64ISelLowering.cpp",
571    "llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp",
572    "llvm/lib/Target/AArch64/AArch64FastISel.cpp",
573    "llvm/lib/Target/AArch64/AArch64InstrInfo.cpp",
574    "llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp",
575    "llvm/lib/Target/AArch64/AArch64FalkorHWPFFix.cpp",
576    "llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp",
577    "llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp",
578    "llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp",
579    "llvm/lib/Target/AArch64/AArch64A53Fix835769.cpp",
580    "llvm/lib/Target/AArch64/AArch64TargetMachine.cpp",
581    "llvm/lib/Target/AArch64/AArch64CallLowering.cpp",
582    "llvm/lib/Target/AArch64/AArch64SIMDInstrOpt.cpp",
583    "llvm/lib/Target/AArch64/AArch64Subtarget.cpp",
584    "llvm/lib/Target/AArch64/AArch64TargetObjectFile.cpp",
585    "llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp",
586    "llvm/lib/Target/AArch64/AArch64ConditionOptimizer.cpp",
587    "llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp",
588    "llvm/lib/Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp",
589    "llvm/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp",
590    "llvm/lib/Target/AArch64/AArch64AdvSIMDScalarPass.cpp",
591    "llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp",
592    "llvm/lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp",
593    "llvm/lib/Target/AArch64/AArch64LegalizerInfo.cpp",
594    "llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp",
595    "llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp",
596    "llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp",
597    "llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp",
598    "llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp",
599    "llvm/lib/Target/AArch64/AArch64MCInstLower.cpp",
600    "llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp",
601    "llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp",
602    "llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp",
603    "llvm/lib/Target/AArch64/AArch64CollectLOH.cpp",
604    "llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp",
605    "llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp",
606    "llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp",
607    "llvm/lib/Target/AArch64/AArch64CondBrTuning.cpp",
608    "llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp",
609    "llvm/lib/Target/AArch64/AArch64FrameLowering.cpp",
610    "llvm/lib/Target/AArch64/AArch64MacroFusion.cpp",
611  ]
612
613  configs = [ ":swiftshader_llvm_private_config" ]
614
615  include_dirs = llvm_include_dirs
616}
617
618swiftshader_source_set("swiftshader_llvm_mips") {
619  sources = [
620    "llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp",
621    "llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp",
622    "llvm/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.cpp",
623    "llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp",
624    "llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp",
625    "llvm/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp",
626    "llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp",
627    "llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp",
628    "llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp",
629    "llvm/lib/Target/Mips/MCTargetDesc/MipsOptionRecord.cpp",
630    "llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp",
631    "llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp",
632    "llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp",
633    "llvm/lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp",
634    "llvm/lib/Target/Mips/Mips16FrameLowering.cpp",
635    "llvm/lib/Target/Mips/Mips16HardFloat.cpp",
636    "llvm/lib/Target/Mips/Mips16HardFloatInfo.cpp",
637    "llvm/lib/Target/Mips/Mips16InstrInfo.cpp",
638    "llvm/lib/Target/Mips/Mips16ISelDAGToDAG.cpp",
639    "llvm/lib/Target/Mips/Mips16ISelLowering.cpp",
640    "llvm/lib/Target/Mips/Mips16RegisterInfo.cpp",
641    "llvm/lib/Target/Mips/MipsAnalyzeImmediate.cpp",
642    "llvm/lib/Target/Mips/MipsAsmPrinter.cpp",
643    "llvm/lib/Target/Mips/MipsCallLowering.cpp",
644    "llvm/lib/Target/Mips/MipsCCState.cpp",
645    "llvm/lib/Target/Mips/MipsConstantIslandPass.cpp",
646    "llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp",
647    "llvm/lib/Target/Mips/MipsExpandPseudo.cpp",
648    "llvm/lib/Target/Mips/MipsFastISel.cpp",
649    "llvm/lib/Target/Mips/MipsInstrInfo.cpp",
650    "llvm/lib/Target/Mips/MipsInstructionSelector.cpp",
651    "llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp",
652    "llvm/lib/Target/Mips/MipsISelLowering.cpp",
653    "llvm/lib/Target/Mips/MipsFrameLowering.cpp",
654    "llvm/lib/Target/Mips/MipsLegalizerInfo.cpp",
655    "llvm/lib/Target/Mips/MipsBranchExpansion.cpp",
656    "llvm/lib/Target/Mips/MipsMCInstLower.cpp",
657    "llvm/lib/Target/Mips/MipsMachineFunction.cpp",
658    "llvm/lib/Target/Mips/MipsModuleISelDAGToDAG.cpp",
659    "llvm/lib/Target/Mips/MipsOptimizePICCall.cpp",
660    "llvm/lib/Target/Mips/MipsOs16.cpp",
661    "llvm/lib/Target/Mips/MipsRegisterBankInfo.cpp",
662    "llvm/lib/Target/Mips/MipsRegisterInfo.cpp",
663    "llvm/lib/Target/Mips/MipsSEFrameLowering.cpp",
664    "llvm/lib/Target/Mips/MipsSEInstrInfo.cpp",
665    "llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp",
666    "llvm/lib/Target/Mips/MipsSEISelLowering.cpp",
667    "llvm/lib/Target/Mips/MipsSERegisterInfo.cpp",
668    "llvm/lib/Target/Mips/MipsSubtarget.cpp",
669    "llvm/lib/Target/Mips/MipsTargetMachine.cpp",
670    "llvm/lib/Target/Mips/MipsTargetObjectFile.cpp",
671    "llvm/lib/Target/Mips/MicroMipsSizeReduction.cpp",
672    "llvm/lib/Target/Mips/TargetInfo/MipsTargetInfo.cpp",
673  ]
674
675  configs = [ ":swiftshader_llvm_private_config" ]
676
677  include_dirs = llvm_include_dirs
678}
679
680swiftshader_source_set("swiftshader_llvm_codegen") {
681  sources = [
682    "llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp",
683    "llvm/lib/CodeGen/AllocationOrder.cpp",
684    "llvm/lib/CodeGen/Analysis.cpp",
685    "llvm/lib/CodeGen/AsmPrinter/ARMException.cpp",
686    "llvm/lib/CodeGen/AsmPrinter/AccelTable.cpp",
687    "llvm/lib/CodeGen/AsmPrinter/AddressPool.cpp",
688    "llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp",
689    "llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp",
690    "llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp",
691    "llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp",
692    "llvm/lib/CodeGen/AsmPrinter/DIE.cpp",
693    "llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp",
694    "llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp",
695    "llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp",
696    "llvm/lib/CodeGen/AsmPrinter/DebugLocStream.cpp",
697    "llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp",
698    "llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp",
699    "llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp",
700    "llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp",
701    "llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp",
702    "llvm/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp",
703    "llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp",
704    "llvm/lib/CodeGen/AsmPrinter/EHStreamer.cpp",
705    "llvm/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp",
706    "llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp",
707    "llvm/lib/CodeGen/AsmPrinter/WinCFGuard.cpp",
708    "llvm/lib/CodeGen/AsmPrinter/WinException.cpp",
709    "llvm/lib/CodeGen/AtomicExpandPass.cpp",
710    "llvm/lib/CodeGen/BasicTargetTransformInfo.cpp",
711    "llvm/lib/CodeGen/BranchFolding.cpp",
712    "llvm/lib/CodeGen/BranchRelaxation.cpp",
713    "llvm/lib/CodeGen/BreakFalseDeps.cpp",
714    "llvm/lib/CodeGen/BuiltinGCs.cpp",
715    "llvm/lib/CodeGen/CFIInstrInserter.cpp",
716    "llvm/lib/CodeGen/CalcSpillWeights.cpp",
717    "llvm/lib/CodeGen/CallingConvLower.cpp",
718    "llvm/lib/CodeGen/CodeGen.cpp",
719    "llvm/lib/CodeGen/CodeGenPrepare.cpp",
720    "llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp",
721    "llvm/lib/CodeGen/DFAPacketizer.cpp",
722    "llvm/lib/CodeGen/DeadMachineInstructionElim.cpp",
723    "llvm/lib/CodeGen/DetectDeadLanes.cpp",
724    "llvm/lib/CodeGen/DwarfEHPrepare.cpp",
725    "llvm/lib/CodeGen/EarlyIfConversion.cpp",
726    "llvm/lib/CodeGen/EdgeBundles.cpp",
727    "llvm/lib/CodeGen/ExecutionDomainFix.cpp",
728    "llvm/lib/CodeGen/ExpandISelPseudos.cpp",
729    "llvm/lib/CodeGen/ExpandMemCmp.cpp",
730    "llvm/lib/CodeGen/ExpandPostRAPseudos.cpp",
731    "llvm/lib/CodeGen/ExpandReductions.cpp",
732    "llvm/lib/CodeGen/FEntryInserter.cpp",
733    "llvm/lib/CodeGen/FaultMaps.cpp",
734    "llvm/lib/CodeGen/FuncletLayout.cpp",
735    "llvm/lib/CodeGen/GCMetadata.cpp",
736    "llvm/lib/CodeGen/GCMetadataPrinter.cpp",
737    "llvm/lib/CodeGen/GCRootLowering.cpp",
738    "llvm/lib/CodeGen/GCStrategy.cpp",
739    "llvm/lib/CodeGen/GlobalISel/CallLowering.cpp",
740    "llvm/lib/CodeGen/GlobalISel/Combiner.cpp",
741    "llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp",
742    "llvm/lib/CodeGen/GlobalISel/GlobalISel.cpp",
743    "llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp",
744    "llvm/lib/CodeGen/GlobalISel/InstructionSelect.cpp",
745    "llvm/lib/CodeGen/GlobalISel/InstructionSelector.cpp",
746    "llvm/lib/CodeGen/GlobalISel/LegalityPredicates.cpp",
747    "llvm/lib/CodeGen/GlobalISel/LegalizeMutations.cpp",
748    "llvm/lib/CodeGen/GlobalISel/Legalizer.cpp",
749    "llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp",
750    "llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp",
751    "llvm/lib/CodeGen/GlobalISel/Localizer.cpp",
752    "llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp",
753    "llvm/lib/CodeGen/GlobalISel/RegBankSelect.cpp",
754    "llvm/lib/CodeGen/GlobalISel/RegisterBank.cpp",
755    "llvm/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp",
756    "llvm/lib/CodeGen/GlobalISel/Utils.cpp",
757    "llvm/lib/CodeGen/GlobalMerge.cpp",
758    "llvm/lib/CodeGen/IfConversion.cpp",
759    "llvm/lib/CodeGen/ImplicitNullChecks.cpp",
760    "llvm/lib/CodeGen/IndirectBrExpandPass.cpp",
761    "llvm/lib/CodeGen/InlineSpiller.cpp",
762    "llvm/lib/CodeGen/InterferenceCache.cpp",
763    "llvm/lib/CodeGen/InterleavedAccessPass.cpp",
764    "llvm/lib/CodeGen/IntrinsicLowering.cpp",
765    "llvm/lib/CodeGen/LLVMTargetMachine.cpp",
766    "llvm/lib/CodeGen/LatencyPriorityQueue.cpp",
767    "llvm/lib/CodeGen/LazyMachineBlockFrequencyInfo.cpp",
768    "llvm/lib/CodeGen/LexicalScopes.cpp",
769    "llvm/lib/CodeGen/LiveDebugValues.cpp",
770    "llvm/lib/CodeGen/LiveDebugVariables.cpp",
771    "llvm/lib/CodeGen/LiveInterval.cpp",
772    "llvm/lib/CodeGen/LiveIntervalUnion.cpp",
773    "llvm/lib/CodeGen/LiveIntervals.cpp",
774    "llvm/lib/CodeGen/LivePhysRegs.cpp",
775    "llvm/lib/CodeGen/LiveRangeCalc.cpp",
776    "llvm/lib/CodeGen/LiveRangeEdit.cpp",
777    "llvm/lib/CodeGen/LiveRangeShrink.cpp",
778    "llvm/lib/CodeGen/LiveRegMatrix.cpp",
779    "llvm/lib/CodeGen/LiveRegUnits.cpp",
780    "llvm/lib/CodeGen/LiveStacks.cpp",
781    "llvm/lib/CodeGen/LiveVariables.cpp",
782    "llvm/lib/CodeGen/LocalStackSlotAllocation.cpp",
783    "llvm/lib/CodeGen/LoopTraversal.cpp",
784    "llvm/lib/CodeGen/LowLevelType.cpp",
785    "llvm/lib/CodeGen/LowerEmuTLS.cpp",
786    "llvm/lib/CodeGen/MIRCanonicalizerPass.cpp",
787    "llvm/lib/CodeGen/MIRPrinter.cpp",
788    "llvm/lib/CodeGen/MIRPrintingPass.cpp",
789    "llvm/lib/CodeGen/MachineBasicBlock.cpp",
790    "llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp",
791    "llvm/lib/CodeGen/MachineBlockPlacement.cpp",
792    "llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp",
793    "llvm/lib/CodeGen/MachineCSE.cpp",
794    "llvm/lib/CodeGen/MachineCombiner.cpp",
795    "llvm/lib/CodeGen/MachineCopyPropagation.cpp",
796    "llvm/lib/CodeGen/MachineDominanceFrontier.cpp",
797    "llvm/lib/CodeGen/MachineDominators.cpp",
798    "llvm/lib/CodeGen/MachineFrameInfo.cpp",
799    "llvm/lib/CodeGen/MachineFunction.cpp",
800    "llvm/lib/CodeGen/MachineFunctionPass.cpp",
801    "llvm/lib/CodeGen/MachineFunctionPrinterPass.cpp",
802    "llvm/lib/CodeGen/MachineInstr.cpp",
803    "llvm/lib/CodeGen/MachineInstrBundle.cpp",
804    "llvm/lib/CodeGen/MachineLICM.cpp",
805    "llvm/lib/CodeGen/MachineLoopInfo.cpp",
806    "llvm/lib/CodeGen/MachineModuleInfo.cpp",
807    "llvm/lib/CodeGen/MachineModuleInfoImpls.cpp",
808    "llvm/lib/CodeGen/MachineOperand.cpp",
809    "llvm/lib/CodeGen/MachineOptimizationRemarkEmitter.cpp",
810    "llvm/lib/CodeGen/MachineOutliner.cpp",
811    "llvm/lib/CodeGen/MachinePassRegistry.cpp",
812    "llvm/lib/CodeGen/MachinePipeliner.cpp",
813    "llvm/lib/CodeGen/MachinePostDominators.cpp",
814    "llvm/lib/CodeGen/MachineRegionInfo.cpp",
815    "llvm/lib/CodeGen/MachineRegisterInfo.cpp",
816    "llvm/lib/CodeGen/MachineSSAUpdater.cpp",
817    "llvm/lib/CodeGen/MachineScheduler.cpp",
818    "llvm/lib/CodeGen/MachineSink.cpp",
819    "llvm/lib/CodeGen/MachineTraceMetrics.cpp",
820    "llvm/lib/CodeGen/MachineVerifier.cpp",
821    "llvm/lib/CodeGen/MacroFusion.cpp",
822    "llvm/lib/CodeGen/OptimizePHIs.cpp",
823    "llvm/lib/CodeGen/PHIElimination.cpp",
824    "llvm/lib/CodeGen/PHIEliminationUtils.cpp",
825    "llvm/lib/CodeGen/ParallelCG.cpp",
826    "llvm/lib/CodeGen/PatchableFunction.cpp",
827    "llvm/lib/CodeGen/PeepholeOptimizer.cpp",
828    "llvm/lib/CodeGen/PostRAHazardRecognizer.cpp",
829    "llvm/lib/CodeGen/PostRASchedulerList.cpp",
830    "llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp",
831    "llvm/lib/CodeGen/ProcessImplicitDefs.cpp",
832    "llvm/lib/CodeGen/PrologEpilogInserter.cpp",
833    "llvm/lib/CodeGen/PseudoSourceValue.cpp",
834    "llvm/lib/CodeGen/ReachingDefAnalysis.cpp",
835    "llvm/lib/CodeGen/RegAllocBase.cpp",
836    "llvm/lib/CodeGen/RegAllocBasic.cpp",
837    "llvm/lib/CodeGen/RegAllocFast.cpp",
838    "llvm/lib/CodeGen/RegAllocGreedy.cpp",
839    "llvm/lib/CodeGen/RegAllocPBQP.cpp",
840    "llvm/lib/CodeGen/RegUsageInfoCollector.cpp",
841    "llvm/lib/CodeGen/RegUsageInfoPropagate.cpp",
842    "llvm/lib/CodeGen/RegisterClassInfo.cpp",
843    "llvm/lib/CodeGen/RegisterCoalescer.cpp",
844    "llvm/lib/CodeGen/RegisterPressure.cpp",
845    "llvm/lib/CodeGen/RegisterScavenging.cpp",
846    "llvm/lib/CodeGen/RegisterUsageInfo.cpp",
847    "llvm/lib/CodeGen/RenameIndependentSubregs.cpp",
848    "llvm/lib/CodeGen/ResetMachineFunctionPass.cpp",
849    "llvm/lib/CodeGen/SafeStack.cpp",
850    "llvm/lib/CodeGen/SafeStackColoring.cpp",
851    "llvm/lib/CodeGen/SafeStackLayout.cpp",
852    "llvm/lib/CodeGen/ScalarizeMaskedMemIntrin.cpp",
853    "llvm/lib/CodeGen/ScheduleDAG.cpp",
854    "llvm/lib/CodeGen/ScheduleDAGInstrs.cpp",
855    "llvm/lib/CodeGen/ScheduleDAGPrinter.cpp",
856    "llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp",
857    "llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp",
858    "llvm/lib/CodeGen/SelectionDAG/FastISel.cpp",
859    "llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp",
860    "llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp",
861    "llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp",
862    "llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp",
863    "llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp",
864    "llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp",
865    "llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp",
866    "llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp",
867    "llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp",
868    "llvm/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp",
869    "llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp",
870    "llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp",
871    "llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp",
872    "llvm/lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp",
873    "llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp",
874    "llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp",
875    "llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp",
876    "llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp",
877    "llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp",
878    "llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp",
879    "llvm/lib/CodeGen/SelectionDAG/SelectionDAGTargetInfo.cpp",
880    "llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp",
881    "llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp",
882    "llvm/lib/CodeGen/ShadowStackGCLowering.cpp",
883    "llvm/lib/CodeGen/ShrinkWrap.cpp",
884    "llvm/lib/CodeGen/SjLjEHPrepare.cpp",
885    "llvm/lib/CodeGen/SlotIndexes.cpp",
886    "llvm/lib/CodeGen/SpillPlacement.cpp",
887    "llvm/lib/CodeGen/SplitKit.cpp",
888    "llvm/lib/CodeGen/StackColoring.cpp",
889    "llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp",
890    "llvm/lib/CodeGen/StackMaps.cpp",
891    "llvm/lib/CodeGen/StackProtector.cpp",
892    "llvm/lib/CodeGen/StackSlotColoring.cpp",
893    "llvm/lib/CodeGen/TailDuplication.cpp",
894    "llvm/lib/CodeGen/TailDuplicator.cpp",
895    "llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp",
896    "llvm/lib/CodeGen/TargetInstrInfo.cpp",
897    "llvm/lib/CodeGen/TargetLoweringBase.cpp",
898    "llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp",
899    "llvm/lib/CodeGen/TargetOptionsImpl.cpp",
900    "llvm/lib/CodeGen/TargetPassConfig.cpp",
901    "llvm/lib/CodeGen/TargetRegisterInfo.cpp",
902    "llvm/lib/CodeGen/TargetSchedule.cpp",
903    "llvm/lib/CodeGen/TargetSubtargetInfo.cpp",
904    "llvm/lib/CodeGen/TwoAddressInstructionPass.cpp",
905    "llvm/lib/CodeGen/UnreachableBlockElim.cpp",
906    "llvm/lib/CodeGen/ValueTypes.cpp",
907    "llvm/lib/CodeGen/VirtRegMap.cpp",
908    "llvm/lib/CodeGen/WasmEHPrepare.cpp",
909    "llvm/lib/CodeGen/WinEHPrepare.cpp",
910    "llvm/lib/CodeGen/XRayInstrumentation.cpp",
911  ]
912
913  configs = [ ":swiftshader_llvm_private_config" ]
914
915  include_dirs = llvm_include_dirs
916}
917
918swiftshader_source_set("swiftshader_llvm_ir") {
919  sources = [
920    "llvm/lib/IR/AsmWriter.cpp",
921    "llvm/lib/IR/Attributes.cpp",
922    "llvm/lib/IR/AutoUpgrade.cpp",
923    "llvm/lib/IR/BasicBlock.cpp",
924    "llvm/lib/IR/Comdat.cpp",
925    "llvm/lib/IR/ConstantFold.cpp",
926    "llvm/lib/IR/ConstantRange.cpp",
927    "llvm/lib/IR/Constants.cpp",
928    "llvm/lib/IR/Core.cpp",
929    "llvm/lib/IR/DIBuilder.cpp",
930    "llvm/lib/IR/DataLayout.cpp",
931    "llvm/lib/IR/DebugInfo.cpp",
932    "llvm/lib/IR/DebugInfoMetadata.cpp",
933    "llvm/lib/IR/DebugLoc.cpp",
934    "llvm/lib/IR/DiagnosticHandler.cpp",
935    "llvm/lib/IR/DiagnosticInfo.cpp",
936    "llvm/lib/IR/DiagnosticPrinter.cpp",
937    "llvm/lib/IR/DomTreeUpdater.cpp",
938    "llvm/lib/IR/Dominators.cpp",
939    "llvm/lib/IR/Function.cpp",
940    "llvm/lib/IR/GVMaterializer.cpp",
941    "llvm/lib/IR/Globals.cpp",
942    "llvm/lib/IR/IRBuilder.cpp",
943    "llvm/lib/IR/IRPrintingPasses.cpp",
944    "llvm/lib/IR/InlineAsm.cpp",
945    "llvm/lib/IR/Instruction.cpp",
946    "llvm/lib/IR/Instructions.cpp",
947    "llvm/lib/IR/IntrinsicInst.cpp",
948    "llvm/lib/IR/LLVMContext.cpp",
949    "llvm/lib/IR/LLVMContextImpl.cpp",
950    "llvm/lib/IR/LegacyPassManager.cpp",
951    "llvm/lib/IR/MDBuilder.cpp",
952    "llvm/lib/IR/Mangler.cpp",
953    "llvm/lib/IR/Metadata.cpp",
954    "llvm/lib/IR/Module.cpp",
955    "llvm/lib/IR/ModuleSummaryIndex.cpp",
956    "llvm/lib/IR/Operator.cpp",
957    "llvm/lib/IR/OptBisect.cpp",
958    "llvm/lib/IR/Pass.cpp",
959    "llvm/lib/IR/PassManager.cpp",
960    "llvm/lib/IR/PassRegistry.cpp",
961    "llvm/lib/IR/ProfileSummary.cpp",
962    "llvm/lib/IR/SafepointIRVerifier.cpp",
963    "llvm/lib/IR/Statepoint.cpp",
964    "llvm/lib/IR/Type.cpp",
965    "llvm/lib/IR/TypeFinder.cpp",
966    "llvm/lib/IR/Use.cpp",
967    "llvm/lib/IR/User.cpp",
968    "llvm/lib/IR/Value.cpp",
969    "llvm/lib/IR/ValueSymbolTable.cpp",
970    "llvm/lib/IR/Verifier.cpp",
971  ]
972
973  configs = [ ":swiftshader_llvm_private_config" ]
974
975  include_dirs = llvm_include_dirs
976}
977
978swiftshader_source_set("swiftshader_llvm_support") {
979  sources = [
980    "llvm/lib/Support/AMDGPUMetadata.cpp",
981    "llvm/lib/Support/APFloat.cpp",
982    "llvm/lib/Support/APInt.cpp",
983    "llvm/lib/Support/APSInt.cpp",
984    "llvm/lib/Support/ARMAttributeParser.cpp",
985    "llvm/lib/Support/ARMBuildAttrs.cpp",
986    "llvm/lib/Support/ARMWinEH.cpp",
987    "llvm/lib/Support/Allocator.cpp",
988    "llvm/lib/Support/Atomic.cpp",
989    "llvm/lib/Support/BinaryStreamError.cpp",
990    "llvm/lib/Support/BinaryStreamReader.cpp",
991    "llvm/lib/Support/BinaryStreamRef.cpp",
992    "llvm/lib/Support/BinaryStreamWriter.cpp",
993    "llvm/lib/Support/BlockFrequency.cpp",
994    "llvm/lib/Support/BranchProbability.cpp",
995    "llvm/lib/Support/COM.cpp",
996    "llvm/lib/Support/CachePruning.cpp",
997    "llvm/lib/Support/Chrono.cpp",
998    "llvm/lib/Support/CodeGenCoverage.cpp",
999    "llvm/lib/Support/CommandLine.cpp",
1000    "llvm/lib/Support/Compression.cpp",
1001    "llvm/lib/Support/ConvertUTF.cpp",
1002    "llvm/lib/Support/ConvertUTFWrapper.cpp",
1003    "llvm/lib/Support/CrashRecoveryContext.cpp",
1004    "llvm/lib/Support/DAGDeltaAlgorithm.cpp",
1005    "llvm/lib/Support/DJB.cpp",
1006    "llvm/lib/Support/DataExtractor.cpp",
1007    "llvm/lib/Support/Debug.cpp",
1008    "llvm/lib/Support/DebugCounter.cpp",
1009    "llvm/lib/Support/DeltaAlgorithm.cpp",
1010    "llvm/lib/Support/DynamicLibrary.cpp",
1011    "llvm/lib/Support/Errno.cpp",
1012    "llvm/lib/Support/Error.cpp",
1013    "llvm/lib/Support/ErrorHandling.cpp",
1014    "llvm/lib/Support/FileOutputBuffer.cpp",
1015    "llvm/lib/Support/FileUtilities.cpp",
1016    "llvm/lib/Support/FoldingSet.cpp",
1017    "llvm/lib/Support/FormatVariadic.cpp",
1018    "llvm/lib/Support/FormattedStream.cpp",
1019    "llvm/lib/Support/GlobPattern.cpp",
1020    "llvm/lib/Support/GraphWriter.cpp",
1021    "llvm/lib/Support/Hashing.cpp",
1022    "llvm/lib/Support/Host.cpp",
1023    "llvm/lib/Support/InitLLVM.cpp",
1024    "llvm/lib/Support/IntEqClasses.cpp",
1025    "llvm/lib/Support/IntervalMap.cpp",
1026    "llvm/lib/Support/JSON.cpp",
1027    "llvm/lib/Support/JamCRC.cpp",
1028    "llvm/lib/Support/KnownBits.cpp",
1029    "llvm/lib/Support/LEB128.cpp",
1030    "llvm/lib/Support/LineIterator.cpp",
1031    "llvm/lib/Support/Locale.cpp",
1032    "llvm/lib/Support/LockFileManager.cpp",
1033    "llvm/lib/Support/LowLevelType.cpp",
1034    "llvm/lib/Support/MD5.cpp",
1035    "llvm/lib/Support/ManagedStatic.cpp",
1036    "llvm/lib/Support/MathExtras.cpp",
1037    "llvm/lib/Support/Memory.cpp",
1038    "llvm/lib/Support/MemoryBuffer.cpp",
1039    "llvm/lib/Support/Mutex.cpp",
1040    "llvm/lib/Support/NativeFormatting.cpp",
1041    "llvm/lib/Support/Options.cpp",
1042    "llvm/lib/Support/Parallel.cpp",
1043    "llvm/lib/Support/Path.cpp",
1044    "llvm/lib/Support/PluginLoader.cpp",
1045    "llvm/lib/Support/PrettyStackTrace.cpp",
1046    "llvm/lib/Support/Process.cpp",
1047    "llvm/lib/Support/Program.cpp",
1048    "llvm/lib/Support/RWMutex.cpp",
1049    "llvm/lib/Support/RandomNumberGenerator.cpp",
1050    "llvm/lib/Support/Regex.cpp",
1051    "llvm/lib/Support/SHA1.cpp",
1052    "llvm/lib/Support/ScaledNumber.cpp",
1053    "llvm/lib/Support/ScopedPrinter.cpp",
1054    "llvm/lib/Support/Signals.cpp",
1055    "llvm/lib/Support/SmallPtrSet.cpp",
1056    "llvm/lib/Support/SmallVector.cpp",
1057    "llvm/lib/Support/SourceMgr.cpp",
1058    "llvm/lib/Support/SpecialCaseList.cpp",
1059    "llvm/lib/Support/Statistic.cpp",
1060    "llvm/lib/Support/StringExtras.cpp",
1061    "llvm/lib/Support/StringMap.cpp",
1062    "llvm/lib/Support/StringPool.cpp",
1063    "llvm/lib/Support/StringRef.cpp",
1064    "llvm/lib/Support/StringSaver.cpp",
1065    "llvm/lib/Support/SystemUtils.cpp",
1066    "llvm/lib/Support/TarWriter.cpp",
1067    "llvm/lib/Support/TargetParser.cpp",
1068    "llvm/lib/Support/TargetRegistry.cpp",
1069    "llvm/lib/Support/ThreadLocal.cpp",
1070    "llvm/lib/Support/ThreadPool.cpp",
1071    "llvm/lib/Support/Threading.cpp",
1072    "llvm/lib/Support/Timer.cpp",
1073    "llvm/lib/Support/ToolOutputFile.cpp",
1074    "llvm/lib/Support/TrigramIndex.cpp",
1075    "llvm/lib/Support/Triple.cpp",
1076    "llvm/lib/Support/Twine.cpp",
1077    "llvm/lib/Support/Unicode.cpp",
1078    "llvm/lib/Support/UnicodeCaseFold.cpp",
1079    "llvm/lib/Support/Valgrind.cpp",
1080    "llvm/lib/Support/VersionTuple.cpp",
1081    "llvm/lib/Support/Watchdog.cpp",
1082    "llvm/lib/Support/WithColor.cpp",
1083    "llvm/lib/Support/YAMLParser.cpp",
1084    "llvm/lib/Support/YAMLTraits.cpp",
1085    "llvm/lib/Support/circular_raw_ostream.cpp",
1086    "llvm/lib/Support/raw_os_ostream.cpp",
1087    "llvm/lib/Support/raw_ostream.cpp",
1088    "llvm/lib/Support/regcomp.c",
1089    "llvm/lib/Support/regerror.c",
1090    "llvm/lib/Support/regexec.c",
1091    "llvm/lib/Support/regfree.c",
1092    "llvm/lib/Support/regstrlcpy.c",
1093    "llvm/lib/Support/xxhash.cpp",
1094  ]
1095
1096  configs = [ ":swiftshader_llvm_private_config" ]
1097
1098  include_dirs = llvm_include_dirs
1099}
1100
1101swiftshader_source_set("swiftshader_llvm_transforms") {
1102  sources = [
1103    "llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp",
1104    "llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp",
1105    "llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp",
1106    "llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp",
1107    "llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp",
1108    "llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp",
1109    "llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp",
1110    "llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp",
1111    "llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp",
1112    "llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp",
1113    "llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp",
1114    "llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp",
1115    "llvm/lib/Transforms/InstCombine/InstructionCombining.cpp",
1116    "llvm/lib/Transforms/Scalar/ADCE.cpp",
1117    "llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp",
1118    "llvm/lib/Transforms/Scalar/BDCE.cpp",
1119    "llvm/lib/Transforms/Scalar/CallSiteSplitting.cpp",
1120    "llvm/lib/Transforms/Scalar/ConstantHoisting.cpp",
1121    "llvm/lib/Transforms/Scalar/ConstantProp.cpp",
1122    "llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp",
1123    "llvm/lib/Transforms/Scalar/DCE.cpp",
1124    "llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp",
1125    "llvm/lib/Transforms/Scalar/DivRemPairs.cpp",
1126    "llvm/lib/Transforms/Scalar/EarlyCSE.cpp",
1127    "llvm/lib/Transforms/Scalar/FlattenCFGPass.cpp",
1128    "llvm/lib/Transforms/Scalar/Float2Int.cpp",
1129    "llvm/lib/Transforms/Scalar/GVN.cpp",
1130    "llvm/lib/Transforms/Scalar/GVNHoist.cpp",
1131    "llvm/lib/Transforms/Scalar/GVNSink.cpp",
1132    "llvm/lib/Transforms/Scalar/GuardWidening.cpp",
1133    "llvm/lib/Transforms/Scalar/IVUsersPrinter.cpp",
1134    "llvm/lib/Transforms/Scalar/IndVarSimplify.cpp",
1135    "llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp",
1136    "llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp",
1137    "llvm/lib/Transforms/Scalar/InstSimplifyPass.cpp",
1138    "llvm/lib/Transforms/Scalar/JumpThreading.cpp",
1139    "llvm/lib/Transforms/Scalar/LICM.cpp",
1140    "llvm/lib/Transforms/Scalar/LoopAccessAnalysisPrinter.cpp",
1141    "llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp",
1142    "llvm/lib/Transforms/Scalar/LoopDeletion.cpp",
1143    "llvm/lib/Transforms/Scalar/LoopDistribute.cpp",
1144    "llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp",
1145    "llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp",
1146    "llvm/lib/Transforms/Scalar/LoopInterchange.cpp",
1147    "llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp",
1148    "llvm/lib/Transforms/Scalar/LoopPassManager.cpp",
1149    "llvm/lib/Transforms/Scalar/LoopPredication.cpp",
1150    "llvm/lib/Transforms/Scalar/LoopRerollPass.cpp",
1151    "llvm/lib/Transforms/Scalar/LoopRotation.cpp",
1152    "llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp",
1153    "llvm/lib/Transforms/Scalar/LoopSink.cpp",
1154    "llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp",
1155    "llvm/lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp",
1156    "llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp",
1157    "llvm/lib/Transforms/Scalar/LoopUnswitch.cpp",
1158    "llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp",
1159    "llvm/lib/Transforms/Scalar/LowerAtomic.cpp",
1160    "llvm/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp",
1161    "llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp",
1162    "llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp",
1163    "llvm/lib/Transforms/Scalar/MergeICmps.cpp",
1164    "llvm/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp",
1165    "llvm/lib/Transforms/Scalar/NaryReassociate.cpp",
1166    "llvm/lib/Transforms/Scalar/NewGVN.cpp",
1167    "llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp",
1168    "llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp",
1169    "llvm/lib/Transforms/Scalar/Reassociate.cpp",
1170    "llvm/lib/Transforms/Scalar/Reg2Mem.cpp",
1171    "llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp",
1172    "llvm/lib/Transforms/Scalar/SCCP.cpp",
1173    "llvm/lib/Transforms/Scalar/SROA.cpp",
1174    "llvm/lib/Transforms/Scalar/Scalar.cpp",
1175    "llvm/lib/Transforms/Scalar/Scalarizer.cpp",
1176    "llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp",
1177    "llvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp",
1178    "llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp",
1179    "llvm/lib/Transforms/Scalar/Sink.cpp",
1180    "llvm/lib/Transforms/Scalar/SpeculateAroundPHIs.cpp",
1181    "llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp",
1182    "llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp",
1183    "llvm/lib/Transforms/Scalar/StructurizeCFG.cpp",
1184    "llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp",
1185    "llvm/lib/Transforms/Utils/ASanStackFrameLayout.cpp",
1186    "llvm/lib/Transforms/Utils/AddDiscriminators.cpp",
1187    "llvm/lib/Transforms/Utils/BasicBlockUtils.cpp",
1188    "llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp",
1189    "llvm/lib/Transforms/Utils/BuildLibCalls.cpp",
1190    "llvm/lib/Transforms/Utils/BypassSlowDivision.cpp",
1191    "llvm/lib/Transforms/Utils/CallPromotionUtils.cpp",
1192    "llvm/lib/Transforms/Utils/CloneFunction.cpp",
1193    "llvm/lib/Transforms/Utils/CloneModule.cpp",
1194    "llvm/lib/Transforms/Utils/CodeExtractor.cpp",
1195    "llvm/lib/Transforms/Utils/CtorUtils.cpp",
1196    "llvm/lib/Transforms/Utils/DemoteRegToStack.cpp",
1197    "llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp",
1198    "llvm/lib/Transforms/Utils/EscapeEnumerator.cpp",
1199    "llvm/lib/Transforms/Utils/Evaluator.cpp",
1200    "llvm/lib/Transforms/Utils/FlattenCFG.cpp",
1201    "llvm/lib/Transforms/Utils/FunctionComparator.cpp",
1202    "llvm/lib/Transforms/Utils/FunctionImportUtils.cpp",
1203    "llvm/lib/Transforms/Utils/GlobalStatus.cpp",
1204    "llvm/lib/Transforms/Utils/ImportedFunctionsInliningStatistics.cpp",
1205    "llvm/lib/Transforms/Utils/InlineFunction.cpp",
1206    "llvm/lib/Transforms/Utils/InstructionNamer.cpp",
1207    "llvm/lib/Transforms/Utils/IntegerDivision.cpp",
1208    "llvm/lib/Transforms/Utils/LCSSA.cpp",
1209    "llvm/lib/Transforms/Utils/LibCallsShrinkWrap.cpp",
1210    "llvm/lib/Transforms/Utils/Local.cpp",
1211    "llvm/lib/Transforms/Utils/LoopRotationUtils.cpp",
1212    "llvm/lib/Transforms/Utils/LoopSimplify.cpp",
1213    "llvm/lib/Transforms/Utils/LoopUnroll.cpp",
1214    "llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp",
1215    "llvm/lib/Transforms/Utils/LoopUnrollPeel.cpp",
1216    "llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp",
1217    "llvm/lib/Transforms/Utils/LoopUtils.cpp",
1218    "llvm/lib/Transforms/Utils/LoopVersioning.cpp",
1219    "llvm/lib/Transforms/Utils/LowerInvoke.cpp",
1220    "llvm/lib/Transforms/Utils/LowerMemIntrinsics.cpp",
1221    "llvm/lib/Transforms/Utils/LowerSwitch.cpp",
1222    "llvm/lib/Transforms/Utils/Mem2Reg.cpp",
1223    "llvm/lib/Transforms/Utils/MetaRenamer.cpp",
1224    "llvm/lib/Transforms/Utils/ModuleUtils.cpp",
1225    "llvm/lib/Transforms/Utils/NameAnonGlobals.cpp",
1226    "llvm/lib/Transforms/Utils/OrderedInstructions.cpp",
1227    "llvm/lib/Transforms/Utils/PredicateInfo.cpp",
1228    "llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp",
1229    "llvm/lib/Transforms/Utils/SSAUpdater.cpp",
1230    "llvm/lib/Transforms/Utils/SSAUpdaterBulk.cpp",
1231    "llvm/lib/Transforms/Utils/SanitizerStats.cpp",
1232    "llvm/lib/Transforms/Utils/SimplifyCFG.cpp",
1233    "llvm/lib/Transforms/Utils/SimplifyIndVar.cpp",
1234    "llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp",
1235    "llvm/lib/Transforms/Utils/SplitModule.cpp",
1236    "llvm/lib/Transforms/Utils/StripGCRelocates.cpp",
1237    "llvm/lib/Transforms/Utils/StripNonLineTableDebugInfo.cpp",
1238    "llvm/lib/Transforms/Utils/SymbolRewriter.cpp",
1239    "llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp",
1240    "llvm/lib/Transforms/Utils/Utils.cpp",
1241    "llvm/lib/Transforms/Utils/VNCoercion.cpp",
1242    "llvm/lib/Transforms/Utils/ValueMapper.cpp",
1243  ]
1244
1245  configs = [ ":swiftshader_llvm_private_config" ]
1246
1247  include_dirs = llvm_include_dirs
1248}
1249