1import("//llvm/utils/TableGen/tablegen.gni") 2 3declare_args() { 4 # Buggy, only use if you know what you're doing. 5 x86_gen_fold_tables = false 6} 7 8tablegen("X86GenCallingConv") { 9 visibility = [ ":LLVMX86CodeGen" ] 10 args = [ "-gen-callingconv" ] 11 td_file = "X86.td" 12} 13 14tablegen("X86GenDAGISel") { 15 visibility = [ ":LLVMX86CodeGen" ] 16 args = [ "-gen-dag-isel" ] 17 td_file = "X86.td" 18} 19 20tablegen("X86GenEVEX2VEXTables") { 21 visibility = [ ":LLVMX86CodeGen" ] 22 args = [ "-gen-x86-EVEX2VEX-tables" ] 23 td_file = "X86.td" 24} 25 26tablegen("X86GenFastISel") { 27 visibility = [ ":LLVMX86CodeGen" ] 28 args = [ "-gen-fast-isel" ] 29 td_file = "X86.td" 30} 31 32tablegen("X86GenGlobalISel") { 33 visibility = [ ":LLVMX86CodeGen" ] 34 args = [ "-gen-global-isel" ] 35 td_file = "X86.td" 36} 37 38tablegen("X86GenRegisterBank") { 39 visibility = [ ":LLVMX86CodeGen" ] 40 args = [ "-gen-register-bank" ] 41 td_file = "X86.td" 42} 43 44if (x86_gen_fold_tables) { 45 tablegen("X86GenFoldTables") { 46 visibility = [ ":LLVMX86CodeGen" ] 47 args = [ "-gen-x86-fold-tables" ] 48 td_file = "X86.td" 49 } 50} 51 52static_library("LLVMX86CodeGen") { 53 deps = [ 54 ":X86GenCallingConv", 55 ":X86GenDAGISel", 56 ":X86GenEVEX2VEXTables", 57 ":X86GenFastISel", 58 ":X86GenGlobalISel", 59 ":X86GenRegisterBank", 60 "MCTargetDesc", 61 "TargetInfo", 62 "//llvm/include/llvm/Config:llvm-config", 63 "//llvm/lib/Analysis", 64 "//llvm/lib/CodeGen", 65 "//llvm/lib/CodeGen/AsmPrinter", 66 "//llvm/lib/CodeGen/GlobalISel", 67 "//llvm/lib/CodeGen/SelectionDAG", 68 "//llvm/lib/IR", 69 "//llvm/lib/MC", 70 "//llvm/lib/Support", 71 "//llvm/lib/Target", 72 "//llvm/lib/Transforms/CFGuard", 73 "//llvm/lib/Transforms/Instrumentation", 74 ] 75 if (x86_gen_fold_tables) { 76 deps += [ ":X86GenFoldTables" ] 77 } 78 sources = [ 79 "X86AsmPrinter.cpp", 80 "X86AvoidStoreForwardingBlocks.cpp", 81 "X86AvoidTrailingCall.cpp", 82 "X86CallFrameOptimization.cpp", 83 "X86CallLowering.cpp", 84 "X86CallingConv.cpp", 85 "X86CmovConversion.cpp", 86 "X86DiscriminateMemOps.cpp", 87 "X86DomainReassignment.cpp", 88 "X86DynAllocaExpander.cpp", 89 "X86EvexToVex.cpp", 90 "X86ExpandPseudo.cpp", 91 "X86FastISel.cpp", 92 "X86FastTileConfig.cpp", 93 "X86FixupBWInsts.cpp", 94 "X86FixupLEAs.cpp", 95 "X86FixupSetCC.cpp", 96 "X86FlagsCopyLowering.cpp", 97 "X86FloatingPoint.cpp", 98 "X86FrameLowering.cpp", 99 "X86ISelDAGToDAG.cpp", 100 "X86ISelLowering.cpp", 101 "X86IndirectBranchTracking.cpp", 102 "X86IndirectThunks.cpp", 103 "X86InsertPrefetch.cpp", 104 "X86InsertWait.cpp", 105 "X86InstCombineIntrinsic.cpp", 106 "X86InstrFMA3Info.cpp", 107 "X86InstrFoldTables.cpp", 108 "X86InstrInfo.cpp", 109 "X86InstructionSelector.cpp", 110 "X86InterleavedAccess.cpp", 111 "X86LegalizerInfo.cpp", 112 "X86LoadValueInjectionLoadHardening.cpp", 113 "X86LoadValueInjectionRetHardening.cpp", 114 "X86LowerAMXIntrinsics.cpp", 115 "X86LowerAMXType.cpp", 116 "X86LowerTileCopy.cpp", 117 "X86MCInstLower.cpp", 118 "X86MachineFunctionInfo.cpp", 119 "X86MacroFusion.cpp", 120 "X86OptimizeLEAs.cpp", 121 "X86PadShortFunction.cpp", 122 "X86PartialReduction.cpp", 123 "X86PreAMXConfig.cpp", 124 "X86PreTileConfig.cpp", 125 "X86RegisterBankInfo.cpp", 126 "X86RegisterInfo.cpp", 127 "X86SelectionDAGInfo.cpp", 128 "X86ShuffleDecodeConstantPool.cpp", 129 "X86SpeculativeExecutionSideEffectSuppression.cpp", 130 "X86SpeculativeLoadHardening.cpp", 131 "X86Subtarget.cpp", 132 "X86TargetMachine.cpp", 133 "X86TargetObjectFile.cpp", 134 "X86TargetTransformInfo.cpp", 135 "X86TileConfig.cpp", 136 "X86VZeroUpper.cpp", 137 "X86WinEHState.cpp", 138 ] 139} 140 141# This is a bit different from most build files: Due to this group 142# having the directory's name, "//llvm/lib/Target/X86" will refer to this 143# target, which pulls in the code in this directory *and all subdirectories*. 144# For most other directories, "//llvm/lib/Foo" only pulls in the code directly 145# in "llvm/lib/Foo". The forwarding targets in //llvm/lib/Target expect this 146# different behavior. 147group("X86") { 148 deps = [ 149 ":LLVMX86CodeGen", 150 "AsmParser", 151 "Disassembler", 152 "MCTargetDesc", 153 "TargetInfo", 154 ] 155} 156