OSDN Git Service

[SLP] General improvements of SLP vectorization process.
authorAlexey Bataev <a.bataev@hotmail.com>
Mon, 7 Aug 2017 15:25:49 +0000 (15:25 +0000)
committerAlexey Bataev <a.bataev@hotmail.com>
Mon, 7 Aug 2017 15:25:49 +0000 (15:25 +0000)
commita64c8c9af1e39628793f57b7a5af753a8aa3309d
tree37931a4333d66e6905d433c00f15520954f76447
parentaa4edb1422205d22c9d7fe2d1b08270ee95fe288
[SLP] General improvements of SLP vectorization process.

Patch tries to improve two-pass vectorization analysis, existing in SLP vectorizer. What it does:

1. Defines key nodes, that are the vectorization roots. Previously vectorization started if StoreInst or ReturnInst is found. For now, the vectorization started for all Instructions with no users and void types (Terminators, StoreInst) + CallInsts.
2. CmpInsts, InsertElementInsts and InsertValueInsts are stored in the
array. This array is processed only after the vectorization of the
first-after-these instructions key node is finished. Vectorization goes
in reverse order to try to vectorize as much code as possible.

Reviewers: mzolotukhin, Ayal, mkuper, gilr, hfinkel, RKSimon

Subscribers: ashahid, anemet, RKSimon, mssimpso, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310260 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Vectorize/SLPVectorizer.h
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/AArch64/gather-root.ll
test/Transforms/SLPVectorizer/X86/horizontal.ll
test/Transforms/SLPVectorizer/X86/insert-element-build-vector.ll