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