[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 08:11:11 PST 2022
ABataev accepted this revision.
ABataev added a comment.
This revision is now accepted and ready to land.
LG
================
Comment at: llvm/lib/Target/RISCV/RISCVTargetTransformInfo.cpp:168
+
+ unsigned Cost = 2; // vslidedown+vslideup.
+ // TODO: LMUL should increase cost.
----------------
craig.topper wrote:
> 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?
Maybe. But ok, let's move ahead with this estimation for now.
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