AMDGPU: Fix names for generation features

We should overall stop using these, but the uppercase name didn't
work. Any feature string is converted to lowercase, so these
could never be found in the table.

llvm-svn: 357541
This commit is contained in:
Matt Arsenault 2019-04-03 00:01:03 +00:00
parent 0583d9ea8d
commit 45c165b917
4 changed files with 17 additions and 10 deletions

View File

@ -431,22 +431,26 @@ def FeatureDisable : SubtargetFeature<"",
>;
class GCNSubtargetFeatureGeneration <string Value,
list<SubtargetFeature> Implies> :
SubtargetFeatureGeneration <Value, "GCNSubtarget", Implies>;
string FeatureName,
list<SubtargetFeature> Implies> :
SubtargetFeatureGeneration <Value, FeatureName, "GCNSubtarget", Implies>;
def FeatureSouthernIslands : GCNSubtargetFeatureGeneration<"SOUTHERN_ISLANDS",
"southern-islands",
[FeatureFP64, FeatureLocalMemorySize32768, FeatureMIMG_R128,
FeatureWavefrontSize64,
FeatureLDSBankCount32, FeatureMovrel, FeatureTrigReducedRange]
>;
def FeatureSeaIslands : GCNSubtargetFeatureGeneration<"SEA_ISLANDS",
"sea-islands",
[FeatureFP64, FeatureLocalMemorySize65536, FeatureMIMG_R128,
FeatureWavefrontSize64, FeatureFlatAddressSpace,
FeatureCIInsts, FeatureMovrel, FeatureTrigReducedRange]
>;
def FeatureVolcanicIslands : GCNSubtargetFeatureGeneration<"VOLCANIC_ISLANDS",
"volcanic-islands",
[FeatureFP64, FeatureLocalMemorySize65536, FeatureMIMG_R128,
FeatureWavefrontSize64, FeatureFlatAddressSpace,
FeatureGCN3Encoding, FeatureCIInsts, FeatureVIInsts, Feature16BitInsts,
@ -458,6 +462,7 @@ def FeatureVolcanicIslands : GCNSubtargetFeatureGeneration<"VOLCANIC_ISLANDS",
>;
def FeatureGFX9 : GCNSubtargetFeatureGeneration<"GFX9",
"gfx9",
[FeatureFP64, FeatureLocalMemorySize65536,
FeatureWavefrontSize64, FeatureFlatAddressSpace,
FeatureGCN3Encoding, FeatureCIInsts, FeatureVIInsts, Feature16BitInsts,

View File

@ -49,9 +49,10 @@ def FeatureWavefrontSize16 : SubtargetFeatureWavefrontSize<16>;
def FeatureWavefrontSize32 : SubtargetFeatureWavefrontSize<32>;
def FeatureWavefrontSize64 : SubtargetFeatureWavefrontSize<64>;
class SubtargetFeatureGeneration <string Value, string Subtarget,
class SubtargetFeatureGeneration <string Value, string FeatureName,
string Subtarget,
list<SubtargetFeature> Implies> :
SubtargetFeature <Value, "Gen", Subtarget#"::"#Value,
SubtargetFeature <FeatureName, "Gen", Subtarget#"::"#Value,
Value#" GPU generation", Implies>;
def FeaturePromoteAlloca : SubtargetFeature <"promote-alloca",

View File

@ -932,7 +932,7 @@ public:
if (getFeatureBits().none()) {
// Set default features.
copySTI().ToggleFeature("SOUTHERN_ISLANDS");
copySTI().ToggleFeature("southern-islands");
}
setAvailableFeatures(ComputeAvailableFeatures(getFeatureBits()));

View File

@ -40,23 +40,24 @@ def FeatureCFALUBug : SubtargetFeature<"cfalubug",
"GPU has CF_ALU bug"
>;
class R600SubtargetFeatureGeneration <string Value,
class R600SubtargetFeatureGeneration <string Value, string FeatureName,
list<SubtargetFeature> Implies> :
SubtargetFeatureGeneration <Value, "R600Subtarget", Implies>;
SubtargetFeatureGeneration <Value, FeatureName, "R600Subtarget", Implies>;
def FeatureR600 : R600SubtargetFeatureGeneration<"R600",
def FeatureR600 : R600SubtargetFeatureGeneration<"R600", "r600",
[FeatureR600ALUInst, FeatureFetchLimit8, FeatureLocalMemorySize0]
>;
def FeatureR700 : R600SubtargetFeatureGeneration<"R700",
def FeatureR700 : R600SubtargetFeatureGeneration<"R700", "r700",
[FeatureFetchLimit16, FeatureLocalMemorySize0]
>;
def FeatureEvergreen : R600SubtargetFeatureGeneration<"EVERGREEN",
def FeatureEvergreen : R600SubtargetFeatureGeneration<"EVERGREEN", "evergreen",
[FeatureFetchLimit16, FeatureLocalMemorySize32768]
>;
def FeatureNorthernIslands : R600SubtargetFeatureGeneration<"NORTHERN_ISLANDS",
"northern-islands",
[FeatureFetchLimit16, FeatureWavefrontSize64,
FeatureLocalMemorySize32768]
>;