[PATCH] D38192: [TargetParser][AArch64] Add support for SPE feature in the target parser.

Chad Rosier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 25 05:03:51 PDT 2017


mcrosier created this revision.
Herald added subscribers: kristof.beyls, javed.absar.

This add support for the Statistical Profiling Extension (SPE) in the AArch64 target parser.

Please take a look.

Chad


https://reviews.llvm.org/D38192

Files:
  include/llvm/Support/AArch64TargetParser.def
  include/llvm/Support/TargetParser.h
  lib/Support/TargetParser.cpp
  unittests/Support/TargetParserTest.cpp


Index: unittests/Support/TargetParserTest.cpp
===================================================================
--- unittests/Support/TargetParserTest.cpp
+++ unittests/Support/TargetParserTest.cpp
@@ -814,7 +814,7 @@
                         AArch64::AEK_FP | AArch64::AEK_SIMD |
                         AArch64::AEK_FP16 | AArch64::AEK_PROFILE |
                         AArch64::AEK_RAS | AArch64::AEK_LSE |
-                        AArch64::AEK_RDM | AArch64::AEK_SVE |
+                        AArch64::AEK_RDM | AArch64::AEK_SPE | AArch64::AEK_SVE |
                         AArch64::AEK_DOTPROD | AArch64::AEK_RCPC;
 
   for (unsigned i = 0; i <= Extensions; i++)
@@ -846,6 +846,7 @@
                               {"ras", "noras", "+ras", "-ras"},
                               {"lse", "nolse", "+lse", "-lse"},
                               {"rdm", "nordm", "+rdm", "-rdm"},
+                              {"spe", "nospe", "+spe", "-spe"},
                               {"sve", "nosve", "+sve", "-sve"},
                               {"dotprod", "nodotprod", "+dotprod", "-dotprod"},
                               {"rcpc", "norcpc", "+rcpc", "-rcpc" }};
Index: lib/Support/TargetParser.cpp
===================================================================
--- lib/Support/TargetParser.cpp
+++ lib/Support/TargetParser.cpp
@@ -460,6 +460,8 @@
     Features.push_back("+lse");
   if (Extensions & AArch64::AEK_RDM)
     Features.push_back("+rdm");
+  if (Extensions & AArch64::AEK_SPE)
+    Features.push_back("+spe");
   if (Extensions & AArch64::AEK_SVE)
     Features.push_back("+sve");
   if (Extensions & AArch64::AEK_RCPC)
Index: include/llvm/Support/TargetParser.h
===================================================================
--- include/llvm/Support/TargetParser.h
+++ include/llvm/Support/TargetParser.h
@@ -168,9 +168,10 @@
   AEK_RAS =         1 << 7,
   AEK_LSE =         1 << 8,
   AEK_RDM =         1 << 9,
-  AEK_SVE =         1 << 10,
-  AEK_DOTPROD =     1 << 11,
-  AEK_RCPC =        1 << 12
+  AEK_SPE =         1 << 10,
+  AEK_SVE =         1 << 11,
+  AEK_DOTPROD =     1 << 12,
+  AEK_RCPC =        1 << 13
 };
 
 StringRef getCanonicalArchName(StringRef Arch);
Index: include/llvm/Support/AArch64TargetParser.def
===================================================================
--- include/llvm/Support/AArch64TargetParser.def
+++ include/llvm/Support/AArch64TargetParser.def
@@ -53,6 +53,7 @@
 AARCH64_ARCH_EXT_NAME("fp16",     AArch64::AEK_FP16,     "+fullfp16",  "-fullfp16")
 AARCH64_ARCH_EXT_NAME("profile",  AArch64::AEK_PROFILE,  "+spe",  "-spe")
 AARCH64_ARCH_EXT_NAME("ras",      AArch64::AEK_RAS,      "+ras",  "-ras")
+AARCH64_ARCH_EXT_NAME("spe",      AArch64::AEK_SPE,      "+spe",  "-spe")
 AARCH64_ARCH_EXT_NAME("sve",      AArch64::AEK_SVE,      "+sve",  "-sve")
 AARCH64_ARCH_EXT_NAME("rcpc",     AArch64::AEK_RCPC,     "+rcpc", "-rcpc")
 #undef AARCH64_ARCH_EXT_NAME


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38192.116407.patch
Type: text/x-patch
Size: 2935 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170925/8148159f/attachment.bin>


More information about the llvm-commits mailing list