[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:15:13 PDT 2024


jrtc27 wrote:

> > We build several targets, some with custom CSRs (like in RISC-V downstream toolchains) and targets that do not have them (e..g, ARM, AArch64, etc.) and need the original API. So at the end, the tablegen generated code will have to produce both APIs.
> 
> Does the tablegen code being modified know about CSRs? Isn't it just a generic framework for a searchable table?
> 
> My suggestion was that RISCV would set the flag in its .td file to make the CSR table use a range. No other target needs to be affected since they won't set the flag.

Per-table though, please, i.e. a bit in SearchIndex and a corresponding PrimaryKeyFoo one in GenericTable.

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


More information about the llvm-commits mailing list