[PATCH] D95588: [RISCV] Implement the MC layer support of P extension

Jim Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 6 00:05:07 PDT 2021


Jim marked an inline comment as done.
Jim added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVRegisterInfo.td:199
+
+def GPRP : RegisterClass<"RISCV",
+                         [XLenVT, XLenI8VT, XLenI16VT, XLenI32VT], 32, (add
----------------
craig.topper wrote:
> Why do we need a special register class? If the size, alignment, spill size are the same, why can't we just add the types to the regular GPR class?
I have tried to add new types to the regular GPR class before. But it show lots of `Could not infer all types in pattern!` error message on building. It have to add explicit type (XLenVT in most cases) to the existed codegen patterns which use GPR. I am not sure that is a good solution.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95588/new/

https://reviews.llvm.org/D95588



More information about the llvm-commits mailing list