[PATCH] Extend SLPVectorizer for cases where insertelement instructions must be rescheduled
Arnold Schwaighofer
aschwaighofer at apple.com
Wed Mar 26 08:55:01 PDT 2014
Please fix the formatting nitpicks and then this LGTM.
Thanks again for working on this!
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:371
@@ -371,1 +370,3 @@
+ /// reduction values do not need to be extracted.
+ void buildTree(ArrayRef<Value *> Roots, ValueSet *RdxOps = 0, bool RdxFreeExtract=false);
----------------
Please update the documentation string to refer to the boolean RdxFreeExtract.
Please fix formatting to match the style in this file. There should be spaces between assignment.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:551
@@ -546,1 +550,3 @@
+void BoUpSLP::buildTree(ArrayRef<Value *> Roots, ValueSet *Rdx, bool RdxFreeExtract) {
+ assert(!RdxFreeExtract||Rdx);
deleteTree();
----------------
Spaces.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:1975
@@ -1945,3 +1974,3 @@
/// \returns true if a value was vectorized.
- bool tryToVectorizeList(ArrayRef<Value *> VL, BoUpSLP &R);
+ bool tryToVectorizeList(ArrayRef<Value *> VL, BoUpSLP &R, InsertElementInst *IE=0, BoUpSLP::ValueSet *Inserts=0);
----------------
Spaces.
================
Comment at: lib/Transforms/Vectorize/SLPVectorizer.cpp:2148
@@ -2118,3 +2147,3 @@
-bool SLPVectorizer::tryToVectorizeList(ArrayRef<Value *> VL, BoUpSLP &R) {
+bool SLPVectorizer::tryToVectorizeList(ArrayRef<Value *> VL, BoUpSLP &R, InsertElementInst *IE, BoUpSLP::ValueSet* Inserts) {
if (VL.size() < 2)
----------------
Formatting: Pointer should be on the variable’s side: BoUpSLP::ValueSet *Inserts
http://llvm-reviews.chandlerc.com/D3143
More information about the llvm-commits
mailing list