[PATCH] Add StatusText to the Processor class in Target.td to allow adding 'experimental' or 'highly experimental' annotations to processors.

Daniel Sanders daniel.sanders at imgtec.com
Wed Apr 30 06:55:54 PDT 2014


http://reviews.llvm.org/D3568

Files:
  include/llvm/Target/Target.td
  utils/TableGen/SubtargetEmitter.cpp

Index: include/llvm/Target/Target.td
===================================================================
--- include/llvm/Target/Target.td
+++ include/llvm/Target/Target.td
@@ -1065,6 +1065,12 @@
 
   // Features - list of
   list<SubtargetFeature> Features = f;
+
+  // StatusText - Text about the implementation status of the processor.
+  // When empty the help text will be 'Select the foo processor'. When non-empty
+  // it will be appended to the help text inside square brackets. For example,
+  // 'Select the foo processor [experimental]'
+  string StatusText = "";
 }
 
 // ProcessorModel allows subtargets to specify the more general
Index: utils/TableGen/SubtargetEmitter.cpp
===================================================================
--- utils/TableGen/SubtargetEmitter.cpp
+++ utils/TableGen/SubtargetEmitter.cpp
@@ -254,11 +254,15 @@
     const std::string &Name = Processor->getValueAsString("Name");
     const std::vector<Record*> &FeatureList =
       Processor->getValueAsListOfDefs("Features");
+    const std::string &StatusText = Processor->getValueAsString("StatusText");
 
     // Emit as { "cpu", "description", f1 | f2 | ... fn },
     OS << "  { "
        << "\"" << Name << "\", "
-       << "\"Select the " << Name << " processor\", ";
+       << "\"Select the " << Name << " processor";
+    if (!StatusText.empty())
+      OS << " [" << StatusText << "]";
+    OS << "\", ";
 
     if (FeatureList.empty()) {
       OS << "0ULL";
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3568.8975.patch
Type: text/x-patch
Size: 1472 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140430/f3fe72f6/attachment.bin>


More information about the llvm-commits mailing list