[llvm] [RISCV][NFC] Move Zawrs implementation to RISCVInstrInfoZawrs.td (PR #76940)

Alex Bradbury via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 4 09:32:23 PST 2024


asb wrote:

> > > LGTM. I think it's not necessarily the case that every extension should have it's own file
> > 
> > 
> > I agree. Adding a file for every extension doesn't scale well if we keep adding extensions at the rate we are.
> 
> What about adding it to `RISCVInstrInfoZa.td`? We will have `Zabha` (https://github.com/riscv/riscv-zabha) and may have `Zalasr` (https://github.com/mehnadnerd/riscv-zalasr) later.

We could move Zacas there too.

> And what is the policy? Should we put all (or these simple ones) `Zi*` extensions into `RISCVInstrInfoZi.td` for example? We already have `RISCVInstrInfoZb.td` and `RISCVInstrInfoZc.td`.

It would be nice if you could always find a Zfoo extension by opening RISCVInstrInfoZfoo.td for RISCVInstrInfoZf.td Sadly, the subset extensions like Zmmul or Zca mean you'd need to look in the single-letter RISCVInstrInfo td file too. So that has to be a special case.

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


More information about the llvm-commits mailing list