[PATCH] D119316: [RISCV] Add a really basic cost model for SK_Splice.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 9 07:58:28 PST 2022
craig.topper added inline comments.
================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:168
+
+ unsigned Cost = 2; // vslidedown+vslideup.
+ // TODO: LMUL should increase cost.
----------------
ABataev wrote:
> 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.
This cost function is specific to scalable vectors, which I don't think SLP generates today. Will it in the future?
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