[llvm-exegesis][NFC] Pass Instruction instead of bare Opcode
[llvm-core.git] / lib / Target / AMDGPU / AMDGPUFeatures.td
blob3c7d8a8fc550979c1bdbd0df45f73c6b49b802b5
1 //===-- AMDGPUFeatures.td - AMDGPU Feature Definitions -----*- tablegen -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
10 def FeatureFP64 : SubtargetFeature<"fp64",
11   "FP64",
12   "true",
13   "Enable double precision operations"
16 def FeatureFMA : SubtargetFeature<"fmaf",
17   "FMA",
18   "true",
19   "Enable single precision FMA (not as fast as mul+add, but fused)"
22 // Some instructions do not support denormals despite this flag. Using
23 // fp32 denormals also causes instructions to run at the double
24 // precision rate for the device.
25 def FeatureFP32Denormals : SubtargetFeature<"fp32-denormals",
26   "FP32Denormals",
27   "true",
28   "Enable single precision denormal handling"
31 class SubtargetFeatureLocalMemorySize <int Value> : SubtargetFeature<
32   "localmemorysize"#Value,
33   "LocalMemorySize",
34   !cast<string>(Value),
35   "The size of local memory in bytes"
38 def FeatureLocalMemorySize0 : SubtargetFeatureLocalMemorySize<0>;
39 def FeatureLocalMemorySize32768 : SubtargetFeatureLocalMemorySize<32768>;
40 def FeatureLocalMemorySize65536 : SubtargetFeatureLocalMemorySize<65536>;
42 class SubtargetFeatureWavefrontSize <int Value> : SubtargetFeature<
43   "wavefrontsize"#Value,
44   "WavefrontSize",
45   !cast<string>(Value),
46   "The number of threads per wavefront"
49 def FeatureWavefrontSize16 : SubtargetFeatureWavefrontSize<16>;
50 def FeatureWavefrontSize32 : SubtargetFeatureWavefrontSize<32>;
51 def FeatureWavefrontSize64 : SubtargetFeatureWavefrontSize<64>;
53 class SubtargetFeatureGeneration <string Value, string Subtarget,
54                                   list<SubtargetFeature> Implies> :
55         SubtargetFeature <Value, "Gen", Subtarget#"::"#Value,
56                           Value#" GPU generation", Implies>;
58 def FeatureDX10Clamp : SubtargetFeature<"dx10-clamp",
59   "DX10Clamp",
60   "true",
61   "clamp modifier clamps NaNs to 0.0"
64 def FeaturePromoteAlloca : SubtargetFeature <"promote-alloca",
65   "EnablePromoteAlloca",
66   "true",
67   "Enable promote alloca pass"