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//===----------------------------------------------------------------------===// 9 10def FeatureFP64 : SubtargetFeature<"fp64", 11 "FP64", 12 "true", 13 "Enable double precision operations" 14>; 15 16def FeatureFMA : SubtargetFeature<"fmaf", 17 "FMA", 18 "true", 19 "Enable single precision FMA (not as fast as mul+add, but fused)" 20>; 21 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. 25def FeatureFP32Denormals : SubtargetFeature<"fp32-denormals", 26 "FP32Denormals", 27 "true", 28 "Enable single precision denormal handling" 29>; 30 31class SubtargetFeatureLocalMemorySize <int Value> : SubtargetFeature< 32 "localmemorysize"#Value, 33 "LocalMemorySize", 34 !cast<string>(Value), 35 "The size of local memory in bytes" 36>; 37 38def FeatureLocalMemorySize0 : SubtargetFeatureLocalMemorySize<0>; 39def FeatureLocalMemorySize32768 : SubtargetFeatureLocalMemorySize<32768>; 40def FeatureLocalMemorySize65536 : SubtargetFeatureLocalMemorySize<65536>; 41 42class SubtargetFeatureWavefrontSize <int Value> : SubtargetFeature< 43 "wavefrontsize"#Value, 44 "WavefrontSize", 45 !cast<string>(Value), 46 "The number of threads per wavefront" 47>; 48 49def FeatureWavefrontSize16 : SubtargetFeatureWavefrontSize<16>; 50def FeatureWavefrontSize32 : SubtargetFeatureWavefrontSize<32>; 51def FeatureWavefrontSize64 : SubtargetFeatureWavefrontSize<64>; 52 53class SubtargetFeatureGeneration <string Value, string Subtarget, 54 list<SubtargetFeature> Implies> : 55 SubtargetFeature <Value, "Gen", Subtarget#"::"#Value, 56 Value#" GPU generation", Implies>; 57 58def FeatureDX10Clamp : SubtargetFeature<"dx10-clamp", 59 "DX10Clamp", 60 "true", 61 "clamp modifier clamps NaNs to 0.0" 62>; 63 64def FeaturePromoteAlloca : SubtargetFeature <"promote-alloca", 65 "EnablePromoteAlloca", 66 "true", 67 "Enable promote alloca pass" 68>; 69 70