[PATCH] D28975: [LV] Introducing VPlan to model the vectorized code and drive its transformation

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 23 13:14:34 PST 2017


Ayal added a comment.

Hi Jonas and Renato,

In https://reviews.llvm.org/D28975#684462, @rengolin wrote:

> In https://reviews.llvm.org/D28975#684385, @jonpa wrote:
>
> > I have been working with improving cost estimates in the LoopVectorizer a bit. I wonder if VPlan will improve cost estimation for different VFs, including 1?
>
>
> Hi Jonas,
>
> AFAICT, VPlan is completely orthogonal to the cost computation, ie. the exact same cost functions will be used (including 1).


Improving the "accuracy" of TTI's cost estimates for IR patterns is indeed an orthogonal effort. VPlan is designed to provide an explicit representation of the IR patterns that the vectorizer plans to emit, for all VF's under consideration. This includes representing scalarized instructions, vectorized instructions, packing/unpacked instructions and where they are placed, as well as idioms such as interleave-groups. Doing so will help provide a more "consistent", "reliable" and straightforward cost computation. The plan is to introduce VPlan incrementally, starting with this patch driving the transformation, to be followed by having VPlan also drive the cost computation.

Determining where to best draw the line between scalarized and vectorized instructions is indeed an interesting challenge, cf. the work on Throttled SLP.


https://reviews.llvm.org/D28975





More information about the llvm-commits mailing list