[PATCH] D113798: Add loop unrolling and peeling preferences for RISCV

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 15 09:21:14 PST 2021


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:217
+
+      SmallVector<const Value *, 4> Operands(I.operand_values());
+      Cost +=
----------------
craig.topper wrote:
> mcberg2021 wrote:
> > frasercrmck wrote:
> > > Does the explicit size of `4` help much or should we just use `SmallVector<const Value*>`?
> > This setting mirrors SLP's generic vector operand setting, which we utilize, so it does seem appropriate.
> This was also copied from ARM.
This shouldn't be mirroring anything. The ARM code I copied from pre-dates SmallVector's ability to automatically pick a value for the second template parameter. I think it will automatically pick a value more than 4. So I think the second parameter can be removed.


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

https://reviews.llvm.org/D113798



More information about the llvm-commits mailing list