[PATCH] D29934: [RISCV 12/n] Codegen support for memory operations

Krzysztof Parzyszek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 07:49:30 PDT 2017


kparzysz added inline comments.


================
Comment at: lib/Target/RISCV/RISCVISelLowering.h:32
 class RISCVTargetLowering : public TargetLowering {
+  const RISCVSubtarget *Subtarget;
+
----------------
Please make this a reference, since Subtarget cannot be nullptr.


================
Comment at: lib/Target/RISCV/RISCVInstrInfo.td:294
+  def : Pat<(LoadOp GPR:$rs1), (Inst GPR:$rs1, 0)>;
+  def : Pat<(LoadOp (add GPR:$rs1, simm12:$imm12)), (Inst GPR:$rs1, simm12:$imm12)>;
+}
----------------
Line just a bit too long.


================
Comment at: lib/Target/RISCV/RISCVInstrInfo.td:309
+  def : Pat<(StoreOp GPR:$rs2, GPR:$rs1), (Inst GPR:$rs2, GPR:$rs1, 0)>;
+  def : Pat<(StoreOp GPR:$rs2, (add GPR:$rs1, simm12:$imm12)), (Inst GPR:$rs2, GPR:$rs1, simm12:$imm12)>;
+}
----------------
This line is too long.


https://reviews.llvm.org/D29934





More information about the llvm-commits mailing list