mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 12:02:58 +02:00
ae65e281f3
to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
69 lines
2.2 KiB
TableGen
69 lines
2.2 KiB
TableGen
//===-- AMDGPUFeatures.td - AMDGPU Feature Definitions -----*- tablegen -*-===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
def FeatureFP64 : SubtargetFeature<"fp64",
|
|
"FP64",
|
|
"true",
|
|
"Enable double precision operations"
|
|
>;
|
|
|
|
def FeatureFMA : SubtargetFeature<"fmaf",
|
|
"FMA",
|
|
"true",
|
|
"Enable single precision FMA (not as fast as mul+add, but fused)"
|
|
>;
|
|
|
|
// Some instructions do not support denormals despite this flag. Using
|
|
// fp32 denormals also causes instructions to run at the double
|
|
// precision rate for the device.
|
|
def FeatureFP32Denormals : SubtargetFeature<"fp32-denormals",
|
|
"FP32Denormals",
|
|
"true",
|
|
"Enable single precision denormal handling"
|
|
>;
|
|
|
|
class SubtargetFeatureLocalMemorySize <int Value> : SubtargetFeature<
|
|
"localmemorysize"#Value,
|
|
"LocalMemorySize",
|
|
!cast<string>(Value),
|
|
"The size of local memory in bytes"
|
|
>;
|
|
|
|
def FeatureLocalMemorySize0 : SubtargetFeatureLocalMemorySize<0>;
|
|
def FeatureLocalMemorySize32768 : SubtargetFeatureLocalMemorySize<32768>;
|
|
def FeatureLocalMemorySize65536 : SubtargetFeatureLocalMemorySize<65536>;
|
|
|
|
class SubtargetFeatureWavefrontSize <int Value> : SubtargetFeature<
|
|
"wavefrontsize"#Value,
|
|
"WavefrontSize",
|
|
!cast<string>(Value),
|
|
"The number of threads per wavefront"
|
|
>;
|
|
|
|
def FeatureWavefrontSize16 : SubtargetFeatureWavefrontSize<16>;
|
|
def FeatureWavefrontSize32 : SubtargetFeatureWavefrontSize<32>;
|
|
def FeatureWavefrontSize64 : SubtargetFeatureWavefrontSize<64>;
|
|
|
|
class SubtargetFeatureGeneration <string Value, string Subtarget,
|
|
list<SubtargetFeature> Implies> :
|
|
SubtargetFeature <Value, "Gen", Subtarget#"::"#Value,
|
|
Value#" GPU generation", Implies>;
|
|
|
|
def FeatureDX10Clamp : SubtargetFeature<"dx10-clamp",
|
|
"DX10Clamp",
|
|
"true",
|
|
"clamp modifier clamps NaNs to 0.0"
|
|
>;
|
|
|
|
def FeaturePromoteAlloca : SubtargetFeature <"promote-alloca",
|
|
"EnablePromoteAlloca",
|
|
"true",
|
|
"Enable promote alloca pass"
|
|
>;
|
|
|