1 //===-- AMDGPUFeatures.td - AMDGPU Feature Definitions -----*- tablegen -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 def FeatureFP64 : SubtargetFeature<"fp64",
12 "Enable double precision operations"
15 def FeatureFMA : SubtargetFeature<"fmaf",
18 "Enable single precision FMA (not as fast as mul+add, but fused)"
21 class SubtargetFeatureLocalMemorySize <int Value> : SubtargetFeature<
22 "localmemorysize"#Value,
25 "The size of local memory in bytes"
28 def FeatureLocalMemorySize32768 : SubtargetFeatureLocalMemorySize<32768>;
29 def FeatureLocalMemorySize65536 : SubtargetFeatureLocalMemorySize<65536>;
31 class SubtargetFeatureWavefrontSize <int ValueLog2> : SubtargetFeature<
32 "wavefrontsize"#!shl(1, ValueLog2),
34 !cast<string>(ValueLog2),
35 "The number of threads per wavefront"
38 def FeatureWavefrontSize16 : SubtargetFeatureWavefrontSize<4>;
39 def FeatureWavefrontSize32 : SubtargetFeatureWavefrontSize<5>;
40 def FeatureWavefrontSize64 : SubtargetFeatureWavefrontSize<6>;
42 class SubtargetFeatureGeneration <string Value, string FeatureName,
44 list<SubtargetFeature> Implies> :
45 SubtargetFeature <FeatureName, "Gen", Subtarget#"::"#Value,
46 Value#" GPU generation", Implies>;
48 def FeaturePromoteAlloca : SubtargetFeature <"promote-alloca",
49 "EnablePromoteAlloca",
51 "Enable promote alloca pass"