[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
Thu Jun 20 16:01:48 PDT 2024


topperc 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 index though, please, i.e. a bit in SearchIndex and a corresponding PrimaryKeyFoo one in GenericTable.

Agreed. It should be like `PrimaryKeyEarlyOut` in `GenericTable` and `EarlyOut` in `SearchIndex`.

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


More information about the llvm-commits mailing list