[PATCH] D23957: Replace the Radeon GCN GPU family names by more descriptive ones

Niels Ole Salscheider via cfe-commits cfe-commits at lists.llvm.org
Sat Sep 3 00:22:15 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL280587: Replace the Radeon GCN GPU family names by more descriptive ones (authored by olesalscheider).

Changed prior to commit:
  https://reviews.llvm.org/D23957?vs=69486&id=70264#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D23957

Files:
  cfe/trunk/lib/Basic/Targets.cpp

Index: cfe/trunk/lib/Basic/Targets.cpp
===================================================================
--- cfe/trunk/lib/Basic/Targets.cpp
+++ cfe/trunk/lib/Basic/Targets.cpp
@@ -1953,9 +1953,9 @@
     GK_EVERGREEN_DOUBLE_OPS,
     GK_NORTHERN_ISLANDS,
     GK_CAYMAN,
-    GK_SOUTHERN_ISLANDS,
-    GK_SEA_ISLANDS,
-    GK_VOLCANIC_ISLANDS
+    GK_GFX6,
+    GK_GFX7,
+    GK_GFX8
   } GPU;
 
   bool hasFP64:1;
@@ -1970,7 +1970,7 @@
 public:
   AMDGPUTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
     : TargetInfo(Triple) ,
-      GPU(isAMDGCN(Triple) ? GK_SOUTHERN_ISLANDS : GK_R600),
+      GPU(isAMDGCN(Triple) ? GK_GFX6 : GK_R600),
       hasFP64(false),
       hasFMAF(false),
       hasLDEXPF(false),
@@ -2110,23 +2110,23 @@
 
   static GPUKind parseAMDGCNName(StringRef Name) {
     return llvm::StringSwitch<GPUKind>(Name)
-      .Case("tahiti",    GK_SOUTHERN_ISLANDS)
-      .Case("pitcairn",  GK_SOUTHERN_ISLANDS)
-      .Case("verde",     GK_SOUTHERN_ISLANDS)
-      .Case("oland",     GK_SOUTHERN_ISLANDS)
-      .Case("hainan",    GK_SOUTHERN_ISLANDS)
-      .Case("bonaire",   GK_SEA_ISLANDS)
-      .Case("kabini",    GK_SEA_ISLANDS)
-      .Case("kaveri",    GK_SEA_ISLANDS)
-      .Case("hawaii",    GK_SEA_ISLANDS)
-      .Case("mullins",   GK_SEA_ISLANDS)
-      .Case("tonga",     GK_VOLCANIC_ISLANDS)
-      .Case("iceland",   GK_VOLCANIC_ISLANDS)
-      .Case("carrizo",   GK_VOLCANIC_ISLANDS)
-      .Case("fiji",      GK_VOLCANIC_ISLANDS)
-      .Case("stoney",    GK_VOLCANIC_ISLANDS)
-      .Case("polaris10", GK_VOLCANIC_ISLANDS)
-      .Case("polaris11", GK_VOLCANIC_ISLANDS)
+      .Case("tahiti",    GK_GFX6)
+      .Case("pitcairn",  GK_GFX6)
+      .Case("verde",     GK_GFX6)
+      .Case("oland",     GK_GFX6)
+      .Case("hainan",    GK_GFX6)
+      .Case("bonaire",   GK_GFX7)
+      .Case("kabini",    GK_GFX7)
+      .Case("kaveri",    GK_GFX7)
+      .Case("hawaii",    GK_GFX7)
+      .Case("mullins",   GK_GFX7)
+      .Case("tonga",     GK_GFX8)
+      .Case("iceland",   GK_GFX8)
+      .Case("carrizo",   GK_GFX8)
+      .Case("fiji",      GK_GFX8)
+      .Case("stoney",    GK_GFX8)
+      .Case("polaris10", GK_GFX8)
+      .Case("polaris11", GK_GFX8)
       .Default(GK_NONE);
   }
 
@@ -2153,7 +2153,7 @@
       Opts.cl_khr_local_int32_base_atomics = 1;
       Opts.cl_khr_local_int32_extended_atomics = 1;
     }
-    if (GPU >= GK_SOUTHERN_ISLANDS) {
+    if (GPU >= GK_GFX6) {
       Opts.cl_khr_fp16 = 1;
       Opts.cl_khr_int64_base_atomics = 1;
       Opts.cl_khr_int64_extended_atomics = 1;
@@ -2255,11 +2255,11 @@
       CPU = "tahiti";
 
     switch (parseAMDGCNName(CPU)) {
-    case GK_SOUTHERN_ISLANDS:
-    case GK_SEA_ISLANDS:
+    case GK_GFX6:
+    case GK_GFX7:
       break;
 
-    case GK_VOLCANIC_ISLANDS:
+    case GK_GFX8:
       Features["s-memrealtime"] = true;
       Features["16-bit-insts"] = true;
       break;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23957.70264.patch
Type: text/x-patch
Size: 2918 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160903/14590146/attachment.bin>


More information about the cfe-commits mailing list