aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Vectorize/LoopVectorize.h
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-12-26 19:08:17 +0000
committerNadav Rotem <nrotem@apple.com>2012-12-26 19:08:17 +0000
commit13eb1e7817be11ea84be6571dce827a77bc9640b (patch)
treeca209e4b4e90751bc936b3a5dc4bc9be739b5390 /lib/Transforms/Vectorize/LoopVectorize.h
parentf1a26cf9df900101b9cbea42b67f7466edc7deed (diff)
LoopVectorizer: Optimize the vectorization of consecutive memory access when the iteration step is -1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171114 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Vectorize/LoopVectorize.h')
-rw-r--r--lib/Transforms/Vectorize/LoopVectorize.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/Transforms/Vectorize/LoopVectorize.h b/lib/Transforms/Vectorize/LoopVectorize.h
index 0e5ecabec0..38d62f1b37 100644
--- a/lib/Transforms/Vectorize/LoopVectorize.h
+++ b/lib/Transforms/Vectorize/LoopVectorize.h
@@ -161,6 +161,9 @@ private:
/// vectors of ones and zeros for the reduction code.
Constant* getUniformVector(unsigned Val, Type* ScalarTy);
+ /// Generate a shuffle sequence that will reverse the vector Vec.
+ Value *reverseVector(Value *Vec);
+
typedef DenseMap<Value*, Value*> ValueMap;
/// The original loop.
@@ -331,7 +334,11 @@ public:
/// when the last index of the GEP is the induction variable, or that the
/// pointer itself is an induction variable.
/// This check allows us to vectorize A[idx] into a wide load/store.
- bool isConsecutivePtr(Value *Ptr);
+ /// Returns:
+ /// 0 - Stride is unknown or non consecutive.
+ /// 1 - Address is consecutive.
+ /// -1 - Address is consecutive, and decreasing.
+ int isConsecutivePtr(Value *Ptr);
/// Returns true if the value V is uniform within the loop.
bool isUniform(Value *V);