1 //===-- AMDGPUFeatures.td - AMDGPU Feature Definitions -----*- tablegen -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 def FeatureFP64 : SubtargetFeature<"fp64",
13 "Enable double precision operations"
16 def FeatureFMA : SubtargetFeature<"fmaf",
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",
28 "Enable single precision denormal handling"
31 class SubtargetFeatureLocalMemorySize <int Value> : SubtargetFeature<
32 "localmemorysize"#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,
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",
61 "clamp modifier clamps NaNs to 0.0"
64 def FeaturePromoteAlloca : SubtargetFeature <"promote-alloca",
65 "EnablePromoteAlloca",
67 "Enable promote alloca pass"