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

Jeff Muizelaar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 17 06:56:31 PST 2021


jrmuizel updated this revision to Diff 317217.
jrmuizel added a comment.

Add comments


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93789/new/

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,12 @@
     return Found != ProcDesc.end() && StringRef(Found->Key) == CPU;
   }
 
+  /// Get the available CPUs for this target.
+  ArrayRef<SubtargetSubTypeKV> getCPUTable() const { return ProcDesc; }
+
+  /// Get the available features for this target.
+  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.317217.patch
Type: text/x-patch
Size: 675 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210117/e23f2eed/attachment.bin>


More information about the llvm-commits mailing list