LCOV - code coverage report
Current view: top level - build-llvm/lib/Target/AMDGPU - AMDGPUGenSubtargetInfo.inc (source / functions) Hit Total Coverage
Test: llvm-toolchain.info Lines: 115 116 99.1 %
Date: 2018-02-23 15:42:53 Functions: 4 6 66.7 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
       2             : |*                                                                            *|
       3             : |* Subtarget Enumeration Source Fragment                                      *|
       4             : |*                                                                            *|
       5             : |* Automatically generated file, do not edit!                                 *|
       6             : |*                                                                            *|
       7             : \*===----------------------------------------------------------------------===*/
       8             : 
       9             : 
      10             : #ifdef GET_SUBTARGETINFO_ENUM
      11             : #undef GET_SUBTARGETINFO_ENUM
      12             : 
      13             : namespace llvm {
      14             : namespace AMDGPU {
      15             : enum {
      16             :   Feature16BitInsts = 0,
      17             :   FeatureAddNoCarryInsts = 1,
      18             :   FeatureApertureRegs = 2,
      19             :   FeatureAutoWaitcntBeforeBarrier = 3,
      20             :   FeatureCFALUBug = 4,
      21             :   FeatureCIInsts = 5,
      22             :   FeatureCaymanISA = 6,
      23             :   FeatureCodeObjectV3 = 7,
      24             :   FeatureDPP = 8,
      25             :   FeatureDX10Clamp = 9,
      26             :   FeatureDebuggerEmitPrologue = 10,
      27             :   FeatureDebuggerInsertNops = 11,
      28             :   FeatureDebuggerReserveRegs = 12,
      29             :   FeatureDisable = 13,
      30             :   FeatureDumpCode = 14,
      31             :   FeatureDumpCodeLower = 15,
      32             :   FeatureEnableHugePrivateBuffer = 16,
      33             :   FeatureEnableLoadStoreOpt = 17,
      34             :   FeatureEnableSIScheduler = 18,
      35             :   FeatureEnableUnsafeDSOffsetFolding = 19,
      36             :   FeatureEvergreen = 20,
      37             :   FeatureFMA = 21,
      38             :   FeatureFP16Denormals = 22,
      39             :   FeatureFP32Denormals = 23,
      40             :   FeatureFP64 = 24,
      41             :   FeatureFP64Denormals = 25,
      42             :   FeatureFP64FP16Denormals = 26,
      43             :   FeatureFPExceptions = 27,
      44             :   FeatureFastFMAF32 = 28,
      45             :   FeatureFetchLimit8 = 29,
      46             :   FeatureFetchLimit16 = 30,
      47             :   FeatureFlatAddressSpace = 31,
      48             :   FeatureFlatForGlobal = 32,
      49             :   FeatureFlatGlobalInsts = 33,
      50             :   FeatureFlatInstOffsets = 34,
      51             :   FeatureFlatScratchInsts = 35,
      52             :   FeatureGCN = 36,
      53             :   FeatureGCN3Encoding = 37,
      54             :   FeatureGFX9 = 38,
      55             :   FeatureGFX9Insts = 39,
      56             :   FeatureISAVersion6_0_0 = 40,
      57             :   FeatureISAVersion6_0_1 = 41,
      58             :   FeatureISAVersion7_0_0 = 42,
      59             :   FeatureISAVersion7_0_1 = 43,
      60             :   FeatureISAVersion7_0_2 = 44,
      61             :   FeatureISAVersion7_0_3 = 45,
      62             :   FeatureISAVersion7_0_4 = 46,
      63             :   FeatureISAVersion8_0_1 = 47,
      64             :   FeatureISAVersion8_0_2 = 48,
      65             :   FeatureISAVersion8_0_3 = 49,
      66             :   FeatureISAVersion8_1_0 = 50,
      67             :   FeatureISAVersion9_0_0 = 51,
      68             :   FeatureISAVersion9_0_2 = 52,
      69             :   FeatureIntClamp = 53,
      70             :   FeatureInv2PiInlineImm = 54,
      71             :   FeatureLDSBankCount16 = 55,
      72             :   FeatureLDSBankCount32 = 56,
      73             :   FeatureLocalMemorySize0 = 57,
      74             :   FeatureLocalMemorySize32768 = 58,
      75             :   FeatureLocalMemorySize65536 = 59,
      76             :   FeatureMIMG_R128 = 60,
      77             :   FeatureMadMixInsts = 61,
      78             :   FeatureMaxPrivateElementSize4 = 62,
      79             :   FeatureMaxPrivateElementSize8 = 63,
      80             :   FeatureMaxPrivateElementSize16 = 64,
      81             :   FeatureMovrel = 65,
      82             :   FeatureNorthernIslands = 66,
      83             :   FeaturePromoteAlloca = 67,
      84             :   FeatureR600 = 68,
      85             :   FeatureR600ALUInst = 69,
      86             :   FeatureR700 = 70,
      87             :   FeatureSDWA = 71,
      88             :   FeatureSDWAMac = 72,
      89             :   FeatureSDWAOmod = 73,
      90             :   FeatureSDWAOutModsVOPC = 74,
      91             :   FeatureSDWAScalar = 75,
      92             :   FeatureSDWASdst = 76,
      93             :   FeatureSGPRInitBug = 77,
      94             :   FeatureSMemRealTime = 78,
      95             :   FeatureScalarStores = 79,
      96             :   FeatureSeaIslands = 80,
      97             :   FeatureSouthernIslands = 81,
      98             :   FeatureTrapHandler = 82,
      99             :   FeatureUnalignedBufferAccess = 83,
     100             :   FeatureUnalignedScratchAccess = 84,
     101             :   FeatureUnpackedD16VMem = 85,
     102             :   FeatureVGPRIndexMode = 86,
     103             :   FeatureVGPRSpilling = 87,
     104             :   FeatureVOP3P = 88,
     105             :   FeatureVertexCache = 89,
     106             :   FeatureVolcanicIslands = 90,
     107             :   FeatureWavefrontSize16 = 91,
     108             :   FeatureWavefrontSize32 = 92,
     109             :   FeatureWavefrontSize64 = 93,
     110             :   FeatureXNACK = 94,
     111             :   HalfRate64Ops = 95,
     112             : };
     113             : } // end namespace AMDGPU
     114             : } // end namespace llvm
     115             : 
     116             : #endif // GET_SUBTARGETINFO_ENUM
     117             : 
     118             : 
     119             : #ifdef GET_SUBTARGETINFO_MC_DESC
     120             : #undef GET_SUBTARGETINFO_MC_DESC
     121             : 
     122             : namespace llvm {
     123             : // Sorted (by key) array of values for CPU features.
     124             : extern const llvm::SubtargetFeatureKV AMDGPUFeatureKV[] = {
     125             :   { "16-bit-insts", "Has i16/f16 instructions", { AMDGPU::Feature16BitInsts }, { } },
     126             :   { "DumpCode", "Dump MachineInstrs in the CodeEmitter", { AMDGPU::FeatureDumpCode }, { } },
     127             :   { "EVERGREEN", "EVERGREEN GPU generation", { AMDGPU::FeatureEvergreen }, { AMDGPU::FeatureFetchLimit16, AMDGPU::FeatureLocalMemorySize32768 } },
     128             :   { "GFX9", "GFX9 GPU generation", { AMDGPU::FeatureGFX9 }, { AMDGPU::FeatureFP64, AMDGPU::FeatureLocalMemorySize65536, AMDGPU::FeatureWavefrontSize64, AMDGPU::FeatureFlatAddressSpace, AMDGPU::FeatureGCN, AMDGPU::FeatureGCN3Encoding, AMDGPU::FeatureCIInsts, AMDGPU::Feature16BitInsts, AMDGPU::FeatureSMemRealTime, AMDGPU::FeatureScalarStores, AMDGPU::FeatureInv2PiInlineImm, AMDGPU::FeatureApertureRegs, AMDGPU::FeatureGFX9Insts, AMDGPU::FeatureVOP3P, AMDGPU::FeatureVGPRIndexMode, AMDGPU::FeatureFastFMAF32, AMDGPU::FeatureDPP, AMDGPU::FeatureIntClamp, AMDGPU::FeatureSDWA, AMDGPU::FeatureSDWAOmod, AMDGPU::FeatureSDWAScalar, AMDGPU::FeatureSDWASdst, AMDGPU::FeatureFlatInstOffsets, AMDGPU::FeatureFlatGlobalInsts, AMDGPU::FeatureFlatScratchInsts, AMDGPU::FeatureAddNoCarryInsts } },
     129             :   { "HasVertexCache", "Specify use of dedicated vertex cache", { AMDGPU::FeatureVertexCache }, { } },
     130             :   { "NORTHERN_ISLANDS", "NORTHERN_ISLANDS GPU generation", { AMDGPU::FeatureNorthernIslands }, { AMDGPU::FeatureFetchLimit16, AMDGPU::FeatureWavefrontSize64, AMDGPU::FeatureLocalMemorySize32768 } },
     131             :   { "R600", "R600 GPU generation", { AMDGPU::FeatureR600 }, { AMDGPU::FeatureR600ALUInst, AMDGPU::FeatureFetchLimit8, AMDGPU::FeatureLocalMemorySize0 } },
     132             :   { "R600ALUInst", "Older version of ALU instructions encoding", { AMDGPU::FeatureR600ALUInst }, { } },
     133             :   { "R700", "R700 GPU generation", { AMDGPU::FeatureR700 }, { AMDGPU::FeatureFetchLimit16, AMDGPU::FeatureLocalMemorySize0 } },
     134             :   { "SEA_ISLANDS", "SEA_ISLANDS GPU generation", { AMDGPU::FeatureSeaIslands }, { AMDGPU::FeatureFP64, AMDGPU::FeatureLocalMemorySize65536, AMDGPU::FeatureMIMG_R128, AMDGPU::FeatureWavefrontSize64, AMDGPU::FeatureGCN, AMDGPU::FeatureFlatAddressSpace, AMDGPU::FeatureCIInsts, AMDGPU::FeatureMovrel } },
     135             :   { "SOUTHERN_ISLANDS", "SOUTHERN_ISLANDS GPU generation", { AMDGPU::FeatureSouthernIslands }, { AMDGPU::FeatureFP64, AMDGPU::FeatureLocalMemorySize32768, AMDGPU::FeatureMIMG_R128, AMDGPU::FeatureWavefrontSize64, AMDGPU::FeatureGCN, AMDGPU::FeatureLDSBankCount32, AMDGPU::FeatureMovrel } },
     136             :   { "VOLCANIC_ISLANDS", "VOLCANIC_ISLANDS GPU generation", { AMDGPU::FeatureVolcanicIslands }, { AMDGPU::FeatureFP64, AMDGPU::FeatureLocalMemorySize65536, AMDGPU::FeatureMIMG_R128, AMDGPU::FeatureWavefrontSize64, AMDGPU::FeatureFlatAddressSpace, AMDGPU::FeatureGCN, AMDGPU::FeatureGCN3Encoding, AMDGPU::FeatureCIInsts, AMDGPU::Feature16BitInsts, AMDGPU::FeatureSMemRealTime, AMDGPU::FeatureVGPRIndexMode, AMDGPU::FeatureMovrel, AMDGPU::FeatureScalarStores, AMDGPU::FeatureInv2PiInlineImm, AMDGPU::FeatureSDWA, AMDGPU::FeatureSDWAOutModsVOPC, AMDGPU::FeatureSDWAMac, AMDGPU::FeatureDPP, AMDGPU::FeatureIntClamp } },
     137             :   { "add-no-carry-insts", "Have VALU add/sub instructions without carry out", { AMDGPU::FeatureAddNoCarryInsts }, { } },
     138             :   { "amdgpu-debugger-emit-prologue", "Emit debugger prologue", { AMDGPU::FeatureDebuggerEmitPrologue }, { } },
     139             :   { "amdgpu-debugger-insert-nops", "Insert one nop instruction for each high level source statement", { AMDGPU::FeatureDebuggerInsertNops }, { } },
     140             :   { "amdgpu-debugger-reserve-regs", "Reserve registers for debugger usage", { AMDGPU::FeatureDebuggerReserveRegs }, { } },
     141             :   { "aperture-regs", "Has Memory Aperture Base and Size Registers", { AMDGPU::FeatureApertureRegs }, { } },
     142             :   { "auto-waitcnt-before-barrier", "Hardware automatically inserts waitcnt before barrier", { AMDGPU::FeatureAutoWaitcntBeforeBarrier }, { } },
     143             :   { "caymanISA", "Use Cayman ISA", { AMDGPU::FeatureCaymanISA }, { } },
     144             :   { "cfalubug", "GPU has CF_ALU bug", { AMDGPU::FeatureCFALUBug }, { } },
     145             :   { "ci-insts", "Additional instructions for CI+", { AMDGPU::FeatureCIInsts }, { } },
     146             :   { "code-object-v3", "Generate code object version 3", { AMDGPU::FeatureCodeObjectV3 }, { } },
     147             :   { "dpp", "Support DPP (Data Parallel Primitives) extension", { AMDGPU::FeatureDPP }, { } },
     148             :   { "dumpcode", "Dump MachineInstrs in the CodeEmitter", { AMDGPU::FeatureDumpCodeLower }, { } },
     149             :   { "dx10-clamp", "clamp modifier clamps NaNs to 0.0", { AMDGPU::FeatureDX10Clamp }, { } },
     150             :   { "fast-fmaf", "Assuming f32 fma is at least as fast as mul + add", { AMDGPU::FeatureFastFMAF32 }, { } },
     151             :   { "fetch16", "Limit the maximum number of fetches in a clause to 16", { AMDGPU::FeatureFetchLimit16 }, { } },
     152             :   { "fetch8", "Limit the maximum number of fetches in a clause to 8", { AMDGPU::FeatureFetchLimit8 }, { } },
     153             :   { "flat-address-space", "Support flat address space", { AMDGPU::FeatureFlatAddressSpace }, { } },
     154             :   { "flat-for-global", "Force to generate flat instruction for global", { AMDGPU::FeatureFlatForGlobal }, { } },
     155             :   { "flat-global-insts", "Have global_* flat memory instructions", { AMDGPU::FeatureFlatGlobalInsts }, { } },
     156             :   { "flat-inst-offsets", "Flat instructions have immediate offset addressing mode", { AMDGPU::FeatureFlatInstOffsets }, { } },
     157             :   { "flat-scratch-insts", "Have scratch_* flat memory instructions", { AMDGPU::FeatureFlatScratchInsts }, { } },
     158             :   { "fmaf", "Enable single precision FMA (not as fast as mul+add, but fused)", { AMDGPU::FeatureFMA }, { } },
     159             :   { "fp-exceptions", "Enable floating point exceptions", { AMDGPU::FeatureFPExceptions }, { } },
     160             :   { "fp16-denormals", "Enable half precision denormal handling", { AMDGPU::FeatureFP16Denormals }, { AMDGPU::FeatureFP64FP16Denormals } },
     161             :   { "fp32-denormals", "Enable single precision denormal handling", { AMDGPU::FeatureFP32Denormals }, { } },
     162             :   { "fp64", "Enable double precision operations", { AMDGPU::FeatureFP64 }, { } },
     163             :   { "fp64-denormals", "Enable double and half precision denormal handling", { AMDGPU::FeatureFP64Denormals }, { AMDGPU::FeatureFP64, AMDGPU::FeatureFP64FP16Denormals } },
     164             :   { "fp64-fp16-denormals", "Enable double and half precision denormal handling", { AMDGPU::FeatureFP64FP16Denormals }, { AMDGPU::FeatureFP64 } },
     165             :   { "gcn", "GCN or newer GPU", { AMDGPU::FeatureGCN }, { } },
     166             :   { "gcn3-encoding", "Encoding format for VI", { AMDGPU::FeatureGCN3Encoding }, { } },
     167             :   { "gfx9-insts", "Additional instructions for GFX9+", { AMDGPU::FeatureGFX9Insts }, { } },
     168             :   { "half-rate-64-ops", "Most fp64 instructions are half rate instead of quarter", { AMDGPU::HalfRate64Ops }, { } },
     169             :   { "huge-private-buffer", "Enable private/scratch buffer sizes greater than 128 GB", { AMDGPU::FeatureEnableHugePrivateBuffer }, { } },
     170             :   { "int-clamp-insts", "Support clamp for integer destination", { AMDGPU::FeatureIntClamp }, { } },
     171             :   { "inv-2pi-inline-imm", "Has 1 / (2 * pi) as inline immediate", { AMDGPU::FeatureInv2PiInlineImm }, { } },
     172             :   { "isaver6.0.0", "Instruction set version number", { AMDGPU::FeatureISAVersion6_0_0 }, { AMDGPU::FeatureSouthernIslands, AMDGPU::FeatureFastFMAF32, AMDGPU::HalfRate64Ops, AMDGPU::FeatureLDSBankCount32 } },
     173             :   { "isaver6.0.1", "Instruction set version number", { AMDGPU::FeatureISAVersion6_0_1 }, { AMDGPU::FeatureSouthernIslands, AMDGPU::FeatureLDSBankCount32 } },
     174             :   { "isaver7.0.0", "Instruction set version number", { AMDGPU::FeatureISAVersion7_0_0 }, { AMDGPU::FeatureSeaIslands, AMDGPU::FeatureLDSBankCount32 } },
     175             :   { "isaver7.0.1", "Instruction set version number", { AMDGPU::FeatureISAVersion7_0_1 }, { AMDGPU::FeatureSeaIslands, AMDGPU::HalfRate64Ops, AMDGPU::FeatureLDSBankCount32, AMDGPU::FeatureFastFMAF32 } },
     176             :   { "isaver7.0.2", "Instruction set version number", { AMDGPU::FeatureISAVersion7_0_2 }, { AMDGPU::FeatureSeaIslands, AMDGPU::FeatureLDSBankCount16 } },
     177             :   { "isaver7.0.3", "Instruction set version number", { AMDGPU::FeatureISAVersion7_0_3 }, { AMDGPU::FeatureSeaIslands, AMDGPU::FeatureLDSBankCount16 } },
     178             :   { "isaver7.0.4", "Instruction set version number", { AMDGPU::FeatureISAVersion7_0_4 }, { AMDGPU::FeatureSeaIslands, AMDGPU::FeatureLDSBankCount32 } },
     179             :   { "isaver8.0.1", "Instruction set version number", { AMDGPU::FeatureISAVersion8_0_1 }, { AMDGPU::FeatureVolcanicIslands, AMDGPU::FeatureFastFMAF32, AMDGPU::HalfRate64Ops, AMDGPU::FeatureLDSBankCount32, AMDGPU::FeatureXNACK, AMDGPU::FeatureUnpackedD16VMem } },
     180             :   { "isaver8.0.2", "Instruction set version number", { AMDGPU::FeatureISAVersion8_0_2 }, { AMDGPU::FeatureVolcanicIslands, AMDGPU::FeatureLDSBankCount32, AMDGPU::FeatureSGPRInitBug, AMDGPU::FeatureUnpackedD16VMem } },
     181             :   { "isaver8.0.3", "Instruction set version number", { AMDGPU::FeatureISAVersion8_0_3 }, { AMDGPU::FeatureVolcanicIslands, AMDGPU::FeatureLDSBankCount32, AMDGPU::FeatureUnpackedD16VMem } },
     182             :   { "isaver8.1.0", "Instruction set version number", { AMDGPU::FeatureISAVersion8_1_0 }, { AMDGPU::FeatureVolcanicIslands, AMDGPU::FeatureLDSBankCount16, AMDGPU::FeatureXNACK } },
     183             :   { "isaver9.0.0", "Instruction set version number", { AMDGPU::FeatureISAVersion9_0_0 }, { AMDGPU::FeatureGFX9, AMDGPU::FeatureMadMixInsts, AMDGPU::FeatureLDSBankCount32 } },
     184             :   { "isaver9.0.2", "Instruction set version number", { AMDGPU::FeatureISAVersion9_0_2 }, { AMDGPU::FeatureGFX9, AMDGPU::FeatureMadMixInsts, AMDGPU::FeatureLDSBankCount32, AMDGPU::FeatureXNACK } },
     185             :   { "ldsbankcount16", "The number of LDS banks per compute unit.", { AMDGPU::FeatureLDSBankCount16 }, { } },
     186             :   { "ldsbankcount32", "The number of LDS banks per compute unit.", { AMDGPU::FeatureLDSBankCount32 }, { } },
     187             :   { "load-store-opt", "Enable SI load/store optimizer pass", { AMDGPU::FeatureEnableLoadStoreOpt }, { } },
     188             :   { "localmemorysize0", "The size of local memory in bytes", { AMDGPU::FeatureLocalMemorySize0 }, { } },
     189             :   { "localmemorysize32768", "The size of local memory in bytes", { AMDGPU::FeatureLocalMemorySize32768 }, { } },
     190             :   { "localmemorysize65536", "The size of local memory in bytes", { AMDGPU::FeatureLocalMemorySize65536 }, { } },
     191             :   { "mad-mix-insts", "Has v_mad_mix_f32, v_mad_mixlo_f16, v_mad_mixhi_f16 instructions", { AMDGPU::FeatureMadMixInsts }, { } },
     192             :   { "max-private-element-size-16", "Maximum private access size may be 16", { AMDGPU::FeatureMaxPrivateElementSize16 }, { } },
     193             :   { "max-private-element-size-4", "Maximum private access size may be 4", { AMDGPU::FeatureMaxPrivateElementSize4 }, { } },
     194             :   { "max-private-element-size-8", "Maximum private access size may be 8", { AMDGPU::FeatureMaxPrivateElementSize8 }, { } },
     195             :   { "mimg-r128", "Support 128-bit texture resources", { AMDGPU::FeatureMIMG_R128 }, { } },
     196             :   { "movrel", "Has v_movrel*_b32 instructions", { AMDGPU::FeatureMovrel }, { } },
     197             :   { "promote-alloca", "Enable promote alloca pass", { AMDGPU::FeaturePromoteAlloca }, { } },
     198             :   { "s-memrealtime", "Has s_memrealtime instruction", { AMDGPU::FeatureSMemRealTime }, { } },
     199             :   { "scalar-stores", "Has store scalar memory instructions", { AMDGPU::FeatureScalarStores }, { } },
     200             :   { "sdwa", "Support SDWA (Sub-DWORD Addressing) extension", { AMDGPU::FeatureSDWA }, { } },
     201             :   { "sdwa-mav", "Support v_mac_f32/f16 with SDWA (Sub-DWORD Addressing) extension", { AMDGPU::FeatureSDWAMac }, { } },
     202             :   { "sdwa-omod", "Support OMod with SDWA (Sub-DWORD Addressing) extension", { AMDGPU::FeatureSDWAOmod }, { } },
     203             :   { "sdwa-out-mods-vopc", "Support clamp for VOPC with SDWA (Sub-DWORD Addressing) extension", { AMDGPU::FeatureSDWAOutModsVOPC }, { } },
     204             :   { "sdwa-scalar", "Support scalar register with SDWA (Sub-DWORD Addressing) extension", { AMDGPU::FeatureSDWAScalar }, { } },
     205             :   { "sdwa-sdst", "Support scalar dst for VOPC with SDWA (Sub-DWORD Addressing) extension", { AMDGPU::FeatureSDWASdst }, { } },
     206             :   { "sgpr-init-bug", "VI SGPR initialization bug requiring a fixed SGPR allocation size", { AMDGPU::FeatureSGPRInitBug }, { } },
     207             :   { "si-scheduler", "Enable SI Machine Scheduler", { AMDGPU::FeatureEnableSIScheduler }, { } },
     208             :   { "trap-handler", "Trap handler support", { AMDGPU::FeatureTrapHandler }, { } },
     209             :   { "unaligned-buffer-access", "Support unaligned global loads and stores", { AMDGPU::FeatureUnalignedBufferAccess }, { } },
     210             :   { "unaligned-scratch-access", "Support unaligned scratch loads and stores", { AMDGPU::FeatureUnalignedScratchAccess }, { } },
     211             :   { "unpacked-d16-vmem", "Has unpacked d16 vmem instructions", { AMDGPU::FeatureUnpackedD16VMem }, { } },
     212             :   { "unsafe-ds-offset-folding", "Force using DS instruction immediate offsets on SI", { AMDGPU::FeatureEnableUnsafeDSOffsetFolding }, { } },
     213             :   { "vgpr-index-mode", "Has VGPR mode register indexing", { AMDGPU::FeatureVGPRIndexMode }, { } },
     214             :   { "vgpr-spilling", "Enable spilling of VGPRs to scratch memory", { AMDGPU::FeatureVGPRSpilling }, { } },
     215             :   { "vop3p", "Has VOP3P packed instructions", { AMDGPU::FeatureVOP3P }, { } },
     216             :   { "wavefrontsize16", "The number of threads per wavefront", { AMDGPU::FeatureWavefrontSize16 }, { } },
     217             :   { "wavefrontsize32", "The number of threads per wavefront", { AMDGPU::FeatureWavefrontSize32 }, { } },
     218             :   { "wavefrontsize64", "The number of threads per wavefront", { AMDGPU::FeatureWavefrontSize64 }, { } },
     219             :   { "xnack", "Enable XNACK support", { AMDGPU::FeatureXNACK }, { } },
     220       81686 : };
     221             : 
     222             : // Sorted (by key) array of values for CPU subtype.
     223             : extern const llvm::SubtargetFeatureKV AMDGPUSubTypeKV[] = {
     224             :   { "barts", "Select the barts processor", { AMDGPU::FeatureNorthernIslands, AMDGPU::FeatureVertexCache, AMDGPU::FeatureCFALUBug }, { } },
     225             :   { "bonaire", "Select the bonaire processor", { AMDGPU::FeatureISAVersion7_0_4 }, { } },
     226             :   { "caicos", "Select the caicos processor", { AMDGPU::FeatureNorthernIslands, AMDGPU::FeatureCFALUBug }, { } },
     227             :   { "carrizo", "Select the carrizo processor", { AMDGPU::FeatureISAVersion8_0_1 }, { } },
     228             :   { "cayman", "Select the cayman processor", { AMDGPU::FeatureNorthernIslands, AMDGPU::FeatureCaymanISA, AMDGPU::FeatureFMA }, { } },
     229             :   { "cedar", "Select the cedar processor", { AMDGPU::FeatureEvergreen, AMDGPU::FeatureWavefrontSize32, AMDGPU::FeatureVertexCache, AMDGPU::FeatureCFALUBug }, { } },
     230             :   { "cypress", "Select the cypress processor", { AMDGPU::FeatureEvergreen, AMDGPU::FeatureWavefrontSize64, AMDGPU::FeatureVertexCache, AMDGPU::FeatureFMA }, { } },
     231             :   { "fiji", "Select the fiji processor", { AMDGPU::FeatureISAVersion8_0_3 }, { } },
     232             :   { "generic", "Select the generic processor", { AMDGPU::FeatureGCN, AMDGPU::FeatureWavefrontSize64 }, { } },
     233             :   { "gfx600", "Select the gfx600 processor", { AMDGPU::FeatureISAVersion6_0_0 }, { } },
     234             :   { "gfx601", "Select the gfx601 processor", { AMDGPU::FeatureISAVersion6_0_1 }, { } },
     235             :   { "gfx700", "Select the gfx700 processor", { AMDGPU::FeatureISAVersion7_0_0 }, { } },
     236             :   { "gfx701", "Select the gfx701 processor", { AMDGPU::FeatureISAVersion7_0_1 }, { } },
     237             :   { "gfx702", "Select the gfx702 processor", { AMDGPU::FeatureISAVersion7_0_2 }, { } },
     238             :   { "gfx703", "Select the gfx703 processor", { AMDGPU::FeatureISAVersion7_0_3 }, { } },
     239             :   { "gfx704", "Select the gfx704 processor", { AMDGPU::FeatureISAVersion7_0_4 }, { } },
     240             :   { "gfx801", "Select the gfx801 processor", { AMDGPU::FeatureISAVersion8_0_1 }, { } },
     241             :   { "gfx802", "Select the gfx802 processor", { AMDGPU::FeatureISAVersion8_0_2 }, { } },
     242             :   { "gfx803", "Select the gfx803 processor", { AMDGPU::FeatureISAVersion8_0_3 }, { } },
     243             :   { "gfx810", "Select the gfx810 processor", { AMDGPU::FeatureISAVersion8_1_0 }, { } },
     244             :   { "gfx900", "Select the gfx900 processor", { AMDGPU::FeatureISAVersion9_0_0 }, { } },
     245             :   { "gfx902", "Select the gfx902 processor", { AMDGPU::FeatureISAVersion9_0_2 }, { } },
     246             :   { "hainan", "Select the hainan processor", { AMDGPU::FeatureISAVersion6_0_1 }, { } },
     247             :   { "hawaii", "Select the hawaii processor", { AMDGPU::FeatureISAVersion7_0_1 }, { } },
     248             :   { "iceland", "Select the iceland processor", { AMDGPU::FeatureISAVersion8_0_2 }, { } },
     249             :   { "juniper", "Select the juniper processor", { AMDGPU::FeatureEvergreen, AMDGPU::FeatureWavefrontSize64, AMDGPU::FeatureVertexCache }, { } },
     250             :   { "kabini", "Select the kabini processor", { AMDGPU::FeatureISAVersion7_0_3 }, { } },
     251             :   { "kaveri", "Select the kaveri processor", { AMDGPU::FeatureISAVersion7_0_0 }, { } },
     252             :   { "mullins", "Select the mullins processor", { AMDGPU::FeatureISAVersion7_0_3 }, { } },
     253             :   { "oland", "Select the oland processor", { AMDGPU::FeatureISAVersion6_0_1 }, { } },
     254             :   { "pitcairn", "Select the pitcairn processor", { AMDGPU::FeatureISAVersion6_0_1 }, { } },
     255             :   { "polaris10", "Select the polaris10 processor", { AMDGPU::FeatureISAVersion8_0_3 }, { } },
     256             :   { "polaris11", "Select the polaris11 processor", { AMDGPU::FeatureISAVersion8_0_3 }, { } },
     257             :   { "r600", "Select the r600 processor", { AMDGPU::FeatureR600, AMDGPU::FeatureWavefrontSize64, AMDGPU::FeatureVertexCache }, { } },
     258             :   { "r630", "Select the r630 processor", { AMDGPU::FeatureR600, AMDGPU::FeatureWavefrontSize32, AMDGPU::FeatureVertexCache }, { } },
     259             :   { "redwood", "Select the redwood processor", { AMDGPU::FeatureEvergreen, AMDGPU::FeatureWavefrontSize64, AMDGPU::FeatureVertexCache, AMDGPU::FeatureCFALUBug }, { } },
     260             :   { "rs880", "Select the rs880 processor", { AMDGPU::FeatureR600, AMDGPU::FeatureWavefrontSize16 }, { } },
     261             :   { "rv670", "Select the rv670 processor", { AMDGPU::FeatureR600, AMDGPU::FeatureWavefrontSize64, AMDGPU::FeatureVertexCache }, { } },
     262             :   { "rv710", "Select the rv710 processor", { AMDGPU::FeatureR700, AMDGPU::FeatureWavefrontSize32, AMDGPU::FeatureVertexCache }, { } },
     263             :   { "rv730", "Select the rv730 processor", { AMDGPU::FeatureR700, AMDGPU::FeatureWavefrontSize32, AMDGPU::FeatureVertexCache }, { } },
     264             :   { "rv770", "Select the rv770 processor", { AMDGPU::FeatureR700, AMDGPU::FeatureWavefrontSize64, AMDGPU::FeatureVertexCache }, { } },
     265             :   { "stoney", "Select the stoney processor", { AMDGPU::FeatureISAVersion8_1_0 }, { } },
     266             :   { "sumo", "Select the sumo processor", { AMDGPU::FeatureEvergreen, AMDGPU::FeatureWavefrontSize64, AMDGPU::FeatureCFALUBug }, { } },
     267             :   { "tahiti", "Select the tahiti processor", { AMDGPU::FeatureISAVersion6_0_0 }, { } },
     268             :   { "tonga", "Select the tonga processor", { AMDGPU::FeatureISAVersion8_0_2 }, { } },
     269             :   { "turks", "Select the turks processor", { AMDGPU::FeatureNorthernIslands, AMDGPU::FeatureVertexCache, AMDGPU::FeatureCFALUBug }, { } },
     270             :   { "verde", "Select the verde processor", { AMDGPU::FeatureISAVersion6_0_1 }, { } },
     271       81686 : };
     272             : 
     273             : #ifdef DBGFIELD
     274             : #error "<target>GenSubtargetInfo.inc requires a DBGFIELD macro"
     275             : #endif
     276             : #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
     277             : #define DBGFIELD(x) x,
     278             : #else
     279             : #define DBGFIELD(x)
     280             : #endif
     281             : 
     282             : // Functional units for "R600_VLIW5_Itin"
     283             : namespace R600_VLIW5_ItinFU {
     284             :   const unsigned ALU_X = 1 << 0;
     285             :   const unsigned ALU_Y = 1 << 1;
     286             :   const unsigned ALU_Z = 1 << 2;
     287             :   const unsigned ALU_W = 1 << 3;
     288             :   const unsigned TRANS = 1 << 4;
     289             :   const unsigned ALU_NULL = 1 << 5;
     290             : } // end namespace R600_VLIW5_ItinFU
     291             : 
     292             : // Functional units for "R600_VLIW4_Itin"
     293             : namespace R600_VLIW4_ItinFU {
     294             :   const unsigned ALU_X = 1 << 0;
     295             :   const unsigned ALU_Y = 1 << 1;
     296             :   const unsigned ALU_Z = 1 << 2;
     297             :   const unsigned ALU_W = 1 << 3;
     298             :   const unsigned ALU_NULL = 1 << 4;
     299             : } // end namespace R600_VLIW4_ItinFU
     300             : 
     301             : extern const llvm::InstrStage AMDGPUStages[] = {
     302             :   { 0, 0, 0, llvm::InstrStage::Required }, // No itinerary
     303             :   { 1, R600_VLIW5_ItinFU::ALU_X | R600_VLIW5_ItinFU::ALU_Y | R600_VLIW5_ItinFU::ALU_Z | R600_VLIW5_ItinFU::ALU_W | R600_VLIW5_ItinFU::TRANS, -1, (llvm::InstrStage::ReservationKinds)0 }, // 1
     304             :   { 1, R600_VLIW5_ItinFU::ALU_NULL, -1, (llvm::InstrStage::ReservationKinds)0 }, // 2
     305             :   { 1, R600_VLIW5_ItinFU::ALU_X | R600_VLIW5_ItinFU::ALU_Y | R600_VLIW5_ItinFU::ALU_Z | R600_VLIW5_ItinFU::ALU_W, -1, (llvm::InstrStage::ReservationKinds)0 }, // 3
     306             :   { 1, R600_VLIW5_ItinFU::TRANS, -1, (llvm::InstrStage::ReservationKinds)0 }, // 4
     307             :   { 1, R600_VLIW5_ItinFU::ALU_X, -1, (llvm::InstrStage::ReservationKinds)0 }, // 5
     308             :   { 1, R600_VLIW4_ItinFU::ALU_X | R600_VLIW4_ItinFU::ALU_Y | R600_VLIW4_ItinFU::ALU_Z | R600_VLIW4_ItinFU::ALU_W, -1, (llvm::InstrStage::ReservationKinds)0 }, // 6
     309             :   { 1, R600_VLIW4_ItinFU::ALU_NULL, -1, (llvm::InstrStage::ReservationKinds)0 }, // 7
     310             :   { 0, 0, 0, llvm::InstrStage::Required } // End stages
     311             : };
     312             : extern const unsigned AMDGPUOperandCycles[] = {
     313             :   0, // No itinerary
     314             :   0 // End operand cycles
     315             : };
     316             : extern const unsigned AMDGPUForwardingPaths[] = {
     317             :  0, // No itinerary
     318             :  0 // End bypass tables
     319             : };
     320             : 
     321             : static const llvm::InstrItinerary R600_VLIW5_Itin[] = {
     322             :   { 0, 0, 0, 0, 0 }, // 0 NoInstrModel
     323             :   { 1, 1, 2, 0, 0 }, // 1 AnyALU
     324             :   { 1, 2, 3, 0, 0 }, // 2 NullALU_Write32Bit
     325             :   { 1, 2, 3, 0, 0 }, // 3 NullALU
     326             :   { 1, 3, 4, 0, 0 }, // 4 VecALU
     327             :   { 1, 2, 3, 0, 0 }, // 5 NullALU_WriteVMEM
     328             :   { 1, 4, 5, 0, 0 }, // 6 TransALU
     329             :   { 1, 2, 3, 0, 0 }, // 7 NullALU_WriteLDS
     330             :   { 1, 2, 3, 0, 0 }, // 8 NullALU_WriteExport
     331             :   { 1, 5, 6, 0, 0 }, // 9 XALU
     332             :   { 1, 2, 3, 0, 0 }, // 10 NullALU_WriteBranch
     333             :   { 1, 2, 3, 0, 0 }, // 11 NullALU_WriteSALU
     334             :   { 1, 2, 3, 0, 0 }, // 12 NullALU_WriteBarrier
     335             :   { 1, 2, 3, 0, 0 }, // 13 NullALU_WriteSMEM
     336             :   { 1, 2, 3, 0, 0 }, // 14 NullALU_Write32Bit_WriteSALU
     337             :   { 1, 2, 3, 0, 0 }, // 15 NullALU_WriteDoubleAdd
     338             :   { 1, 2, 3, 0, 0 }, // 16 NullALU_Write64Bit
     339             :   { 1, 2, 3, 0, 0 }, // 17 NullALU_WriteQuarterRate32
     340             :   { 1, 2, 3, 0, 0 }, // 18 NullALU_WriteFloatFMA
     341             :   { 1, 2, 3, 0, 0 }, // 19 NullALU_WriteDouble
     342             :   { 1, 2, 3, 0, 0 }, // 20 NullALU_WriteFloatFMA_WriteSALU
     343             :   { 1, 2, 3, 0, 0 }, // 21 NullALU_WriteDouble_WriteSALU
     344             :   { 1, 2, 3, 0, 0 }, // 22 NullALU_Write64Bit_Write64Bit
     345             :   { 0, 0, 0, 0, 0 }, // 23 COPY
     346             :   { 0, ~0U, ~0U, ~0U, ~0U } // end marker
     347             : };
     348             : 
     349             : static const llvm::InstrItinerary R600_VLIW4_Itin[] = {
     350             :   { 0, 0, 0, 0, 0 }, // 0 NoInstrModel
     351             :   { 1, 6, 7, 0, 0 }, // 1 AnyALU
     352             :   { 1, 7, 8, 0, 0 }, // 2 NullALU_Write32Bit
     353             :   { 1, 7, 8, 0, 0 }, // 3 NullALU
     354             :   { 1, 6, 7, 0, 0 }, // 4 VecALU
     355             :   { 1, 7, 8, 0, 0 }, // 5 NullALU_WriteVMEM
     356             :   { 1, 7, 8, 0, 0 }, // 6 TransALU
     357             :   { 1, 7, 8, 0, 0 }, // 7 NullALU_WriteLDS
     358             :   { 1, 7, 8, 0, 0 }, // 8 NullALU_WriteExport
     359             :   { 0, 0, 0, 0, 0 }, // 9 XALU
     360             :   { 1, 7, 8, 0, 0 }, // 10 NullALU_WriteBranch
     361             :   { 1, 7, 8, 0, 0 }, // 11 NullALU_WriteSALU
     362             :   { 1, 7, 8, 0, 0 }, // 12 NullALU_WriteBarrier
     363             :   { 1, 7, 8, 0, 0 }, // 13 NullALU_WriteSMEM
     364             :   { 1, 7, 8, 0, 0 }, // 14 NullALU_Write32Bit_WriteSALU
     365             :   { 1, 7, 8, 0, 0 }, // 15 NullALU_WriteDoubleAdd
     366             :   { 1, 7, 8, 0, 0 }, // 16 NullALU_Write64Bit
     367             :   { 1, 7, 8, 0, 0 }, // 17 NullALU_WriteQuarterRate32
     368             :   { 1, 7, 8, 0, 0 }, // 18 NullALU_WriteFloatFMA
     369             :   { 1, 7, 8, 0, 0 }, // 19 NullALU_WriteDouble
     370             :   { 1, 7, 8, 0, 0 }, // 20 NullALU_WriteFloatFMA_WriteSALU
     371             :   { 1, 7, 8, 0, 0 }, // 21 NullALU_WriteDouble_WriteSALU
     372             :   { 1, 7, 8, 0, 0 }, // 22 NullALU_Write64Bit_Write64Bit
     373             :   { 0, 0, 0, 0, 0 }, // 23 COPY
     374             :   { 0, ~0U, ~0U, ~0U, ~0U } // end marker
     375             : };
     376             : 
     377             : // ===============================================================
     378             : // Data tables for the new per-operand machine model.
     379             : 
     380             : // {ProcResourceIdx, Cycles}
     381             : extern const llvm::MCWriteProcResEntry AMDGPUWriteProcResTable[] = {
     382             :   { 0,  0}, // Invalid
     383             :   { 5,  1}, // #1
     384             :   { 6,  1}, // #2
     385             :   { 3,  1}, // #3
     386             :   { 2,  1}, // #4
     387             :   { 1,  1}, // #5
     388             :   { 4,  1}, // #6
     389             :   { 4,  1}, // #7
     390             :   { 5,  1}, // #8
     391             :   { 5,  2} // #9
     392             : }; // AMDGPUWriteProcResTable
     393             : 
     394             : // {Cycles, WriteResourceID}
     395             : extern const llvm::MCWriteLatencyEntry AMDGPUWriteLatencyTable[] = {
     396             :   { 0,  0}, // Invalid
     397             :   { 1,  0}, // #1 Write32Bit_WriteSALU_WriteFloatFMA
     398             :   {80,  0}, // #2 WriteVMEM
     399             :   { 5,  0}, // #3 WriteLDS_WriteSMEM
     400             :   { 4,  0}, // #4 WriteExport_WriteQuarterRate32_WriteDouble
     401             :   { 8,  0}, // #5 WriteBranch_WriteDoubleAdd
     402             :   {500,  0}, // #6 WriteBarrier
     403             :   { 1,  0}, // #7 Write32Bit_WriteFloatFMA
     404             :   { 1,  0}, // #8 WriteSALU
     405             :   { 2,  0}, // #9 Write64Bit_WriteDoubleAdd
     406             :   {16,  0}, // #10 WriteFloatFMA_WriteDouble
     407             :   {16,  0}, // #11 WriteFloatFMA_WriteDouble
     408             :   { 1,  0}, // #12 WriteSALU
     409             :   { 2,  0}, // #13 Write64Bit
     410             :   { 2,  0}, // #14 Write64Bit
     411             :   { 4,  0}, // #15 WriteDouble
     412             :   { 1,  0} // #16 WriteSALU
     413             : }; // AMDGPUWriteLatencyTable
     414             : 
     415             : // {UseIdx, WriteResourceID, Cycles}
     416             : extern const llvm::MCReadAdvanceEntry AMDGPUReadAdvanceTable[] = {
     417             :   {0,  0,  0}, // Invalid
     418             : }; // AMDGPUReadAdvanceTable
     419             : 
     420             : // {Name, NumMicroOps, BeginGroup, EndGroup, WriteProcResIdx,#, WriteLatencyIdx,#, ReadAdvanceIdx,#}
     421             : static const llvm::MCSchedClassDesc SIQuarterSpeedModelSchedClasses[] = {
     422             :   {DBGFIELD("InvalidSchedClass")  65535, false, false,  0, 0,  0, 0,  0, 0},
     423             :   {DBGFIELD("AnyALU")             0, false, false,  0, 0,  0, 0,  0, 0}, // #1
     424             :   {DBGFIELD("NullALU_Write32Bit") 1, false, false,  1, 1,  1, 1,  0, 0}, // #2
     425             :   {DBGFIELD("NullALU")            0, false, false,  0, 0,  0, 0,  0, 0}, // #3
     426             :   {DBGFIELD("VecALU")             0, false, false,  0, 0,  0, 0,  0, 0}, // #4
     427             :   {DBGFIELD("NullALU_WriteVMEM")  1, false, false,  2, 1,  2, 1,  0, 0}, // #5
     428             :   {DBGFIELD("TransALU")           0, false, false,  0, 0,  0, 0,  0, 0}, // #6
     429             :   {DBGFIELD("NullALU_WriteLDS")   1, false, false,  3, 1,  3, 1,  0, 0}, // #7
     430             :   {DBGFIELD("NullALU_WriteExport") 1, false, false,  4, 1,  4, 1,  0, 0}, // #8
     431             :   {DBGFIELD("XALU")               0, false, false,  0, 0,  0, 0,  0, 0}, // #9
     432             :   {DBGFIELD("NullALU_WriteBranch") 1, false, false,  5, 1,  5, 1,  0, 0}, // #10
     433             :   {DBGFIELD("NullALU_WriteSALU")  1, false, false,  6, 1,  1, 1,  0, 0}, // #11
     434             :   {DBGFIELD("NullALU_WriteBarrier") 1, false, false,  5, 1,  6, 1,  0, 0}, // #12
     435             :   {DBGFIELD("NullALU_WriteSMEM")  1, false, false,  3, 1,  3, 1,  0, 0}, // #13
     436             :   {DBGFIELD("NullALU_Write32Bit_WriteSALU") 2, false, false,  7, 2,  7, 2,  0, 0}, // #14
     437             :   {DBGFIELD("NullALU_WriteDoubleAdd") 1, false, false,  1, 1,  5, 1,  0, 0}, // #15
     438             :   {DBGFIELD("NullALU_Write64Bit") 1, false, false,  1, 1,  9, 1,  0, 0}, // #16
     439             :   {DBGFIELD("NullALU_WriteQuarterRate32") 1, false, false,  1, 1,  4, 1,  0, 0}, // #17
     440             :   {DBGFIELD("NullALU_WriteFloatFMA") 1, false, false,  1, 1, 10, 1,  0, 0}, // #18
     441             :   {DBGFIELD("NullALU_WriteDouble") 1, false, false,  1, 1, 10, 1,  0, 0}, // #19
     442             :   {DBGFIELD("NullALU_WriteFloatFMA_WriteSALU") 2, false, false,  7, 2, 11, 2,  0, 0}, // #20
     443             :   {DBGFIELD("NullALU_WriteDouble_WriteSALU") 2, false, false,  7, 2, 11, 2,  0, 0}, // #21
     444             :   {DBGFIELD("NullALU_Write64Bit_Write64Bit") 2, false, false,  9, 1, 13, 2,  0, 0}, // #22
     445             :   {DBGFIELD("COPY")               65534, false, false,  0, 0,  0, 0,  0, 0}, // #23
     446             :   {DBGFIELD("Write32Bit")         1, false, false,  1, 1,  1, 1,  0, 0}, // #24
     447             :   {DBGFIELD("Write64Bit")         1, false, false,  1, 1,  9, 1,  0, 0}, // #25
     448             :   {DBGFIELD("WriteSALU")          1, false, false,  6, 1,  1, 1,  0, 0}, // #26
     449             : }; // SIQuarterSpeedModelSchedClasses
     450             : 
     451             : // {Name, NumMicroOps, BeginGroup, EndGroup, WriteProcResIdx,#, WriteLatencyIdx,#, ReadAdvanceIdx,#}
     452             : static const llvm::MCSchedClassDesc SIFullSpeedModelSchedClasses[] = {
     453             :   {DBGFIELD("InvalidSchedClass")  65535, false, false,  0, 0,  0, 0,  0, 0},
     454             :   {DBGFIELD("AnyALU")             0, false, false,  0, 0,  0, 0,  0, 0}, // #1
     455             :   {DBGFIELD("NullALU_Write32Bit") 1, false, false,  1, 1,  1, 1,  0, 0}, // #2
     456             :   {DBGFIELD("NullALU")            0, false, false,  0, 0,  0, 0,  0, 0}, // #3
     457             :   {DBGFIELD("VecALU")             0, false, false,  0, 0,  0, 0,  0, 0}, // #4
     458             :   {DBGFIELD("NullALU_WriteVMEM")  1, false, false,  2, 1,  2, 1,  0, 0}, // #5
     459             :   {DBGFIELD("TransALU")           0, false, false,  0, 0,  0, 0,  0, 0}, // #6
     460             :   {DBGFIELD("NullALU_WriteLDS")   1, false, false,  3, 1,  3, 1,  0, 0}, // #7
     461             :   {DBGFIELD("NullALU_WriteExport") 1, false, false,  4, 1,  4, 1,  0, 0}, // #8
     462             :   {DBGFIELD("XALU")               0, false, false,  0, 0,  0, 0,  0, 0}, // #9
     463             :   {DBGFIELD("NullALU_WriteBranch") 1, false, false,  5, 1,  5, 1,  0, 0}, // #10
     464             :   {DBGFIELD("NullALU_WriteSALU")  1, false, false,  6, 1,  1, 1,  0, 0}, // #11
     465             :   {DBGFIELD("NullALU_WriteBarrier") 1, false, false,  5, 1,  6, 1,  0, 0}, // #12
     466             :   {DBGFIELD("NullALU_WriteSMEM")  1, false, false,  3, 1,  3, 1,  0, 0}, // #13
     467             :   {DBGFIELD("NullALU_Write32Bit_WriteSALU") 2, false, false,  7, 2,  7, 2,  0, 0}, // #14
     468             :   {DBGFIELD("NullALU_WriteDoubleAdd") 1, false, false,  1, 1,  9, 1,  0, 0}, // #15
     469             :   {DBGFIELD("NullALU_Write64Bit") 1, false, false,  1, 1,  9, 1,  0, 0}, // #16
     470             :   {DBGFIELD("NullALU_WriteQuarterRate32") 1, false, false,  1, 1,  4, 1,  0, 0}, // #17
     471             :   {DBGFIELD("NullALU_WriteFloatFMA") 1, false, false,  1, 1,  1, 1,  0, 0}, // #18
     472             :   {DBGFIELD("NullALU_WriteDouble") 1, false, false,  1, 1,  4, 1,  0, 0}, // #19
     473             :   {DBGFIELD("NullALU_WriteFloatFMA_WriteSALU") 2, false, false,  7, 2,  7, 2,  0, 0}, // #20
     474             :   {DBGFIELD("NullALU_WriteDouble_WriteSALU") 2, false, false,  7, 2, 15, 2,  0, 0}, // #21
     475             :   {DBGFIELD("NullALU_Write64Bit_Write64Bit") 2, false, false,  9, 1, 13, 2,  0, 0}, // #22
     476             :   {DBGFIELD("COPY")               65534, false, false,  0, 0,  0, 0,  0, 0}, // #23
     477             :   {DBGFIELD("Write32Bit")         1, false, false,  1, 1,  1, 1,  0, 0}, // #24
     478             :   {DBGFIELD("Write64Bit")         1, false, false,  1, 1,  9, 1,  0, 0}, // #25
     479             :   {DBGFIELD("WriteSALU")          1, false, false,  6, 1,  1, 1,  0, 0}, // #26
     480             : }; // SIFullSpeedModelSchedClasses
     481             : 
     482             : static const llvm::MCSchedModel NoSchedModel = {
     483             :   MCSchedModel::DefaultIssueWidth,
     484             :   MCSchedModel::DefaultMicroOpBufferSize,
     485             :   MCSchedModel::DefaultLoopMicroOpBufferSize,
     486             :   MCSchedModel::DefaultLoadLatency,
     487             :   MCSchedModel::DefaultHighLatency,
     488             :   MCSchedModel::DefaultMispredictPenalty,
     489             :   false, // PostRAScheduler
     490             :   false, // CompleteModel
     491             :   0, // Processor ID
     492             :   nullptr, nullptr, 0, 0, // No instruction-level machine model.
     493             :   nullptr // No Itinerary
     494             : };
     495             : 
     496             : static const llvm::MCSchedModel R600_VLIW5_ItinModel = {
     497             :   MCSchedModel::DefaultIssueWidth,
     498             :   MCSchedModel::DefaultMicroOpBufferSize,
     499             :   MCSchedModel::DefaultLoopMicroOpBufferSize,
     500             :   MCSchedModel::DefaultLoadLatency,
     501             :   MCSchedModel::DefaultHighLatency,
     502             :   MCSchedModel::DefaultMispredictPenalty,
     503             :   false, // PostRAScheduler
     504             :   false, // CompleteModel
     505             :   1, // Processor ID
     506             :   nullptr, nullptr, 0, 0, // No instruction-level machine model.
     507             :   R600_VLIW5_Itin
     508             : };
     509             : 
     510             : static const unsigned SIQuarterSpeedModelProcResourceSubUnits[] = {
     511             :   0,  // Invalid
     512             : };
     513             : 
     514             : // {Name, NumUnits, SuperIdx, IsBuffered, SubUnitsIdxBegin}
     515             : static const llvm::MCProcResourceDesc SIQuarterSpeedModelProcResources[] = {
     516             :   {DBGFIELD("InvalidUnit")     0, 0, 0, 0},
     517             :   {DBGFIELD("HWBranch")        1, 0, 1, nullptr}, // #1
     518             :   {DBGFIELD("HWExport")        1, 0, 7, nullptr}, // #2
     519             :   {DBGFIELD("HWLGKM")          1, 0, 31, nullptr}, // #3
     520             :   {DBGFIELD("HWSALU")          1, 0, 1, nullptr}, // #4
     521             :   {DBGFIELD("HWVALU")          1, 0, 1, nullptr}, // #5
     522             :   {DBGFIELD("HWVMEM")          1, 0, 15, nullptr}, // #6
     523             : };
     524             : 
     525             : static const llvm::MCSchedModel SIQuarterSpeedModel = {
     526             :   1, // IssueWidth
     527             :   1, // MicroOpBufferSize
     528             :   MCSchedModel::DefaultLoopMicroOpBufferSize,
     529             :   MCSchedModel::DefaultLoadLatency,
     530             :   MCSchedModel::DefaultHighLatency,
     531             :   20, // MispredictPenalty
     532             :   true, // PostRAScheduler
     533             :   true, // CompleteModel
     534             :   2, // Processor ID
     535             :   SIQuarterSpeedModelProcResources,
     536             :   SIQuarterSpeedModelSchedClasses,
     537             :   7,
     538             :   27,
     539             :   nullptr // No Itinerary
     540             : };
     541             : 
     542             : static const llvm::MCSchedModel R600_VLIW4_ItinModel = {
     543             :   MCSchedModel::DefaultIssueWidth,
     544             :   MCSchedModel::DefaultMicroOpBufferSize,
     545             :   MCSchedModel::DefaultLoopMicroOpBufferSize,
     546             :   MCSchedModel::DefaultLoadLatency,
     547             :   MCSchedModel::DefaultHighLatency,
     548             :   MCSchedModel::DefaultMispredictPenalty,
     549             :   false, // PostRAScheduler
     550             :   false, // CompleteModel
     551             :   3, // Processor ID
     552             :   nullptr, nullptr, 0, 0, // No instruction-level machine model.
     553             :   R600_VLIW4_Itin
     554             : };
     555             : 
     556             : static const unsigned SIFullSpeedModelProcResourceSubUnits[] = {
     557             :   0,  // Invalid
     558             : };
     559             : 
     560             : // {Name, NumUnits, SuperIdx, IsBuffered, SubUnitsIdxBegin}
     561             : static const llvm::MCProcResourceDesc SIFullSpeedModelProcResources[] = {
     562             :   {DBGFIELD("InvalidUnit")     0, 0, 0, 0},
     563             :   {DBGFIELD("HWBranch")        1, 0, 1, nullptr}, // #1
     564             :   {DBGFIELD("HWExport")        1, 0, 7, nullptr}, // #2
     565             :   {DBGFIELD("HWLGKM")          1, 0, 31, nullptr}, // #3
     566             :   {DBGFIELD("HWSALU")          1, 0, 1, nullptr}, // #4
     567             :   {DBGFIELD("HWVALU")          1, 0, 1, nullptr}, // #5
     568             :   {DBGFIELD("HWVMEM")          1, 0, 15, nullptr}, // #6
     569             : };
     570             : 
     571             : static const llvm::MCSchedModel SIFullSpeedModel = {
     572             :   1, // IssueWidth
     573             :   1, // MicroOpBufferSize
     574             :   MCSchedModel::DefaultLoopMicroOpBufferSize,
     575             :   MCSchedModel::DefaultLoadLatency,
     576             :   MCSchedModel::DefaultHighLatency,
     577             :   20, // MispredictPenalty
     578             :   true, // PostRAScheduler
     579             :   true, // CompleteModel
     580             :   4, // Processor ID
     581             :   SIFullSpeedModelProcResources,
     582             :   SIFullSpeedModelSchedClasses,
     583             :   7,
     584             :   27,
     585             :   nullptr // No Itinerary
     586             : };
     587             : 
     588             : // Sorted (by key) array of itineraries for CPU subtype.
     589             : extern const llvm::SubtargetInfoKV AMDGPUProcSchedKV[] = {
     590             :   { "barts", (const void *)&R600_VLIW5_ItinModel },
     591             :   { "bonaire", (const void *)&SIQuarterSpeedModel },
     592             :   { "caicos", (const void *)&R600_VLIW5_ItinModel },
     593             :   { "carrizo", (const void *)&SIQuarterSpeedModel },
     594             :   { "cayman", (const void *)&R600_VLIW4_ItinModel },
     595             :   { "cedar", (const void *)&R600_VLIW5_ItinModel },
     596             :   { "cypress", (const void *)&R600_VLIW5_ItinModel },
     597             :   { "fiji", (const void *)&SIQuarterSpeedModel },
     598             :   { "generic", (const void *)&NoSchedModel },
     599             :   { "gfx600", (const void *)&SIFullSpeedModel },
     600             :   { "gfx601", (const void *)&SIQuarterSpeedModel },
     601             :   { "gfx700", (const void *)&SIQuarterSpeedModel },
     602             :   { "gfx701", (const void *)&SIFullSpeedModel },
     603             :   { "gfx702", (const void *)&SIQuarterSpeedModel },
     604             :   { "gfx703", (const void *)&SIQuarterSpeedModel },
     605             :   { "gfx704", (const void *)&SIQuarterSpeedModel },
     606             :   { "gfx801", (const void *)&SIQuarterSpeedModel },
     607             :   { "gfx802", (const void *)&SIQuarterSpeedModel },
     608             :   { "gfx803", (const void *)&SIQuarterSpeedModel },
     609             :   { "gfx810", (const void *)&SIQuarterSpeedModel },
     610             :   { "gfx900", (const void *)&SIQuarterSpeedModel },
     611             :   { "gfx902", (const void *)&SIQuarterSpeedModel },
     612             :   { "hainan", (const void *)&SIQuarterSpeedModel },
     613             :   { "hawaii", (const void *)&SIFullSpeedModel },
     614             :   { "iceland", (const void *)&SIQuarterSpeedModel },
     615             :   { "juniper", (const void *)&R600_VLIW5_ItinModel },
     616             :   { "kabini", (const void *)&SIQuarterSpeedModel },
     617             :   { "kaveri", (const void *)&SIQuarterSpeedModel },
     618             :   { "mullins", (const void *)&SIQuarterSpeedModel },
     619             :   { "oland", (const void *)&SIQuarterSpeedModel },
     620             :   { "pitcairn", (const void *)&SIQuarterSpeedModel },
     621             :   { "polaris10", (const void *)&SIQuarterSpeedModel },
     622             :   { "polaris11", (const void *)&SIQuarterSpeedModel },
     623             :   { "r600", (const void *)&R600_VLIW5_ItinModel },
     624             :   { "r630", (const void *)&R600_VLIW5_ItinModel },
     625             :   { "redwood", (const void *)&R600_VLIW5_ItinModel },
     626             :   { "rs880", (const void *)&R600_VLIW5_ItinModel },
     627             :   { "rv670", (const void *)&R600_VLIW5_ItinModel },
     628             :   { "rv710", (const void *)&R600_VLIW5_ItinModel },
     629             :   { "rv730", (const void *)&R600_VLIW5_ItinModel },
     630             :   { "rv770", (const void *)&R600_VLIW5_ItinModel },
     631             :   { "stoney", (const void *)&SIQuarterSpeedModel },
     632             :   { "sumo", (const void *)&R600_VLIW5_ItinModel },
     633             :   { "tahiti", (const void *)&SIFullSpeedModel },
     634             :   { "tonga", (const void *)&SIQuarterSpeedModel },
     635             :   { "turks", (const void *)&R600_VLIW5_ItinModel },
     636             :   { "verde", (const void *)&SIQuarterSpeedModel },
     637             : };
     638             : 
     639             : #undef DBGFIELD
     640             : 
     641        2714 : static inline MCSubtargetInfo *createAMDGPUMCSubtargetInfoImpl(const Triple &TT, StringRef CPU, StringRef FS) {
     642             :   return new MCSubtargetInfo(TT, CPU, FS, AMDGPUFeatureKV, AMDGPUSubTypeKV, 
     643             :                       AMDGPUProcSchedKV, AMDGPUWriteProcResTable, AMDGPUWriteLatencyTable, AMDGPUReadAdvanceTable, 
     644        5428 :                       AMDGPUStages, AMDGPUOperandCycles, AMDGPUForwardingPaths);
     645             : }
     646             : 
     647             : } // end namespace llvm
     648             : 
     649             : #endif // GET_SUBTARGETINFO_MC_DESC
     650             : 
     651             : 
     652             : #ifdef GET_SUBTARGETINFO_TARGET_DESC
     653             : #undef GET_SUBTARGETINFO_TARGET_DESC
     654             : 
     655             : #include "llvm/Support/Debug.h"
     656             : #include "llvm/Support/raw_ostream.h"
     657             : 
     658             : // ParseSubtargetFeatures - Parses features string setting specified
     659             : // subtarget options.
     660        2326 : void llvm::AMDGPUSubtarget::ParseSubtargetFeatures(StringRef CPU, StringRef FS) {
     661             :   DEBUG(dbgs() << "\nFeatures:" << FS);
     662             :   DEBUG(dbgs() << "\nCPU:" << CPU << "\n\n");
     663        2326 :   InitMCProcessorInfo(CPU, FS);
     664             :   const FeatureBitset& Bits = getFeatureBits();
     665        2326 :   if (Bits[AMDGPU::Feature16BitInsts]) Has16BitInsts = true;
     666        2326 :   if (Bits[AMDGPU::FeatureAddNoCarryInsts]) AddNoCarryInsts = true;
     667        2326 :   if (Bits[AMDGPU::FeatureApertureRegs]) HasApertureRegs = true;
     668        2326 :   if (Bits[AMDGPU::FeatureAutoWaitcntBeforeBarrier]) AutoWaitcntBeforeBarrier = true;
     669        2326 :   if (Bits[AMDGPU::FeatureCFALUBug]) CFALUBug = true;
     670        2326 :   if (Bits[AMDGPU::FeatureCIInsts]) CIInsts = true;
     671        2326 :   if (Bits[AMDGPU::FeatureCaymanISA]) CaymanISA = true;
     672        2326 :   if (Bits[AMDGPU::FeatureCodeObjectV3]) CodeObjectV3 = true;
     673        2326 :   if (Bits[AMDGPU::FeatureDPP]) HasDPP = true;
     674        2326 :   if (Bits[AMDGPU::FeatureDX10Clamp]) DX10Clamp = true;
     675        2326 :   if (Bits[AMDGPU::FeatureDebuggerEmitPrologue]) DebuggerEmitPrologue = true;
     676        2326 :   if (Bits[AMDGPU::FeatureDebuggerInsertNops]) DebuggerInsertNops = true;
     677        2326 :   if (Bits[AMDGPU::FeatureDebuggerReserveRegs]) DebuggerReserveRegs = true;
     678        2326 :   if (Bits[AMDGPU::FeatureDisable]) FeatureDisable = true;
     679        2326 :   if (Bits[AMDGPU::FeatureDumpCode]) DumpCode = true;
     680        2326 :   if (Bits[AMDGPU::FeatureDumpCodeLower]) DumpCode = true;
     681        2326 :   if (Bits[AMDGPU::FeatureEnableHugePrivateBuffer]) EnableHugePrivateBuffer = true;
     682        2326 :   if (Bits[AMDGPU::FeatureEnableLoadStoreOpt]) EnableLoadStoreOpt = true;
     683        2326 :   if (Bits[AMDGPU::FeatureEnableSIScheduler]) EnableSIScheduler = true;
     684        2326 :   if (Bits[AMDGPU::FeatureEnableUnsafeDSOffsetFolding]) EnableUnsafeDSOffsetFolding = true;
     685        2326 :   if (Bits[AMDGPU::FeatureEvergreen] && Gen < AMDGPUSubtarget::EVERGREEN) Gen = AMDGPUSubtarget::EVERGREEN;
     686        2326 :   if (Bits[AMDGPU::FeatureFMA]) FMA = true;
     687        2326 :   if (Bits[AMDGPU::FeatureFP16Denormals]) FP64FP16Denormals = true;
     688        2326 :   if (Bits[AMDGPU::FeatureFP32Denormals]) FP32Denormals = true;
     689        2326 :   if (Bits[AMDGPU::FeatureFP64]) FP64 = true;
     690        2326 :   if (Bits[AMDGPU::FeatureFP64Denormals]) FP64FP16Denormals = true;
     691        2326 :   if (Bits[AMDGPU::FeatureFP64FP16Denormals]) FP64FP16Denormals = true;
     692        2326 :   if (Bits[AMDGPU::FeatureFPExceptions]) FPExceptions = true;
     693        2326 :   if (Bits[AMDGPU::FeatureFastFMAF32]) FastFMAF32 = true;
     694        2326 :   if (Bits[AMDGPU::FeatureFetchLimit8] && TexVTXClauseSize < 8) TexVTXClauseSize = 8;
     695        2326 :   if (Bits[AMDGPU::FeatureFetchLimit16] && TexVTXClauseSize < 16) TexVTXClauseSize = 16;
     696        2326 :   if (Bits[AMDGPU::FeatureFlatAddressSpace]) FlatAddressSpace = true;
     697        2326 :   if (Bits[AMDGPU::FeatureFlatForGlobal]) FlatForGlobal = true;
     698        2326 :   if (Bits[AMDGPU::FeatureFlatGlobalInsts]) FlatGlobalInsts = true;
     699        2326 :   if (Bits[AMDGPU::FeatureFlatInstOffsets]) FlatInstOffsets = true;
     700        2326 :   if (Bits[AMDGPU::FeatureFlatScratchInsts]) FlatScratchInsts = true;
     701        2326 :   if (Bits[AMDGPU::FeatureGCN]) IsGCN = true;
     702        2326 :   if (Bits[AMDGPU::FeatureGCN3Encoding]) GCN3Encoding = true;
     703        2326 :   if (Bits[AMDGPU::FeatureGFX9] && Gen < AMDGPUSubtarget::GFX9) Gen = AMDGPUSubtarget::GFX9;
     704        2326 :   if (Bits[AMDGPU::FeatureGFX9Insts]) GFX9Insts = true;
     705        2326 :   if (Bits[AMDGPU::FeatureISAVersion6_0_0] && IsaVersion < ISAVersion6_0_0) IsaVersion = ISAVersion6_0_0;
     706        2326 :   if (Bits[AMDGPU::FeatureISAVersion6_0_1] && IsaVersion < ISAVersion6_0_1) IsaVersion = ISAVersion6_0_1;
     707        2326 :   if (Bits[AMDGPU::FeatureISAVersion7_0_0] && IsaVersion < ISAVersion7_0_0) IsaVersion = ISAVersion7_0_0;
     708        2326 :   if (Bits[AMDGPU::FeatureISAVersion7_0_1] && IsaVersion < ISAVersion7_0_1) IsaVersion = ISAVersion7_0_1;
     709        2326 :   if (Bits[AMDGPU::FeatureISAVersion7_0_2] && IsaVersion < ISAVersion7_0_2) IsaVersion = ISAVersion7_0_2;
     710        2326 :   if (Bits[AMDGPU::FeatureISAVersion7_0_3] && IsaVersion < ISAVersion7_0_3) IsaVersion = ISAVersion7_0_3;
     711        2326 :   if (Bits[AMDGPU::FeatureISAVersion7_0_4] && IsaVersion < ISAVersion7_0_4) IsaVersion = ISAVersion7_0_4;
     712        2326 :   if (Bits[AMDGPU::FeatureISAVersion8_0_1] && IsaVersion < ISAVersion8_0_1) IsaVersion = ISAVersion8_0_1;
     713        2326 :   if (Bits[AMDGPU::FeatureISAVersion8_0_2] && IsaVersion < ISAVersion8_0_2) IsaVersion = ISAVersion8_0_2;
     714        2326 :   if (Bits[AMDGPU::FeatureISAVersion8_0_3] && IsaVersion < ISAVersion8_0_3) IsaVersion = ISAVersion8_0_3;
     715        2326 :   if (Bits[AMDGPU::FeatureISAVersion8_1_0] && IsaVersion < ISAVersion8_1_0) IsaVersion = ISAVersion8_1_0;
     716        2326 :   if (Bits[AMDGPU::FeatureISAVersion9_0_0] && IsaVersion < ISAVersion9_0_0) IsaVersion = ISAVersion9_0_0;
     717        2326 :   if (Bits[AMDGPU::FeatureISAVersion9_0_2] && IsaVersion < ISAVersion9_0_2) IsaVersion = ISAVersion9_0_2;
     718        2326 :   if (Bits[AMDGPU::FeatureIntClamp]) HasIntClamp = true;
     719        2326 :   if (Bits[AMDGPU::FeatureInv2PiInlineImm]) HasInv2PiInlineImm = true;
     720        2326 :   if (Bits[AMDGPU::FeatureLDSBankCount16] && LDSBankCount < 16) LDSBankCount = 16;
     721        2326 :   if (Bits[AMDGPU::FeatureLDSBankCount32] && LDSBankCount < 32) LDSBankCount = 32;
     722        2326 :   if (Bits[AMDGPU::FeatureLocalMemorySize0] && LocalMemorySize < 0) LocalMemorySize = 0;
     723        2326 :   if (Bits[AMDGPU::FeatureLocalMemorySize32768] && LocalMemorySize < 32768) LocalMemorySize = 32768;
     724        2326 :   if (Bits[AMDGPU::FeatureLocalMemorySize65536] && LocalMemorySize < 65536) LocalMemorySize = 65536;
     725        2326 :   if (Bits[AMDGPU::FeatureMIMG_R128]) MIMG_R128 = true;
     726        2326 :   if (Bits[AMDGPU::FeatureMadMixInsts]) HasMadMixInsts = true;
     727        2326 :   if (Bits[AMDGPU::FeatureMaxPrivateElementSize4] && MaxPrivateElementSize < 4) MaxPrivateElementSize = 4;
     728        2326 :   if (Bits[AMDGPU::FeatureMaxPrivateElementSize8] && MaxPrivateElementSize < 8) MaxPrivateElementSize = 8;
     729        2326 :   if (Bits[AMDGPU::FeatureMaxPrivateElementSize16] && MaxPrivateElementSize < 16) MaxPrivateElementSize = 16;
     730        2326 :   if (Bits[AMDGPU::FeatureMovrel]) HasMovrel = true;
     731        2326 :   if (Bits[AMDGPU::FeatureNorthernIslands] && Gen < AMDGPUSubtarget::NORTHERN_ISLANDS) Gen = AMDGPUSubtarget::NORTHERN_ISLANDS;
     732        2326 :   if (Bits[AMDGPU::FeaturePromoteAlloca]) EnablePromoteAlloca = true;
     733        2326 :   if (Bits[AMDGPU::FeatureR600] && Gen < AMDGPUSubtarget::R600) Gen = AMDGPUSubtarget::R600;
     734        2326 :   if (Bits[AMDGPU::FeatureR600ALUInst]) R600ALUInst = false;
     735        2326 :   if (Bits[AMDGPU::FeatureR700] && Gen < AMDGPUSubtarget::R700) Gen = AMDGPUSubtarget::R700;
     736        2326 :   if (Bits[AMDGPU::FeatureSDWA]) HasSDWA = true;
     737        2326 :   if (Bits[AMDGPU::FeatureSDWAMac]) HasSDWAMac = true;
     738        2326 :   if (Bits[AMDGPU::FeatureSDWAOmod]) HasSDWAOmod = true;
     739        2326 :   if (Bits[AMDGPU::FeatureSDWAOutModsVOPC]) HasSDWAOutModsVOPC = true;
     740        2326 :   if (Bits[AMDGPU::FeatureSDWAScalar]) HasSDWAScalar = true;
     741        2326 :   if (Bits[AMDGPU::FeatureSDWASdst]) HasSDWASdst = true;
     742        2326 :   if (Bits[AMDGPU::FeatureSGPRInitBug]) SGPRInitBug = true;
     743        2326 :   if (Bits[AMDGPU::FeatureSMemRealTime]) HasSMemRealTime = true;
     744        2326 :   if (Bits[AMDGPU::FeatureScalarStores]) HasScalarStores = true;
     745        2326 :   if (Bits[AMDGPU::FeatureSeaIslands] && Gen < AMDGPUSubtarget::SEA_ISLANDS) Gen = AMDGPUSubtarget::SEA_ISLANDS;
     746        2326 :   if (Bits[AMDGPU::FeatureSouthernIslands] && Gen < AMDGPUSubtarget::SOUTHERN_ISLANDS) Gen = AMDGPUSubtarget::SOUTHERN_ISLANDS;
     747        2326 :   if (Bits[AMDGPU::FeatureTrapHandler]) TrapHandler = true;
     748        2326 :   if (Bits[AMDGPU::FeatureUnalignedBufferAccess]) UnalignedBufferAccess = true;
     749        2326 :   if (Bits[AMDGPU::FeatureUnalignedScratchAccess]) UnalignedScratchAccess = true;
     750        2326 :   if (Bits[AMDGPU::FeatureUnpackedD16VMem]) HasUnpackedD16VMem = true;
     751        2326 :   if (Bits[AMDGPU::FeatureVGPRIndexMode]) HasVGPRIndexMode = true;
     752        2326 :   if (Bits[AMDGPU::FeatureVGPRSpilling]) EnableVGPRSpilling = true;
     753        2326 :   if (Bits[AMDGPU::FeatureVOP3P]) HasVOP3PInsts = true;
     754        2326 :   if (Bits[AMDGPU::FeatureVertexCache]) HasVertexCache = true;
     755        2326 :   if (Bits[AMDGPU::FeatureVolcanicIslands] && Gen < AMDGPUSubtarget::VOLCANIC_ISLANDS) Gen = AMDGPUSubtarget::VOLCANIC_ISLANDS;
     756        2326 :   if (Bits[AMDGPU::FeatureWavefrontSize16] && WavefrontSize < 16) WavefrontSize = 16;
     757        2326 :   if (Bits[AMDGPU::FeatureWavefrontSize32] && WavefrontSize < 32) WavefrontSize = 32;
     758        2326 :   if (Bits[AMDGPU::FeatureWavefrontSize64] && WavefrontSize < 64) WavefrontSize = 64;
     759        2326 :   if (Bits[AMDGPU::FeatureXNACK]) EnableXNACK = true;
     760        2326 :   if (Bits[AMDGPU::HalfRate64Ops]) HalfRate64Ops = true;
     761        2326 : }
     762             : #endif // GET_SUBTARGETINFO_TARGET_DESC
     763             : 
     764             : 
     765             : #ifdef GET_SUBTARGETINFO_HEADER
     766             : #undef GET_SUBTARGETINFO_HEADER
     767             : 
     768             : namespace llvm {
     769             : class DFAPacketizer;
     770        2317 : struct AMDGPUGenSubtargetInfo : public TargetSubtargetInfo {
     771             :   explicit AMDGPUGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS);
     772             : public:
     773             :   unsigned resolveSchedClass(unsigned SchedClass,  const MachineInstr *DefMI, const TargetSchedModel *SchedModel) const override;
     774             :   DFAPacketizer *createDFAPacketizer(const InstrItineraryData *IID) const;
     775             : };
     776             : } // end namespace llvm
     777             : 
     778             : #endif // GET_SUBTARGETINFO_HEADER
     779             : 
     780             : 
     781             : #ifdef GET_SUBTARGETINFO_CTOR
     782             : #undef GET_SUBTARGETINFO_CTOR
     783             : 
     784             : #include "llvm/CodeGen/TargetSchedule.h"
     785             : 
     786             : namespace llvm {
     787             : extern const llvm::SubtargetFeatureKV AMDGPUFeatureKV[];
     788             : extern const llvm::SubtargetFeatureKV AMDGPUSubTypeKV[];
     789             : extern const llvm::SubtargetInfoKV AMDGPUProcSchedKV[];
     790             : extern const llvm::MCWriteProcResEntry AMDGPUWriteProcResTable[];
     791             : extern const llvm::MCWriteLatencyEntry AMDGPUWriteLatencyTable[];
     792             : extern const llvm::MCReadAdvanceEntry AMDGPUReadAdvanceTable[];
     793             : extern const llvm::InstrStage AMDGPUStages[];
     794             : extern const unsigned AMDGPUOperandCycles[];
     795             : extern const unsigned AMDGPUForwardingPaths[];
     796        2326 : AMDGPUGenSubtargetInfo::AMDGPUGenSubtargetInfo(const Triple &TT, StringRef CPU, StringRef FS)
     797             :   : TargetSubtargetInfo(TT, CPU, FS, makeArrayRef(AMDGPUFeatureKV, 95), makeArrayRef(AMDGPUSubTypeKV, 47), 
     798             :                         AMDGPUProcSchedKV, AMDGPUWriteProcResTable, AMDGPUWriteLatencyTable, AMDGPUReadAdvanceTable, 
     799        2326 :                         AMDGPUStages, AMDGPUOperandCycles, AMDGPUForwardingPaths) {}
     800             : 
     801      415307 : unsigned AMDGPUGenSubtargetInfo
     802             : ::resolveSchedClass(unsigned SchedClass, const MachineInstr *MI, const TargetSchedModel *SchedModel) const {
     803             : 
     804             :   const SIInstrInfo *TII =
     805      415307 :     static_cast<const SIInstrInfo*>(SchedModel->getInstrInfo());
     806             :   (void)TII;
     807             : 
     808      415307 :   switch (SchedClass) {
     809             :   case 23: // COPY
     810      415307 :     if (SchedModel->getProcessorID() == 2) { // SIQuarterSpeedModel
     811      357923 :       if ((TII->isVGPRCopy(*MI) && TII->getOpSize(*MI, 0) <= 32))
     812             :         return 24; // Write32Bit
     813      140721 :       if ((TII->isVGPRCopy(*MI) && TII->getOpSize(*MI, 0) > 32))
     814             :         return 25; // Write64Bit
     815             :       if ((true))
     816             :         return 26; // WriteSALU
     817             :     }
     818       57384 :     if (SchedModel->getProcessorID() == 4) { // SIFullSpeedModel
     819       57384 :       if ((TII->isVGPRCopy(*MI) && TII->getOpSize(*MI, 0) <= 32))
     820             :         return 24; // Write32Bit
     821       30207 :       if ((TII->isVGPRCopy(*MI) && TII->getOpSize(*MI, 0) > 32))
     822             :         return 25; // Write64Bit
     823             :       if ((true))
     824             :         return 26; // WriteSALU
     825             :     }
     826             :     break;
     827             :   };
     828           0 :   report_fatal_error("Expected a variant SchedClass");
     829             : } // AMDGPUGenSubtargetInfo::resolveSchedClass
     830             : } // end namespace llvm
     831             : 
     832             : #endif // GET_SUBTARGETINFO_CTOR
     833             : 

Generated by: LCOV version 1.13