[PATCH] D109368: [LV] Don't vectorize if we can prove RT + vector cost >= scalar cost.

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 27 02:12:20 PDT 2021


ebrevnov added a comment.

In D109368#3022623 <https://reviews.llvm.org/D109368#3022623>, @fhahn wrote:

> I am not sure what the trade-offs are to adding more VF independent cost-modeling there yet (drawbacks are adding even more global state to the cost model, increasing complexity).

Right, while cost of runtime-checks (at the moment) is VF independent we can decide not to do it inside cost model. Though conceptually it looks much more solid design when CostModel is responsible for the cost based decisions. And total code complexity will be even less than doing cost modeling in different places.

> I assume the motivation for moving it to the cost model is to allow using it when deciding on whether to vectorize given ScalarEpilogueStatus?

Right, cost of epilog depends on TC & VF. No excuse to do it outside cost model :-)

> I think that's best discussed separate with focus on that case.

Sure can do it later. But will have to do a restructure first (essentially move existing code inside CM) otherwise there will be nasty code duplication.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109368



More information about the llvm-commits mailing list