2016-01-26 12:49:22 +08:00
|
|
|
//===-- AMDGPU.td - AMDGPU Tablegen files --------*- tablegen -*-===//
|
2012-12-12 05:25:42 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
2016-01-26 12:49:22 +08:00
|
|
|
//===------------------------------------------------------------===//
|
2012-12-12 05:25:42 +08:00
|
|
|
|
2018-06-21 21:36:44 +08:00
|
|
|
include "llvm/TableGen/SearchableTable.td"
|
2014-06-14 00:38:59 +08:00
|
|
|
include "llvm/Target/Target.td"
|
AMDGPU: Separate R600 and GCN TableGen files
Summary:
We now have two sets of generated TableGen files, one for R600 and one
for GCN, so each sub-target now has its own tables of instructions,
registers, ISel patterns, etc. This should help reduce compile time
since each sub-target now only has to consider information that
is specific to itself. This will also help prevent the R600
sub-target from slowing down new features for GCN, like disassembler
support, GlobalISel, etc.
Reviewers: arsenm, nhaehnle, jvesely
Reviewed By: arsenm
Subscribers: MatzeB, kzhuravl, wdng, mgorny, yaxunl, dstuttard, tpr, t-tye, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D46365
llvm-svn: 335942
2018-06-29 07:47:12 +08:00
|
|
|
include "AMDGPUFeatures.td"
|
2012-12-12 05:25:42 +08:00
|
|
|
|
2018-11-30 22:21:56 +08:00
|
|
|
class BoolToList<bit Value> {
|
|
|
|
list<int> ret = !if(Value, [1]<int>, []<int>);
|
|
|
|
}
|
|
|
|
|
2016-01-26 12:49:22 +08:00
|
|
|
//===------------------------------------------------------------===//
|
|
|
|
// Subtarget Features (device properties)
|
|
|
|
//===------------------------------------------------------------===//
|
2013-11-19 03:43:33 +08:00
|
|
|
|
2015-01-30 03:34:25 +08:00
|
|
|
def FeatureFastFMAF32 : SubtargetFeature<"fast-fmaf",
|
2016-01-26 12:49:22 +08:00
|
|
|
"FastFMAF32",
|
|
|
|
"true",
|
|
|
|
"Assuming f32 fma is at least as fast as mul + add"
|
|
|
|
>;
|
2015-01-30 03:34:25 +08:00
|
|
|
|
2018-02-05 20:45:43 +08:00
|
|
|
def FeatureMIMG_R128 : SubtargetFeature<"mimg-r128",
|
|
|
|
"MIMG_R128",
|
|
|
|
"true",
|
|
|
|
"Support 128-bit texture resources"
|
|
|
|
>;
|
|
|
|
|
2016-01-19 05:13:50 +08:00
|
|
|
def HalfRate64Ops : SubtargetFeature<"half-rate-64-ops",
|
2016-01-26 12:49:22 +08:00
|
|
|
"HalfRate64Ops",
|
|
|
|
"true",
|
|
|
|
"Most fp64 instructions are half rate instead of quarter"
|
|
|
|
>;
|
2014-07-15 07:40:49 +08:00
|
|
|
|
2014-09-15 23:41:53 +08:00
|
|
|
def FeatureFlatAddressSpace : SubtargetFeature<"flat-address-space",
|
2016-01-26 12:49:22 +08:00
|
|
|
"FlatAddressSpace",
|
|
|
|
"true",
|
|
|
|
"Support flat address space"
|
|
|
|
>;
|
2014-09-15 23:41:53 +08:00
|
|
|
|
2017-05-11 05:19:05 +08:00
|
|
|
def FeatureFlatInstOffsets : SubtargetFeature<"flat-inst-offsets",
|
|
|
|
"FlatInstOffsets",
|
|
|
|
"true",
|
|
|
|
"Flat instructions have immediate offset addressing mode"
|
|
|
|
>;
|
|
|
|
|
|
|
|
def FeatureFlatGlobalInsts : SubtargetFeature<"flat-global-insts",
|
|
|
|
"FlatGlobalInsts",
|
|
|
|
"true",
|
|
|
|
"Have global_* flat memory instructions"
|
|
|
|
>;
|
|
|
|
|
|
|
|
def FeatureFlatScratchInsts : SubtargetFeature<"flat-scratch-insts",
|
|
|
|
"FlatScratchInsts",
|
|
|
|
"true",
|
|
|
|
"Have scratch_* flat memory instructions"
|
|
|
|
>;
|
|
|
|
|
2017-07-21 01:42:47 +08:00
|
|
|
def FeatureAddNoCarryInsts : SubtargetFeature<"add-no-carry-insts",
|
|
|
|
"AddNoCarryInsts",
|
|
|
|
"true",
|
|
|
|
"Have VALU add/sub instructions without carry out"
|
|
|
|
>;
|
|
|
|
|
2016-07-02 07:03:44 +08:00
|
|
|
def FeatureUnalignedBufferAccess : SubtargetFeature<"unaligned-buffer-access",
|
|
|
|
"UnalignedBufferAccess",
|
|
|
|
"true",
|
|
|
|
"Support unaligned global loads and stores"
|
|
|
|
>;
|
|
|
|
|
2017-02-10 10:15:29 +08:00
|
|
|
def FeatureTrapHandler: SubtargetFeature<"trap-handler",
|
|
|
|
"TrapHandler",
|
|
|
|
"true",
|
|
|
|
"Trap handler support"
|
|
|
|
>;
|
|
|
|
|
2016-10-15 02:10:39 +08:00
|
|
|
def FeatureUnalignedScratchAccess : SubtargetFeature<"unaligned-scratch-access",
|
|
|
|
"UnalignedScratchAccess",
|
|
|
|
"true",
|
|
|
|
"Support unaligned scratch loads and stores"
|
|
|
|
>;
|
|
|
|
|
2017-02-19 02:29:53 +08:00
|
|
|
def FeatureApertureRegs : SubtargetFeature<"aperture-regs",
|
|
|
|
"HasApertureRegs",
|
|
|
|
"true",
|
|
|
|
"Has Memory Aperture Base and Size Registers"
|
|
|
|
>;
|
|
|
|
|
2017-10-25 15:00:51 +08:00
|
|
|
def FeatureMadMixInsts : SubtargetFeature<"mad-mix-insts",
|
|
|
|
"HasMadMixInsts",
|
|
|
|
"true",
|
|
|
|
"Has v_mad_mix_f32, v_mad_mixlo_f16, v_mad_mixhi_f16 instructions"
|
|
|
|
>;
|
|
|
|
|
2018-05-01 03:08:16 +08:00
|
|
|
def FeatureFmaMixInsts : SubtargetFeature<"fma-mix-insts",
|
|
|
|
"HasFmaMixInsts",
|
|
|
|
"true",
|
|
|
|
"Has v_fma_mix_f32, v_fma_mixlo_f16, v_fma_mixhi_f16 instructions"
|
|
|
|
>;
|
|
|
|
|
2016-12-10 03:49:54 +08:00
|
|
|
// XNACK is disabled if SH_MEM_CONFIG.ADDRESS_MODE = GPUVM on chips that support
|
|
|
|
// XNACK. The current default kernel driver setting is:
|
|
|
|
// - graphics ring: XNACK disabled
|
|
|
|
// - compute ring: XNACK enabled
|
|
|
|
//
|
|
|
|
// If XNACK is enabled, the VMEM latency can be worse.
|
|
|
|
// If XNACK is disabled, the 2 SGPRs can be used for general purposes.
|
2016-01-05 07:35:53 +08:00
|
|
|
def FeatureXNACK : SubtargetFeature<"xnack",
|
2016-01-26 12:49:22 +08:00
|
|
|
"EnableXNACK",
|
|
|
|
"true",
|
|
|
|
"Enable XNACK support"
|
|
|
|
>;
|
2015-01-21 03:33:04 +08:00
|
|
|
|
2015-03-09 23:48:09 +08:00
|
|
|
def FeatureSGPRInitBug : SubtargetFeature<"sgpr-init-bug",
|
2016-01-26 12:49:22 +08:00
|
|
|
"SGPRInitBug",
|
|
|
|
"true",
|
2017-08-07 02:13:23 +08:00
|
|
|
"VI SGPR initialization bug requiring a fixed SGPR allocation size"
|
2016-01-26 12:49:22 +08:00
|
|
|
>;
|
2016-01-21 12:28:34 +08:00
|
|
|
|
2015-05-26 00:15:54 +08:00
|
|
|
class SubtargetFeatureLDSBankCount <int Value> : SubtargetFeature <
|
2016-01-26 12:49:22 +08:00
|
|
|
"ldsbankcount"#Value,
|
|
|
|
"LDSBankCount",
|
|
|
|
!cast<string>(Value),
|
|
|
|
"The number of LDS banks per compute unit."
|
|
|
|
>;
|
2015-05-26 00:15:54 +08:00
|
|
|
|
|
|
|
def FeatureLDSBankCount16 : SubtargetFeatureLDSBankCount<16>;
|
|
|
|
def FeatureLDSBankCount32 : SubtargetFeatureLDSBankCount<32>;
|
|
|
|
|
2015-04-08 09:09:26 +08:00
|
|
|
def FeatureGCN3Encoding : SubtargetFeature<"gcn3-encoding",
|
2016-01-26 12:49:22 +08:00
|
|
|
"GCN3Encoding",
|
|
|
|
"true",
|
|
|
|
"Encoding format for VI"
|
|
|
|
>;
|
2015-04-24 03:33:54 +08:00
|
|
|
|
|
|
|
def FeatureCIInsts : SubtargetFeature<"ci-insts",
|
2016-01-26 12:49:22 +08:00
|
|
|
"CIInsts",
|
|
|
|
"true",
|
2017-10-03 04:31:18 +08:00
|
|
|
"Additional instructions for CI+"
|
2016-01-26 12:49:22 +08:00
|
|
|
>;
|
|
|
|
|
2018-08-07 15:28:46 +08:00
|
|
|
def FeatureVIInsts : SubtargetFeature<"vi-insts",
|
|
|
|
"VIInsts",
|
|
|
|
"true",
|
|
|
|
"Additional instructions for VI+"
|
|
|
|
>;
|
|
|
|
|
2017-02-19 03:12:26 +08:00
|
|
|
def FeatureGFX9Insts : SubtargetFeature<"gfx9-insts",
|
|
|
|
"GFX9Insts",
|
|
|
|
"true",
|
2017-10-03 04:31:18 +08:00
|
|
|
"Additional instructions for GFX9+"
|
2017-02-19 03:12:26 +08:00
|
|
|
>;
|
|
|
|
|
2016-02-27 16:53:55 +08:00
|
|
|
def FeatureSMemRealTime : SubtargetFeature<"s-memrealtime",
|
|
|
|
"HasSMemRealTime",
|
2016-02-27 16:53:46 +08:00
|
|
|
"true",
|
2016-02-27 16:53:55 +08:00
|
|
|
"Has s_memrealtime instruction"
|
|
|
|
>;
|
|
|
|
|
2016-10-29 12:05:06 +08:00
|
|
|
def FeatureInv2PiInlineImm : SubtargetFeature<"inv-2pi-inline-imm",
|
|
|
|
"HasInv2PiInlineImm",
|
|
|
|
"true",
|
|
|
|
"Has 1 / (2 * pi) as inline immediate"
|
|
|
|
>;
|
|
|
|
|
2016-02-27 16:53:55 +08:00
|
|
|
def Feature16BitInsts : SubtargetFeature<"16-bit-insts",
|
|
|
|
"Has16BitInsts",
|
|
|
|
"true",
|
|
|
|
"Has i16/f16 instructions"
|
2016-02-27 16:53:46 +08:00
|
|
|
>;
|
|
|
|
|
2017-02-28 02:49:11 +08:00
|
|
|
def FeatureVOP3P : SubtargetFeature<"vop3p",
|
|
|
|
"HasVOP3PInsts",
|
|
|
|
"true",
|
|
|
|
"Has VOP3P packed instructions"
|
|
|
|
>;
|
|
|
|
|
2016-10-13 02:00:51 +08:00
|
|
|
def FeatureMovrel : SubtargetFeature<"movrel",
|
|
|
|
"HasMovrel",
|
|
|
|
"true",
|
|
|
|
"Has v_movrel*_b32 instructions"
|
|
|
|
>;
|
|
|
|
|
|
|
|
def FeatureVGPRIndexMode : SubtargetFeature<"vgpr-index-mode",
|
|
|
|
"HasVGPRIndexMode",
|
|
|
|
"true",
|
|
|
|
"Has VGPR mode register indexing"
|
|
|
|
>;
|
|
|
|
|
2016-10-29 05:55:15 +08:00
|
|
|
def FeatureScalarStores : SubtargetFeature<"scalar-stores",
|
|
|
|
"HasScalarStores",
|
|
|
|
"true",
|
|
|
|
"Has store scalar memory instructions"
|
|
|
|
>;
|
|
|
|
|
2018-04-03 00:10:25 +08:00
|
|
|
def FeatureScalarAtomics : SubtargetFeature<"scalar-atomics",
|
|
|
|
"HasScalarAtomics",
|
|
|
|
"true",
|
|
|
|
"Has atomic scalar memory instructions"
|
|
|
|
>;
|
|
|
|
|
2017-01-20 18:01:25 +08:00
|
|
|
def FeatureSDWA : SubtargetFeature<"sdwa",
|
|
|
|
"HasSDWA",
|
|
|
|
"true",
|
|
|
|
"Support SDWA (Sub-DWORD Addressing) extension"
|
|
|
|
>;
|
|
|
|
|
2017-06-22 14:26:41 +08:00
|
|
|
def FeatureSDWAOmod : SubtargetFeature<"sdwa-omod",
|
|
|
|
"HasSDWAOmod",
|
|
|
|
"true",
|
|
|
|
"Support OMod with SDWA (Sub-DWORD Addressing) extension"
|
|
|
|
>;
|
|
|
|
|
|
|
|
def FeatureSDWAScalar : SubtargetFeature<"sdwa-scalar",
|
|
|
|
"HasSDWAScalar",
|
|
|
|
"true",
|
|
|
|
"Support scalar register with SDWA (Sub-DWORD Addressing) extension"
|
|
|
|
>;
|
|
|
|
|
|
|
|
def FeatureSDWASdst : SubtargetFeature<"sdwa-sdst",
|
|
|
|
"HasSDWASdst",
|
|
|
|
"true",
|
|
|
|
"Support scalar dst for VOPC with SDWA (Sub-DWORD Addressing) extension"
|
|
|
|
>;
|
|
|
|
|
|
|
|
def FeatureSDWAMac : SubtargetFeature<"sdwa-mav",
|
|
|
|
"HasSDWAMac",
|
|
|
|
"true",
|
|
|
|
"Support v_mac_f32/f16 with SDWA (Sub-DWORD Addressing) extension"
|
|
|
|
>;
|
|
|
|
|
[AMDGPU] SDWA: several fixes for V_CVT and VOPC instructions
Summary:
1. Instruction V_CVT_U32_F32 allow omod operand (see SIInstrInfo.td:1435). In fact this operand shouldn't be allowed here. This fix checks if SDWA pseudo instruction has OMod operand and then copy it.
2. There were several problems with support of VOPC instructions in SDWA peephole pass.
Reviewers: tstellar, arsenm, vpykhtin, airlied, kzhuravl
Subscribers: wdng, nhaehnle, yaxunl, dstuttard, tpr, sarnex, t-tye
Differential Revision: https://reviews.llvm.org/D34626
llvm-svn: 306413
2017-06-27 23:02:23 +08:00
|
|
|
def FeatureSDWAOutModsVOPC : SubtargetFeature<"sdwa-out-mods-vopc",
|
|
|
|
"HasSDWAOutModsVOPC",
|
2017-06-22 14:26:41 +08:00
|
|
|
"true",
|
|
|
|
"Support clamp for VOPC with SDWA (Sub-DWORD Addressing) extension"
|
|
|
|
>;
|
|
|
|
|
2017-01-20 18:01:25 +08:00
|
|
|
def FeatureDPP : SubtargetFeature<"dpp",
|
|
|
|
"HasDPP",
|
|
|
|
"true",
|
|
|
|
"Support DPP (Data Parallel Primitives) extension"
|
|
|
|
>;
|
|
|
|
|
2018-08-28 23:07:30 +08:00
|
|
|
def FeatureR128A16 : SubtargetFeature<"r128-a16",
|
|
|
|
"HasR128A16",
|
|
|
|
"true",
|
|
|
|
"Support 16 bit coordindates/gradients/lod/clamp/mip types on gfx9"
|
|
|
|
>;
|
|
|
|
|
2017-08-16 21:51:56 +08:00
|
|
|
def FeatureIntClamp : SubtargetFeature<"int-clamp-insts",
|
|
|
|
"HasIntClamp",
|
|
|
|
"true",
|
|
|
|
"Support clamp for integer destination"
|
|
|
|
>;
|
|
|
|
|
2018-01-13 05:12:19 +08:00
|
|
|
def FeatureUnpackedD16VMem : SubtargetFeature<"unpacked-d16-vmem",
|
|
|
|
"HasUnpackedD16VMem",
|
|
|
|
"true",
|
|
|
|
"Has unpacked d16 vmem instructions"
|
|
|
|
>;
|
|
|
|
|
2018-05-01 03:08:16 +08:00
|
|
|
def FeatureDLInsts : SubtargetFeature<"dl-insts",
|
|
|
|
"HasDLInsts",
|
|
|
|
"true",
|
|
|
|
"Has deep learning instructions"
|
|
|
|
>;
|
|
|
|
|
2018-11-06 06:44:19 +08:00
|
|
|
def FeatureSRAMECC : SubtargetFeature<"sram-ecc",
|
|
|
|
"EnableSRAMECC",
|
2018-05-05 04:06:57 +08:00
|
|
|
"true",
|
2018-11-06 06:44:19 +08:00
|
|
|
"Enable SRAM ECC"
|
2018-05-05 04:06:57 +08:00
|
|
|
>;
|
|
|
|
|
2016-01-26 12:49:22 +08:00
|
|
|
//===------------------------------------------------------------===//
|
|
|
|
// Subtarget Features (options and debugging)
|
|
|
|
//===------------------------------------------------------------===//
|
|
|
|
|
2017-01-24 06:31:03 +08:00
|
|
|
// Denormal handling for fp64 and fp16 is controlled by the same
|
|
|
|
// config register when fp16 supported.
|
|
|
|
// TODO: Do we need a separate f16 setting when not legal?
|
|
|
|
def FeatureFP64FP16Denormals : SubtargetFeature<"fp64-fp16-denormals",
|
|
|
|
"FP64FP16Denormals",
|
2016-01-26 12:49:22 +08:00
|
|
|
"true",
|
2017-01-24 06:31:03 +08:00
|
|
|
"Enable double and half precision denormal handling",
|
2016-01-26 12:49:22 +08:00
|
|
|
[FeatureFP64]
|
|
|
|
>;
|
|
|
|
|
2017-01-24 06:31:03 +08:00
|
|
|
def FeatureFP64Denormals : SubtargetFeature<"fp64-denormals",
|
|
|
|
"FP64FP16Denormals",
|
|
|
|
"true",
|
|
|
|
"Enable double and half precision denormal handling",
|
|
|
|
[FeatureFP64, FeatureFP64FP16Denormals]
|
|
|
|
>;
|
|
|
|
|
|
|
|
def FeatureFP16Denormals : SubtargetFeature<"fp16-denormals",
|
|
|
|
"FP64FP16Denormals",
|
|
|
|
"true",
|
|
|
|
"Enable half precision denormal handling",
|
|
|
|
[FeatureFP64FP16Denormals]
|
|
|
|
>;
|
|
|
|
|
2016-01-29 04:53:42 +08:00
|
|
|
def FeatureFPExceptions : SubtargetFeature<"fp-exceptions",
|
|
|
|
"FPExceptions",
|
|
|
|
"true",
|
|
|
|
"Enable floating point exceptions"
|
|
|
|
>;
|
|
|
|
|
2016-02-12 10:40:47 +08:00
|
|
|
class FeatureMaxPrivateElementSize<int size> : SubtargetFeature<
|
|
|
|
"max-private-element-size-"#size,
|
|
|
|
"MaxPrivateElementSize",
|
|
|
|
!cast<string>(size),
|
|
|
|
"Maximum private access size may be "#size
|
|
|
|
>;
|
|
|
|
|
|
|
|
def FeatureMaxPrivateElementSize4 : FeatureMaxPrivateElementSize<4>;
|
|
|
|
def FeatureMaxPrivateElementSize8 : FeatureMaxPrivateElementSize<8>;
|
|
|
|
def FeatureMaxPrivateElementSize16 : FeatureMaxPrivateElementSize<16>;
|
|
|
|
|
2017-11-15 08:45:43 +08:00
|
|
|
def FeatureEnableHugePrivateBuffer : SubtargetFeature<
|
|
|
|
"huge-private-buffer",
|
|
|
|
"EnableHugePrivateBuffer",
|
|
|
|
"true",
|
|
|
|
"Enable private/scratch buffer sizes greater than 128 GB"
|
|
|
|
>;
|
|
|
|
|
2016-01-26 12:49:22 +08:00
|
|
|
def FeatureDumpCode : SubtargetFeature <"DumpCode",
|
|
|
|
"DumpCode",
|
|
|
|
"true",
|
|
|
|
"Dump MachineInstrs in the CodeEmitter"
|
|
|
|
>;
|
|
|
|
|
|
|
|
def FeatureDumpCodeLower : SubtargetFeature <"dumpcode",
|
|
|
|
"DumpCode",
|
|
|
|
"true",
|
|
|
|
"Dump MachineInstrs in the CodeEmitter"
|
|
|
|
>;
|
|
|
|
|
|
|
|
// XXX - This should probably be removed once enabled by default
|
|
|
|
def FeatureEnableLoadStoreOpt : SubtargetFeature <"load-store-opt",
|
|
|
|
"EnableLoadStoreOpt",
|
|
|
|
"true",
|
|
|
|
"Enable SI load/store optimizer pass"
|
|
|
|
>;
|
|
|
|
|
|
|
|
// Performance debugging feature. Allow using DS instruction immediate
|
|
|
|
// offsets even if the base pointer can't be proven to be base. On SI,
|
|
|
|
// base pointer values that won't give the same result as a 16-bit add
|
|
|
|
// are not safe to fold, but this will override the conservative test
|
|
|
|
// for the base pointer.
|
|
|
|
def FeatureEnableUnsafeDSOffsetFolding : SubtargetFeature <
|
|
|
|
"unsafe-ds-offset-folding",
|
|
|
|
"EnableUnsafeDSOffsetFolding",
|
|
|
|
"true",
|
|
|
|
"Force using DS instruction immediate offsets on SI"
|
|
|
|
>;
|
|
|
|
|
|
|
|
def FeatureEnableSIScheduler : SubtargetFeature<"si-scheduler",
|
|
|
|
"EnableSIScheduler",
|
|
|
|
"true",
|
|
|
|
"Enable SI Machine Scheduler"
|
|
|
|
>;
|
|
|
|
|
2018-04-11 06:48:23 +08:00
|
|
|
def FeatureEnableDS128 : SubtargetFeature<"enable-ds128",
|
|
|
|
"EnableDS128",
|
|
|
|
"true",
|
|
|
|
"Use ds_{read|write}_b128"
|
|
|
|
>;
|
|
|
|
|
2017-01-25 06:02:15 +08:00
|
|
|
// Unless +-flat-for-global is specified, turn on FlatForGlobal for
|
|
|
|
// all OS-es on VI and newer hardware to avoid assertion failures due
|
|
|
|
// to missing ADDR64 variants of MUBUF instructions.
|
|
|
|
// FIXME: moveToVALU should be able to handle converting addr64 MUBUF
|
|
|
|
// instructions.
|
|
|
|
|
2016-01-26 12:49:22 +08:00
|
|
|
def FeatureFlatForGlobal : SubtargetFeature<"flat-for-global",
|
|
|
|
"FlatForGlobal",
|
|
|
|
"true",
|
2017-01-28 01:42:26 +08:00
|
|
|
"Force to generate flat instruction for global"
|
2016-01-26 12:49:22 +08:00
|
|
|
>;
|
2015-04-24 03:33:54 +08:00
|
|
|
|
2017-06-03 01:40:26 +08:00
|
|
|
def FeatureAutoWaitcntBeforeBarrier : SubtargetFeature <
|
|
|
|
"auto-waitcnt-before-barrier",
|
|
|
|
"AutoWaitcntBeforeBarrier",
|
|
|
|
"true",
|
|
|
|
"Hardware automatically inserts waitcnt before barrier"
|
|
|
|
>;
|
|
|
|
|
2017-10-14 23:59:07 +08:00
|
|
|
def FeatureCodeObjectV3 : SubtargetFeature <
|
|
|
|
"code-object-v3",
|
|
|
|
"CodeObjectV3",
|
|
|
|
"true",
|
|
|
|
"Generate code object version 3"
|
|
|
|
>;
|
|
|
|
|
2018-09-14 18:27:19 +08:00
|
|
|
def FeatureTrigReducedRange : SubtargetFeature<"trig-reduced-range",
|
|
|
|
"HasTrigReducedRange",
|
|
|
|
"true",
|
|
|
|
"Requires use of fract on arguments to trig instructions"
|
|
|
|
>;
|
|
|
|
|
2015-04-24 03:33:54 +08:00
|
|
|
// Dummy feature used to disable assembler instructions.
|
|
|
|
def FeatureDisable : SubtargetFeature<"",
|
2016-01-26 12:49:22 +08:00
|
|
|
"FeatureDisable","true",
|
|
|
|
"Dummy feature to disable assembler instructions"
|
|
|
|
>;
|
2015-04-24 03:33:54 +08:00
|
|
|
|
AMDGPU: Separate R600 and GCN TableGen files
Summary:
We now have two sets of generated TableGen files, one for R600 and one
for GCN, so each sub-target now has its own tables of instructions,
registers, ISel patterns, etc. This should help reduce compile time
since each sub-target now only has to consider information that
is specific to itself. This will also help prevent the R600
sub-target from slowing down new features for GCN, like disassembler
support, GlobalISel, etc.
Reviewers: arsenm, nhaehnle, jvesely
Reviewed By: arsenm
Subscribers: MatzeB, kzhuravl, wdng, mgorny, yaxunl, dstuttard, tpr, t-tye, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D46365
llvm-svn: 335942
2018-06-29 07:47:12 +08:00
|
|
|
def FeatureGCN : SubtargetFeature<"gcn",
|
|
|
|
"IsGCN",
|
|
|
|
"true",
|
|
|
|
"GCN or newer GPU"
|
2016-01-26 12:49:22 +08:00
|
|
|
>;
|
2013-06-08 04:37:48 +08:00
|
|
|
|
2018-07-12 04:59:01 +08:00
|
|
|
class GCNSubtargetFeatureGeneration <string Value,
|
AMDGPU: Separate R600 and GCN TableGen files
Summary:
We now have two sets of generated TableGen files, one for R600 and one
for GCN, so each sub-target now has its own tables of instructions,
registers, ISel patterns, etc. This should help reduce compile time
since each sub-target now only has to consider information that
is specific to itself. This will also help prevent the R600
sub-target from slowing down new features for GCN, like disassembler
support, GlobalISel, etc.
Reviewers: arsenm, nhaehnle, jvesely
Reviewed By: arsenm
Subscribers: MatzeB, kzhuravl, wdng, mgorny, yaxunl, dstuttard, tpr, t-tye, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D46365
llvm-svn: 335942
2018-06-29 07:47:12 +08:00
|
|
|
list<SubtargetFeature> Implies> :
|
2018-07-12 04:59:01 +08:00
|
|
|
SubtargetFeatureGeneration <Value, "GCNSubtarget", Implies>;
|
2013-06-08 04:37:48 +08:00
|
|
|
|
2018-07-12 04:59:01 +08:00
|
|
|
def FeatureSouthernIslands : GCNSubtargetFeatureGeneration<"SOUTHERN_ISLANDS",
|
2018-02-05 20:45:43 +08:00
|
|
|
[FeatureFP64, FeatureLocalMemorySize32768, FeatureMIMG_R128,
|
2017-08-07 22:58:04 +08:00
|
|
|
FeatureWavefrontSize64, FeatureGCN,
|
2018-09-14 18:27:19 +08:00
|
|
|
FeatureLDSBankCount32, FeatureMovrel, FeatureTrigReducedRange]
|
2016-01-26 12:49:22 +08:00
|
|
|
>;
|
2013-06-08 04:37:48 +08:00
|
|
|
|
2018-07-12 04:59:01 +08:00
|
|
|
def FeatureSeaIslands : GCNSubtargetFeatureGeneration<"SEA_ISLANDS",
|
2018-02-05 20:45:43 +08:00
|
|
|
[FeatureFP64, FeatureLocalMemorySize65536, FeatureMIMG_R128,
|
2016-01-26 12:49:22 +08:00
|
|
|
FeatureWavefrontSize64, FeatureGCN, FeatureFlatAddressSpace,
|
2018-09-14 18:27:19 +08:00
|
|
|
FeatureCIInsts, FeatureMovrel, FeatureTrigReducedRange]
|
2016-01-26 12:49:22 +08:00
|
|
|
>;
|
2014-12-07 20:18:57 +08:00
|
|
|
|
2018-07-12 04:59:01 +08:00
|
|
|
def FeatureVolcanicIslands : GCNSubtargetFeatureGeneration<"VOLCANIC_ISLANDS",
|
2018-02-05 20:45:43 +08:00
|
|
|
[FeatureFP64, FeatureLocalMemorySize65536, FeatureMIMG_R128,
|
2016-01-26 12:49:22 +08:00
|
|
|
FeatureWavefrontSize64, FeatureFlatAddressSpace, FeatureGCN,
|
2018-08-07 15:28:46 +08:00
|
|
|
FeatureGCN3Encoding, FeatureCIInsts, FeatureVIInsts, Feature16BitInsts,
|
2016-10-29 05:55:15 +08:00
|
|
|
FeatureSMemRealTime, FeatureVGPRIndexMode, FeatureMovrel,
|
2017-06-22 14:26:41 +08:00
|
|
|
FeatureScalarStores, FeatureInv2PiInlineImm,
|
2017-08-16 21:51:56 +08:00
|
|
|
FeatureSDWA, FeatureSDWAOutModsVOPC, FeatureSDWAMac, FeatureDPP,
|
2018-09-14 18:27:19 +08:00
|
|
|
FeatureIntClamp, FeatureTrigReducedRange
|
2016-02-27 16:53:55 +08:00
|
|
|
]
|
2016-01-26 12:49:22 +08:00
|
|
|
>;
|
2014-12-07 20:18:57 +08:00
|
|
|
|
2018-07-12 04:59:01 +08:00
|
|
|
def FeatureGFX9 : GCNSubtargetFeatureGeneration<"GFX9",
|
2017-02-19 02:29:53 +08:00
|
|
|
[FeatureFP64, FeatureLocalMemorySize65536,
|
|
|
|
FeatureWavefrontSize64, FeatureFlatAddressSpace, FeatureGCN,
|
2018-08-07 15:28:46 +08:00
|
|
|
FeatureGCN3Encoding, FeatureCIInsts, FeatureVIInsts, Feature16BitInsts,
|
2017-02-19 02:29:53 +08:00
|
|
|
FeatureSMemRealTime, FeatureScalarStores, FeatureInv2PiInlineImm,
|
2017-04-22 03:57:53 +08:00
|
|
|
FeatureApertureRegs, FeatureGFX9Insts, FeatureVOP3P, FeatureVGPRIndexMode,
|
2017-08-16 21:51:56 +08:00
|
|
|
FeatureFastFMAF32, FeatureDPP, FeatureIntClamp,
|
2017-06-22 14:26:41 +08:00
|
|
|
FeatureSDWA, FeatureSDWAOmod, FeatureSDWAScalar, FeatureSDWASdst,
|
2017-07-21 01:42:47 +08:00
|
|
|
FeatureFlatInstOffsets, FeatureFlatGlobalInsts, FeatureFlatScratchInsts,
|
2018-08-28 23:07:30 +08:00
|
|
|
FeatureAddNoCarryInsts, FeatureScalarAtomics, FeatureR128A16
|
2017-02-19 02:29:53 +08:00
|
|
|
]
|
|
|
|
>;
|
|
|
|
|
2016-10-27 00:37:56 +08:00
|
|
|
class SubtargetFeatureISAVersion <int Major, int Minor, int Stepping,
|
|
|
|
list<SubtargetFeature> Implies>
|
|
|
|
: SubtargetFeature <
|
|
|
|
"isaver"#Major#"."#Minor#"."#Stepping,
|
|
|
|
"IsaVersion",
|
|
|
|
"ISAVersion"#Major#"_"#Minor#"_"#Stepping,
|
|
|
|
"Instruction set version number",
|
|
|
|
Implies
|
|
|
|
>;
|
|
|
|
|
2017-06-10 11:53:19 +08:00
|
|
|
def FeatureISAVersion6_0_0 : SubtargetFeatureISAVersion <6,0,0,
|
|
|
|
[FeatureSouthernIslands,
|
2017-06-26 11:01:36 +08:00
|
|
|
FeatureFastFMAF32,
|
2017-06-10 11:53:19 +08:00
|
|
|
HalfRate64Ops,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureLDSBankCount32,
|
|
|
|
FeatureCodeObjectV3]>;
|
2017-06-10 11:53:19 +08:00
|
|
|
|
|
|
|
def FeatureISAVersion6_0_1 : SubtargetFeatureISAVersion <6,0,1,
|
|
|
|
[FeatureSouthernIslands,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureLDSBankCount32,
|
|
|
|
FeatureCodeObjectV3]>;
|
2017-06-26 11:01:36 +08:00
|
|
|
|
2016-11-01 08:55:14 +08:00
|
|
|
def FeatureISAVersion7_0_0 : SubtargetFeatureISAVersion <7,0,0,
|
2016-10-27 00:37:56 +08:00
|
|
|
[FeatureSeaIslands,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureLDSBankCount32,
|
|
|
|
FeatureCodeObjectV3]>;
|
2016-11-01 08:55:14 +08:00
|
|
|
|
2016-10-27 00:37:56 +08:00
|
|
|
def FeatureISAVersion7_0_1 : SubtargetFeatureISAVersion <7,0,1,
|
|
|
|
[FeatureSeaIslands,
|
|
|
|
HalfRate64Ops,
|
|
|
|
FeatureLDSBankCount32,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureFastFMAF32,
|
|
|
|
FeatureCodeObjectV3]>;
|
2016-11-01 08:55:14 +08:00
|
|
|
|
2016-10-27 00:37:56 +08:00
|
|
|
def FeatureISAVersion7_0_2 : SubtargetFeatureISAVersion <7,0,2,
|
|
|
|
[FeatureSeaIslands,
|
2018-02-28 05:46:15 +08:00
|
|
|
FeatureLDSBankCount16,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureFastFMAF32,
|
|
|
|
FeatureCodeObjectV3]>;
|
2016-11-01 08:55:14 +08:00
|
|
|
|
2017-06-10 11:53:19 +08:00
|
|
|
def FeatureISAVersion7_0_3 : SubtargetFeatureISAVersion <7,0,3,
|
|
|
|
[FeatureSeaIslands,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureLDSBankCount16,
|
|
|
|
FeatureCodeObjectV3]>;
|
2017-06-10 11:53:19 +08:00
|
|
|
|
2017-12-09 04:52:28 +08:00
|
|
|
def FeatureISAVersion7_0_4 : SubtargetFeatureISAVersion <7,0,4,
|
|
|
|
[FeatureSeaIslands,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureLDSBankCount32,
|
|
|
|
FeatureCodeObjectV3]>;
|
2017-12-09 04:52:28 +08:00
|
|
|
|
2016-10-27 00:37:56 +08:00
|
|
|
def FeatureISAVersion8_0_1 : SubtargetFeatureISAVersion <8,0,1,
|
|
|
|
[FeatureVolcanicIslands,
|
2017-08-25 04:03:07 +08:00
|
|
|
FeatureFastFMAF32,
|
|
|
|
HalfRate64Ops,
|
2016-10-27 00:37:56 +08:00
|
|
|
FeatureLDSBankCount32,
|
2018-01-13 05:12:19 +08:00
|
|
|
FeatureXNACK,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureUnpackedD16VMem,
|
|
|
|
FeatureCodeObjectV3]>;
|
2016-11-01 08:55:14 +08:00
|
|
|
|
2016-10-27 00:37:56 +08:00
|
|
|
def FeatureISAVersion8_0_2 : SubtargetFeatureISAVersion <8,0,2,
|
|
|
|
[FeatureVolcanicIslands,
|
|
|
|
FeatureLDSBankCount32,
|
2018-01-13 05:12:19 +08:00
|
|
|
FeatureSGPRInitBug,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureUnpackedD16VMem,
|
|
|
|
FeatureCodeObjectV3]>;
|
2016-11-01 08:55:14 +08:00
|
|
|
|
2016-10-27 00:37:56 +08:00
|
|
|
def FeatureISAVersion8_0_3 : SubtargetFeatureISAVersion <8,0,3,
|
|
|
|
[FeatureVolcanicIslands,
|
2018-01-13 05:12:19 +08:00
|
|
|
FeatureLDSBankCount32,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureUnpackedD16VMem,
|
|
|
|
FeatureCodeObjectV3]>;
|
2016-11-01 08:55:14 +08:00
|
|
|
|
2016-10-27 00:37:56 +08:00
|
|
|
def FeatureISAVersion8_1_0 : SubtargetFeatureISAVersion <8,1,0,
|
|
|
|
[FeatureVolcanicIslands,
|
|
|
|
FeatureLDSBankCount16,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureXNACK,
|
|
|
|
FeatureCodeObjectV3]>;
|
2016-10-27 00:37:56 +08:00
|
|
|
|
2017-06-10 11:53:19 +08:00
|
|
|
def FeatureISAVersion9_0_0 : SubtargetFeatureISAVersion <9,0,0,
|
|
|
|
[FeatureGFX9,
|
2017-10-25 15:00:51 +08:00
|
|
|
FeatureMadMixInsts,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureLDSBankCount32,
|
|
|
|
FeatureCodeObjectV3]>;
|
2017-06-10 11:53:19 +08:00
|
|
|
|
|
|
|
def FeatureISAVersion9_0_2 : SubtargetFeatureISAVersion <9,0,2,
|
|
|
|
[FeatureGFX9,
|
2017-10-25 15:00:51 +08:00
|
|
|
FeatureMadMixInsts,
|
2018-02-17 05:26:25 +08:00
|
|
|
FeatureLDSBankCount32,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureXNACK,
|
|
|
|
FeatureCodeObjectV3]>;
|
2017-06-10 11:53:19 +08:00
|
|
|
|
2018-05-01 03:08:16 +08:00
|
|
|
def FeatureISAVersion9_0_4 : SubtargetFeatureISAVersion <9,0,4,
|
|
|
|
[FeatureGFX9,
|
|
|
|
FeatureLDSBankCount32,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureFmaMixInsts,
|
|
|
|
FeatureCodeObjectV3]>;
|
2018-05-01 03:08:16 +08:00
|
|
|
|
|
|
|
def FeatureISAVersion9_0_6 : SubtargetFeatureISAVersion <9,0,6,
|
|
|
|
[FeatureGFX9,
|
|
|
|
HalfRate64Ops,
|
|
|
|
FeatureFmaMixInsts,
|
|
|
|
FeatureLDSBankCount32,
|
2018-11-06 06:44:19 +08:00
|
|
|
FeatureDLInsts,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureSRAMECC,
|
|
|
|
FeatureCodeObjectV3]>;
|
2018-05-01 03:08:16 +08:00
|
|
|
|
2018-10-24 16:14:07 +08:00
|
|
|
def FeatureISAVersion9_0_9 : SubtargetFeatureISAVersion <9,0,9,
|
|
|
|
[FeatureGFX9,
|
|
|
|
FeatureMadMixInsts,
|
|
|
|
FeatureLDSBankCount32,
|
2018-11-15 10:32:43 +08:00
|
|
|
FeatureXNACK,
|
|
|
|
FeatureCodeObjectV3]>;
|
2018-10-24 16:14:07 +08:00
|
|
|
|
2016-04-19 00:28:23 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Debugger related subtarget features.
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
def FeatureDebuggerInsertNops : SubtargetFeature<
|
|
|
|
"amdgpu-debugger-insert-nops",
|
|
|
|
"DebuggerInsertNops",
|
|
|
|
"true",
|
2016-05-14 02:21:28 +08:00
|
|
|
"Insert one nop instruction for each high level source statement"
|
2016-04-19 00:28:23 +08:00
|
|
|
>;
|
|
|
|
|
2016-06-25 11:11:28 +08:00
|
|
|
def FeatureDebuggerEmitPrologue : SubtargetFeature<
|
|
|
|
"amdgpu-debugger-emit-prologue",
|
|
|
|
"DebuggerEmitPrologue",
|
|
|
|
"true",
|
|
|
|
"Emit debugger prologue"
|
|
|
|
>;
|
|
|
|
|
2013-06-08 04:28:55 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
2012-12-12 05:25:42 +08:00
|
|
|
|
|
|
|
def AMDGPUInstrInfo : InstrInfo {
|
|
|
|
let guessInstructionProperties = 1;
|
2015-02-18 10:15:32 +08:00
|
|
|
let noNamedPositionallyEncodedOperands = 1;
|
2012-12-12 05:25:42 +08:00
|
|
|
}
|
|
|
|
|
2014-11-14 22:08:00 +08:00
|
|
|
def AMDGPUAsmParser : AsmParser {
|
|
|
|
// Some of the R600 registers have the same name, so this crashes.
|
|
|
|
// For example T0_XYZW and T0_XY both have the asm name T0.
|
|
|
|
let ShouldEmitMatchRegisterName = 0;
|
|
|
|
}
|
|
|
|
|
2016-09-27 22:42:48 +08:00
|
|
|
def AMDGPUAsmWriter : AsmWriter {
|
|
|
|
int PassSubtarget = 1;
|
|
|
|
}
|
|
|
|
|
2016-09-09 17:37:51 +08:00
|
|
|
def AMDGPUAsmVariants {
|
|
|
|
string Default = "Default";
|
|
|
|
int Default_ID = 0;
|
|
|
|
string VOP3 = "VOP3";
|
|
|
|
int VOP3_ID = 1;
|
|
|
|
string SDWA = "SDWA";
|
|
|
|
int SDWA_ID = 2;
|
2017-05-23 18:08:55 +08:00
|
|
|
string SDWA9 = "SDWA9";
|
|
|
|
int SDWA9_ID = 3;
|
2016-09-09 17:37:51 +08:00
|
|
|
string DPP = "DPP";
|
2017-05-23 18:08:55 +08:00
|
|
|
int DPP_ID = 4;
|
2016-09-12 22:42:43 +08:00
|
|
|
string Disable = "Disable";
|
2017-05-23 18:08:55 +08:00
|
|
|
int Disable_ID = 5;
|
2016-09-09 17:37:51 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
def DefaultAMDGPUAsmParserVariant : AsmParserVariant {
|
|
|
|
let Variant = AMDGPUAsmVariants.Default_ID;
|
|
|
|
let Name = AMDGPUAsmVariants.Default;
|
|
|
|
}
|
|
|
|
|
|
|
|
def VOP3AsmParserVariant : AsmParserVariant {
|
|
|
|
let Variant = AMDGPUAsmVariants.VOP3_ID;
|
|
|
|
let Name = AMDGPUAsmVariants.VOP3;
|
|
|
|
}
|
|
|
|
|
|
|
|
def SDWAAsmParserVariant : AsmParserVariant {
|
|
|
|
let Variant = AMDGPUAsmVariants.SDWA_ID;
|
|
|
|
let Name = AMDGPUAsmVariants.SDWA;
|
|
|
|
}
|
|
|
|
|
2017-05-23 18:08:55 +08:00
|
|
|
def SDWA9AsmParserVariant : AsmParserVariant {
|
|
|
|
let Variant = AMDGPUAsmVariants.SDWA9_ID;
|
|
|
|
let Name = AMDGPUAsmVariants.SDWA9;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-09-09 17:37:51 +08:00
|
|
|
def DPPAsmParserVariant : AsmParserVariant {
|
|
|
|
let Variant = AMDGPUAsmVariants.DPP_ID;
|
|
|
|
let Name = AMDGPUAsmVariants.DPP;
|
|
|
|
}
|
|
|
|
|
2012-12-12 05:25:42 +08:00
|
|
|
def AMDGPU : Target {
|
|
|
|
// Pull in Instruction Info:
|
|
|
|
let InstructionSet = AMDGPUInstrInfo;
|
2014-11-14 22:08:00 +08:00
|
|
|
let AssemblyParsers = [AMDGPUAsmParser];
|
2016-09-09 17:37:51 +08:00
|
|
|
let AssemblyParserVariants = [DefaultAMDGPUAsmParserVariant,
|
|
|
|
VOP3AsmParserVariant,
|
|
|
|
SDWAAsmParserVariant,
|
2017-05-23 18:08:55 +08:00
|
|
|
SDWA9AsmParserVariant,
|
2016-09-09 17:37:51 +08:00
|
|
|
DPPAsmParserVariant];
|
2016-09-27 22:42:48 +08:00
|
|
|
let AssemblyWriters = [AMDGPUAsmWriter];
|
[MachineOperand][Target] MachineOperand::isRenamable semantics changes
Summary:
Add a target option AllowRegisterRenaming that is used to opt in to
post-register-allocation renaming of registers. This is set to 0 by
default, which causes the hasExtraSrcRegAllocReq/hasExtraDstRegAllocReq
fields of all opcodes to be set to 1, causing
MachineOperand::isRenamable to always return false.
Set the AllowRegisterRenaming flag to 1 for all in-tree targets that
have lit tests that were effected by enabling COPY forwarding in
MachineCopyPropagation (AArch64, AMDGPU, ARM, Hexagon, Mips, PowerPC,
RISCV, Sparc, SystemZ and X86).
Add some more comments describing the semantics of the
MachineOperand::isRenamable function and how it is set and maintained.
Change isRenamable to check the operand's opcode
hasExtraSrcRegAllocReq/hasExtraDstRegAllocReq bit directly instead of
relying on it being consistently reflected in the IsRenamable bit
setting.
Clear the IsRenamable bit when changing an operand's register value.
Remove target code that was clearing the IsRenamable bit when changing
registers/opcodes now that this is done conservatively by default.
Change setting of hasExtraSrcRegAllocReq in AMDGPU target to be done in
one place covering all opcodes that have constant pipe read limit
restrictions.
Reviewers: qcolombet, MatzeB
Subscribers: aemerson, arsenm, jyknight, mcrosier, sdardis, nhaehnle, javed.absar, tpr, arichardson, kristof.beyls, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, jordy.potman.lists, apazos, sabuasal, niosHD, escha, nemanjai, llvm-commits
Differential Revision: https://reviews.llvm.org/D43042
llvm-svn: 325931
2018-02-24 02:25:08 +08:00
|
|
|
let AllowRegisterRenaming = 1;
|
2012-12-12 05:25:42 +08:00
|
|
|
}
|
|
|
|
|
2014-06-14 00:38:59 +08:00
|
|
|
// Dummy Instruction itineraries for pseudo instructions
|
|
|
|
def ALU_NULL : FuncUnit;
|
|
|
|
def NullALU : InstrItinClass;
|
|
|
|
|
2014-05-17 04:56:45 +08:00
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// Predicate helper class
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2015-04-24 03:33:54 +08:00
|
|
|
def isSICI : Predicate<
|
|
|
|
"Subtarget->getGeneration() == AMDGPUSubtarget::SOUTHERN_ISLANDS ||"
|
|
|
|
"Subtarget->getGeneration() == AMDGPUSubtarget::SEA_ISLANDS"
|
2017-08-07 22:58:04 +08:00
|
|
|
>, AssemblerPredicate<"!FeatureGCN3Encoding">;
|
2015-04-24 03:33:54 +08:00
|
|
|
|
2015-12-24 11:18:18 +08:00
|
|
|
def isVI : Predicate <
|
|
|
|
"Subtarget->getGeneration() >= AMDGPUSubtarget::VOLCANIC_ISLANDS">,
|
|
|
|
AssemblerPredicate<"FeatureGCN3Encoding">;
|
|
|
|
|
2017-02-19 03:12:26 +08:00
|
|
|
def isGFX9 : Predicate <
|
|
|
|
"Subtarget->getGeneration() >= AMDGPUSubtarget::GFX9">,
|
|
|
|
AssemblerPredicate<"FeatureGFX9Insts">;
|
|
|
|
|
2017-02-19 02:29:53 +08:00
|
|
|
// TODO: Either the name to be changed or we simply use IsCI!
|
2016-01-26 12:49:22 +08:00
|
|
|
def isCIVI : Predicate <
|
2017-02-19 02:29:53 +08:00
|
|
|
"Subtarget->getGeneration() >= AMDGPUSubtarget::SEA_ISLANDS">,
|
|
|
|
AssemblerPredicate<"FeatureCIInsts">;
|
2016-01-26 12:49:22 +08:00
|
|
|
|
2017-06-21 03:54:14 +08:00
|
|
|
def HasFlatAddressSpace : Predicate<"Subtarget->hasFlatAddressSpace()">,
|
|
|
|
AssemblerPredicate<"FeatureFlatAddressSpace">;
|
|
|
|
|
|
|
|
def HasFlatGlobalInsts : Predicate<"Subtarget->hasFlatGlobalInsts()">,
|
|
|
|
AssemblerPredicate<"FeatureFlatGlobalInsts">;
|
2017-07-21 23:36:16 +08:00
|
|
|
def HasFlatScratchInsts : Predicate<"Subtarget->hasFlatScratchInsts()">,
|
|
|
|
AssemblerPredicate<"FeatureFlatScratchInsts">;
|
2017-09-02 02:36:06 +08:00
|
|
|
def HasD16LoadStore : Predicate<"Subtarget->hasD16LoadStore()">,
|
|
|
|
AssemblerPredicate<"FeatureGFX9Insts">;
|
2016-01-26 12:49:22 +08:00
|
|
|
|
2018-01-13 05:12:19 +08:00
|
|
|
def HasUnpackedD16VMem : Predicate<"Subtarget->hasUnpackedD16VMem()">,
|
|
|
|
AssemblerPredicate<"FeatureUnpackedD16VMem">;
|
|
|
|
def HasPackedD16VMem : Predicate<"!Subtarget->hasUnpackedD16VMem()">,
|
|
|
|
AssemblerPredicate<"!FeatureUnpackedD16VMem">;
|
|
|
|
|
2018-11-06 06:44:19 +08:00
|
|
|
def D16PreservesUnusedBits :
|
|
|
|
Predicate<"Subtarget->hasD16LoadStore() && !Subtarget->isSRAMECCEnabled()">,
|
|
|
|
AssemblerPredicate<"FeatureGFX9Insts,!FeatureSRAMECC">;
|
2017-11-29 08:55:57 +08:00
|
|
|
|
|
|
|
def LDSRequiresM0Init : Predicate<"Subtarget->ldsRequiresM0Init()">;
|
|
|
|
def NotLDSRequiresM0Init : Predicate<"!Subtarget->ldsRequiresM0Init()">;
|
|
|
|
|
2017-09-02 02:38:02 +08:00
|
|
|
def HasDSAddTid : Predicate<"Subtarget->getGeneration() >= AMDGPUSubtarget::GFX9">,
|
|
|
|
AssemblerPredicate<"FeatureGFX9Insts">;
|
|
|
|
|
2018-09-21 18:31:22 +08:00
|
|
|
def HasAddNoCarryInsts : Predicate<"Subtarget->hasAddNoCarry()">,
|
2017-07-21 01:42:47 +08:00
|
|
|
AssemblerPredicate<"FeatureAddNoCarryInsts">;
|
|
|
|
|
2018-09-21 18:31:22 +08:00
|
|
|
def NotHasAddNoCarryInsts : Predicate<"!Subtarget->hasAddNoCarry()">,
|
2017-07-21 01:42:47 +08:00
|
|
|
AssemblerPredicate<"!FeatureAddNoCarryInsts">;
|
|
|
|
|
2017-02-28 02:49:11 +08:00
|
|
|
def Has16BitInsts : Predicate<"Subtarget->has16BitInsts()">,
|
|
|
|
AssemblerPredicate<"Feature16BitInsts">;
|
|
|
|
def HasVOP3PInsts : Predicate<"Subtarget->hasVOP3PInsts()">,
|
|
|
|
AssemblerPredicate<"FeatureVOP3P">;
|
2016-11-11 00:02:37 +08:00
|
|
|
|
2018-05-22 14:32:10 +08:00
|
|
|
def NotHasVOP3PInsts : Predicate<"!Subtarget->hasVOP3PInsts()">,
|
|
|
|
AssemblerPredicate<"!FeatureVOP3P">;
|
|
|
|
|
2017-01-20 18:01:25 +08:00
|
|
|
def HasSDWA : Predicate<"Subtarget->hasSDWA()">,
|
2017-05-23 18:08:55 +08:00
|
|
|
AssemblerPredicate<"FeatureSDWA,FeatureVolcanicIslands">;
|
|
|
|
|
|
|
|
def HasSDWA9 : Predicate<"Subtarget->hasSDWA()">,
|
|
|
|
AssemblerPredicate<"FeatureSDWA,FeatureGFX9">;
|
2017-01-20 18:01:25 +08:00
|
|
|
|
|
|
|
def HasDPP : Predicate<"Subtarget->hasDPP()">,
|
|
|
|
AssemblerPredicate<"FeatureDPP">;
|
|
|
|
|
2018-08-28 23:07:30 +08:00
|
|
|
def HasR128A16 : Predicate<"Subtarget->hasR128A16()">,
|
|
|
|
AssemblerPredicate<"FeatureR128A16">;
|
|
|
|
|
2017-08-16 21:51:56 +08:00
|
|
|
def HasIntClamp : Predicate<"Subtarget->hasIntClamp()">,
|
|
|
|
AssemblerPredicate<"FeatureIntClamp">;
|
|
|
|
|
2017-10-25 15:00:51 +08:00
|
|
|
def HasMadMixInsts : Predicate<"Subtarget->hasMadMixInsts()">,
|
|
|
|
AssemblerPredicate<"FeatureMadMixInsts">;
|
2017-09-08 02:05:07 +08:00
|
|
|
|
2018-04-03 00:10:25 +08:00
|
|
|
def HasScalarAtomics : Predicate<"Subtarget->hasScalarAtomics()">,
|
|
|
|
AssemblerPredicate<"FeatureScalarAtomics">;
|
|
|
|
|
2018-04-27 03:21:26 +08:00
|
|
|
def has16BankLDS : Predicate<"Subtarget->getLDSBankCount() == 16">;
|
|
|
|
def has32BankLDS : Predicate<"Subtarget->getLDSBankCount() == 32">;
|
|
|
|
def HasVGPRIndexMode : Predicate<"Subtarget->hasVGPRIndexMode()">,
|
|
|
|
AssemblerPredicate<"FeatureVGPRIndexMode">;
|
|
|
|
def HasMovrel : Predicate<"Subtarget->hasMovrel()">,
|
|
|
|
AssemblerPredicate<"FeatureMovrel">;
|
|
|
|
|
2018-05-01 03:08:16 +08:00
|
|
|
def HasFmaMixInsts : Predicate<"Subtarget->hasFmaMixInsts()">,
|
|
|
|
AssemblerPredicate<"FeatureFmaMixInsts">;
|
|
|
|
|
|
|
|
def HasDLInsts : Predicate<"Subtarget->hasDLInsts()">,
|
|
|
|
AssemblerPredicate<"FeatureDLInsts">;
|
|
|
|
|
|
|
|
|
2017-10-11 04:22:07 +08:00
|
|
|
def EnableLateCFGStructurize : Predicate<
|
|
|
|
"EnableLateStructurizeCFG">;
|
2017-10-03 08:06:41 +08:00
|
|
|
|
2012-12-12 05:25:42 +08:00
|
|
|
// Include AMDGPU TD files
|
|
|
|
include "SISchedule.td"
|
2017-11-11 04:01:58 +08:00
|
|
|
include "GCNProcessors.td"
|
2012-12-12 05:25:42 +08:00
|
|
|
include "AMDGPUInstrInfo.td"
|
AMDGPU: Separate R600 and GCN TableGen files
Summary:
We now have two sets of generated TableGen files, one for R600 and one
for GCN, so each sub-target now has its own tables of instructions,
registers, ISel patterns, etc. This should help reduce compile time
since each sub-target now only has to consider information that
is specific to itself. This will also help prevent the R600
sub-target from slowing down new features for GCN, like disassembler
support, GlobalISel, etc.
Reviewers: arsenm, nhaehnle, jvesely
Reviewed By: arsenm
Subscribers: MatzeB, kzhuravl, wdng, mgorny, yaxunl, dstuttard, tpr, t-tye, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D46365
llvm-svn: 335942
2018-06-29 07:47:12 +08:00
|
|
|
include "SIIntrinsics.td"
|
2012-12-12 05:25:42 +08:00
|
|
|
include "AMDGPURegisterInfo.td"
|
Re-commit AMDGPU/GlobalISel: Add support for simple shaders
Fix build when global-isel is disabled and fix a warning.
Summary: We can select constant/global G_LOAD, global G_STORE, and G_GEP.
Reviewers: qcolombet, MatzeB, t.p.northover, ab, arsenm
Subscribers: mehdi_amini, vkalintiris, kzhuravl, wdng, nhaehnle, mgorny, yaxunl, tony-tye, modocache, llvm-commits, dberris
Differential Revision: https://reviews.llvm.org/D26730
llvm-svn: 293551
2017-01-31 05:56:46 +08:00
|
|
|
include "AMDGPURegisterBanks.td"
|
2012-12-12 05:25:42 +08:00
|
|
|
include "AMDGPUInstructions.td"
|
AMDGPU: Separate R600 and GCN TableGen files
Summary:
We now have two sets of generated TableGen files, one for R600 and one
for GCN, so each sub-target now has its own tables of instructions,
registers, ISel patterns, etc. This should help reduce compile time
since each sub-target now only has to consider information that
is specific to itself. This will also help prevent the R600
sub-target from slowing down new features for GCN, like disassembler
support, GlobalISel, etc.
Reviewers: arsenm, nhaehnle, jvesely
Reviewed By: arsenm
Subscribers: MatzeB, kzhuravl, wdng, mgorny, yaxunl, dstuttard, tpr, t-tye, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D46365
llvm-svn: 335942
2018-06-29 07:47:12 +08:00
|
|
|
include "SIInstrInfo.td"
|
2013-03-07 17:03:52 +08:00
|
|
|
include "AMDGPUCallingConv.td"
|
AMDGPU: Make getTgtMemIntrinsic table-driven for resource-based intrinsics
Summary:
Avoids having to list all intrinsics manually.
This is in preparation for the new dimension-aware image intrinsics,
which I'd rather not have to list here by hand.
Change-Id: If7ced04998397ef68c4cb8f7de66b5050fb767e5
Reviewers: arsenm, rampitec, b-sumner
Subscribers: kzhuravl, wdng, mgorny, yaxunl, dstuttard, tpr, llvm-commits, t-tye
Differential Revision: https://reviews.llvm.org/D44937
llvm-svn: 328938
2018-04-02 01:09:07 +08:00
|
|
|
include "AMDGPUSearchableTables.td"
|