[llvm] [RISCV]Add support for resolving encoding conflicts among vendor specific CSRs (PR #96174)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 1 09:23:16 PDT 2024


================
@@ -426,16 +428,25 @@ void SearchableTableEmitter::emitLookupFunction(const GenericTable &Table,
     OS << "    return nullptr;\n\n";
   }
 
-  OS << "  struct KeyType {\n";
-  for (const auto &Field : Index.Fields) {
-    OS << "    " << searchableFieldType(Table, Index, Field, TypeInTempStruct)
-       << " " << Field.Name << ";\n";
+  bool ShouldReturnRange = Index.ReturnRange;
+  if (ShouldReturnRange)
----------------
topperc wrote:

Why does returning a range need to change how the Key is constructed?

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


More information about the llvm-commits mailing list