blob: b375cae9018ea21b19136d0b2cc3852b265d943b [file] [log] [blame]
Tom Stellardc5a154d2018-06-28 23:47:12 +00001//===-- 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
22class SubtargetFeatureLocalMemorySize <int Value> : SubtargetFeature<
23 "localmemorysize"#Value,
24 "LocalMemorySize",
25 !cast<string>(Value),
26 "The size of local memory in bytes"
27>;
28
29def FeatureLocalMemorySize0 : SubtargetFeatureLocalMemorySize<0>;
30def FeatureLocalMemorySize32768 : SubtargetFeatureLocalMemorySize<32768>;
31def FeatureLocalMemorySize65536 : SubtargetFeatureLocalMemorySize<65536>;
32
33class SubtargetFeatureWavefrontSize <int Value> : SubtargetFeature<
34 "wavefrontsize"#Value,
35 "WavefrontSize",
36 !cast<string>(Value),
37 "The number of threads per wavefront"
38>;
39
40def FeatureWavefrontSize16 : SubtargetFeatureWavefrontSize<16>;
41def FeatureWavefrontSize32 : SubtargetFeatureWavefrontSize<32>;
42def FeatureWavefrontSize64 : SubtargetFeatureWavefrontSize<64>;
43
44class SubtargetFeatureGeneration <string Value, string Subtarget,
45 list<SubtargetFeature> Implies> :
46 SubtargetFeature <Value, "Gen", Subtarget#"::"#Value,
47 Value#" GPU generation", Implies>;
48
49def FeatureDX10Clamp : SubtargetFeature<"dx10-clamp",
50 "DX10Clamp",
51 "true",
52 "clamp modifier clamps NaNs to 0.0"
53>;
54
55def FeaturePromoteAlloca : SubtargetFeature <"promote-alloca",
56 "EnablePromoteAlloca",
57 "true",
58 "Enable promote alloca pass"
59>;
60