[llvm] [RISCV]Add support for resolving encoding conflicts among vendor specific CSRs (PR #96060)
Pengcheng Wang via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 19 05:03:56 PDT 2024
================
@@ -540,10 +574,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
+ // that matches the primary key, second will populate a vector passed as
+ // argument with all the SysRegs that match the primary key.
+ emitLookupFunction(Table, Index, /*IsPrimary=*/true,
----------------
wangpc-pp wrote:
I think these SearchableTable changes should be in separate PR.
https://github.com/llvm/llvm-project/pull/96060
More information about the llvm-commits
mailing list