[llvm] [RISCV] Add groupid/bitmask for RISC-V extension (PR #94440)

Haojian Wu via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 21 23:30:37 PDT 2024


================
@@ -128,6 +128,33 @@ void getFeaturesForCPU(StringRef CPU,
     else
       EnabledFeatures.push_back(F.substr(1));
 }
+
+namespace RISCVExtensionBitmaskTable {
+#define GET_RISCVExtensionBitmaskTable_IMPL
+#include "llvm/TargetParser/RISCVTargetParserDef.inc"
+
+} // namespace RISCVExtensionBitmaskTable
+
+namespace {
+struct LessExtName {
+  bool operator()(const RISCVExtensionBitmaskTable::RISCVExtensionBitmask &LHS,
+                  StringRef RHS) {
+    return StringRef(LHS.Name) < RHS;
+  }
+};
+} // namespace
+
+static RISCVExtensionBitmaskTable::RISCVExtensionBitmask
+getExtensionBitmask(StringRef ExtName) {
----------------
hokein wrote:

looks like this function is not used in this file.

https://github.com/llvm/llvm-project/pull/94440


More information about the llvm-commits mailing list