[PATCH] D93789: Add accessors for MCSubtargetInfo CPU and Feature tables

Jeff Muizelaar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 23 18:10:46 PST 2020


jrmuizel created this revision.
Herald added a subscriber: JDevlieghere.
jrmuizel requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is needed for `-C target-cpu=help` and `-C target-feature=help` in rustc


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93789

Files:
  llvm/include/llvm/MC/MCSubtargetInfo.h


Index: llvm/include/llvm/MC/MCSubtargetInfo.h
===================================================================
--- llvm/include/llvm/MC/MCSubtargetInfo.h
+++ llvm/include/llvm/MC/MCSubtargetInfo.h
@@ -226,6 +226,10 @@
     return Found != ProcDesc.end() && StringRef(Found->Key) == CPU;
   }
 
+  ArrayRef<SubtargetSubTypeKV> getCPUTable() const { return ProcDesc; }
+
+  ArrayRef<SubtargetFeatureKV> getFeatureTable() const { return ProcFeatures; }
+
   virtual unsigned getHwMode() const { return 0; }
 
   /// Return the cache size in bytes for the given level of cache.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93789.313638.patch
Type: text/x-patch
Size: 577 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201224/e492868b/attachment.bin>


More information about the llvm-commits mailing list