[PATCH] D119316: [RISCV] Add a really basic cost model for SK_Splice.

Alexey Bataev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 9 07:55:34 PST 2022


ABataev added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:168
+
+  unsigned Cost = 2; // vslidedown+vslideup.
+  // TODO: LMUL should increase cost.
----------------
craig.topper wrote:
> ABataev wrote:
> > Shall we include the cost of extra calculations for slidedown+slideup offsets?
> Other than the vsetvlis, the read of vlenb and the addi end up being loop invariant and hoisted by LICM.
> 
> Should we cost all of the instructions? Should we cost the vsetvlis?
That's the question I'm asking myself. It may be not important for Loop Optimizer but important for SLP. Would be good to have a call (or a flag) for this kind of overhead.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D119316



More information about the llvm-commits mailing list