[PATCH] D155932: [RISCV] Add subclasses of Sched to simplify code

Michael Maitland via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 10:48:48 PDT 2023


michaelmaitland added a comment.

Thanks for these changes, they clean up this file a bunch!



================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoV.td:101
 
+class SchedNary<string write, list<string> reads,
+                string mx, int sew = 0, bit maskedOnly = 0>: Sched<[]> {
----------------
Can we add docstrings for these functions since they will be used by many different classes?


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoV.td:101
 
+class SchedNary<string write, list<string> reads,
+                string mx, int sew = 0, bit maskedOnly = 0>: Sched<[]> {
----------------
michaelmaitland wrote:
> Can we add docstrings for these functions since they will be used by many different classes?
These classes are only used in `RISCVInstrVPseudos.td`. Do they belong in that file?


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfoV.td:111
+  defvar IsMasked = !ne(!find(NAME, "_MASK"), -1);
+  defvar AddReadVMask = !or(maskedOnly, IsMasked);
+  let SchedRW = !listconcat(WriteList, ReadList,
----------------
I don't know the case convention for TableGen, but it looks like we're mixing camel and pascal case here (and we also use underscores in other places too). Is there a reason for mixing case conventions here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D155932



More information about the llvm-commits mailing list