OSDN Git Service

[VPlan, SLP] Add simple SLP analysis on top of VPlan.
authorFlorian Hahn <florian.hahn@arm.com>
Wed, 14 Nov 2018 13:11:49 +0000 (13:11 +0000)
committerFlorian Hahn <florian.hahn@arm.com>
Wed, 14 Nov 2018 13:11:49 +0000 (13:11 +0000)
commit5d6a2d85c2c8f278e2085526b2d2370d6eae694c
tree10fb8e8f00c16ad4624aecbf82ab652d8bf5a426
parent1959ce6f3e01241919968ac1911fd45660239d23
[VPlan, SLP] Add simple SLP analysis on top of VPlan.

This patch adds an initial implementation of the look-ahead SLP tree
construction described in 'Look-Ahead SLP: Auto-vectorization in the Presence
of Commutative Operations, CGO 2018 by Vasileios Porpodas, Rodrigo C. O. Rocha,
Luís F. W. Góes'.

It returns an SLP tree represented as VPInstructions, with combined
instructions represented as a single, wider VPInstruction.

This initial version does not support instructions with multiple
different users (either inside or outside the SLP tree) or
non-instruction operands; it won't generate any shuffles or
insertelement instructions.

It also just adds the analysis that builds an SLP tree rooted in a set
of stores. It does not include any cost modeling or memory legality
checks. The plan is to integrate it with VPlan based cost modeling, once
available and to only apply it to operations that can be widened.

A follow-up patch will add a support for replacing instructions in a
VPlan with their SLP counter parts.

Reviewers: Ayal, mssimpso, rengolin, mkuper, hfinkel, hsaito, dcaballe, vporpo, RKSimon, ABataev

Reviewed By: rengolin

Differential Revision: https://reviews.llvm.org/D4949

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@346857 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/CMakeLists.txt
lib/Transforms/Vectorize/VPlan.cpp
lib/Transforms/Vectorize/VPlan.h
lib/Transforms/Vectorize/VPlanSLP.cpp [new file with mode: 0644]
lib/Transforms/Vectorize/VPlanValue.h
unittests/Transforms/Vectorize/CMakeLists.txt
unittests/Transforms/Vectorize/VPlanSlpTest.cpp [new file with mode: 0644]