[PATCH] D139948: [RISCV] Add pass to remove W suffix from ADDIW and SLLIW to improve compressibility
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 18:43:28 PST 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.h:241
+
+// returns true if all uses of OrigMI only dependen on the lower word of its
+// output, so we can transform OrigMI to the corresponding W-version.
----------------
Capitalize `returns`
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.h:241
+
+// returns true if all uses of OrigMI only dependen on the lower word of its
+// output, so we can transform OrigMI to the corresponding W-version.
----------------
craig.topper wrote:
> Capitalize `returns`
dependen->depend
================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.h:243
+// output, so we can transform OrigMI to the corresponding W-version.
+// TODO: handle multiple interdependent transformations
+bool hasAllWUsers(const MachineInstr &MI, MachineRegisterInfo &MRI);
----------------
Move the TODO to the implementation
================
Comment at: llvm/lib/Target/RISCV/RISCVStripWSuffix.cpp:11
+// This pass removes the -w suffix from addiw and slliw instructions whenever
+// possible
+//
----------------
Missing period at end of sentence.
I think you can describe what "whenever possible" means.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139948/new/
https://reviews.llvm.org/D139948
More information about the llvm-commits
mailing list