brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · d14b5ce Raw
58 lines · plain
1//===-- AMDGPUFeatures.td - AMDGPU Feature Definitions -----*- tablegen -*-===//2//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-exception6//7//===----------------------------------------------------------------------===//8 9def FeatureFP64 : SubtargetFeature<"fp64",10  "FP64",11  "true",12  "Enable double precision operations"13>;14 15def FeatureFMA : SubtargetFeature<"fmaf",16  "FMA",17  "true",18  "Enable single precision FMA (not as fast as mul+add, but fused)"19>;20 21// Addressable local memory size is the maximum number of bytes of LDS that can22// be allocated to a single workgroup.23class SubtargetFeatureAddressableLocalMemorySize <int Value> : SubtargetFeature<24  "addressablelocalmemorysize"#Value,25  "AddressableLocalMemorySize",26  !cast<string>(Value),27  "The size of local memory in bytes"28>;29 30def FeatureAddressableLocalMemorySize32768 : SubtargetFeatureAddressableLocalMemorySize<32768>;31def FeatureAddressableLocalMemorySize65536 : SubtargetFeatureAddressableLocalMemorySize<65536>;32def FeatureAddressableLocalMemorySize163840 : SubtargetFeatureAddressableLocalMemorySize<163840>;33def FeatureAddressableLocalMemorySize327680 : SubtargetFeatureAddressableLocalMemorySize<327680>;34 35class SubtargetFeatureWavefrontSize <int ValueLog2> : SubtargetFeature<36  "wavefrontsize"#!shl(1, ValueLog2),37  "WavefrontSizeLog2",38  !cast<string>(ValueLog2),39  "The number of threads per wavefront"40>;41 42def FeatureWavefrontSize16 : SubtargetFeatureWavefrontSize<4>;43def FeatureWavefrontSize32 : SubtargetFeatureWavefrontSize<5>;44def FeatureWavefrontSize64 : SubtargetFeatureWavefrontSize<6>;45 46class SubtargetFeatureGeneration <string Value, string FeatureName,47                                 string Subtarget,48                                  list<SubtargetFeature> Implies> :49        SubtargetFeature <FeatureName, "Gen", Subtarget#"::"#Value,50                          Value#" GPU generation", Implies>;51 52def FeaturePromoteAlloca : SubtargetFeature <"promote-alloca",53  "EnablePromoteAlloca",54  "true",55  "Enable promote alloca pass"56>;57 58