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

Jessica Clarke via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 20 15:17:59 PDT 2024


================
@@ -540,10 +577,20 @@ void SearchableTableEmitter::emitGenericTable(const GenericTable &Table,
 
   // Indexes are sorted "{ Thing, PrimaryIdx }" arrays, so that a binary
   // search can be performed by "Thing".
-  if (Table.PrimaryKey)
-    emitLookupFunction(Table, *Table.PrimaryKey, true, OS);
+  if (Table.PrimaryKey) {
+    auto &Index = *Table.PrimaryKey;
+    // Two lookupfunction functions need to be generated to allow more than one
+    // lookup signature for the primary key lookup : first will return a SysReg
----------------
jrtc27 wrote:

SysReg is a specific use in the RISC-V target of this generic feature

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


More information about the llvm-commits mailing list