[PATCH] D23561: [RISCV 4/10] Add basic RISCV{InstrFormats, InstrInfo, RegisterInfo, }.td

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 14 07:41:43 PDT 2016


jyknight added a comment.

> - As done by other backends such as Sparc would, ust define every instruction twice.


Let's use PPC rather than Sparc as our baseline.

IMO, this simple thing of just defining the instructions twice probably makes the most sense to start out with. Don't forget you also need different types in the patterns for the different modes, not just different register classes -- afaik, you can't do that with a multiclass.

If, after everything's more finished, it does turn out to be easy to merge them with a multiclass macro, then OK. I'm skeptical that it will be easier that way, but that's fine. :)

On the other hand, it's also easy to split them apart later, so if you want to start with what you have in the pastebin and split it later on when/if becomes cumbersome that way, that's fine too. :)


https://reviews.llvm.org/D23561





More information about the llvm-commits mailing list