[llvm] r180197 - LoopVectorizer: Change variable name Stride to ConsecutiveStride
Arnold Schwaighofer
aschwaighofer at apple.com
Wed Apr 24 09:16:03 PDT 2013
Author: arnolds
Date: Wed Apr 24 11:16:03 2013
New Revision: 180197
URL: http://llvm.org/viewvc/llvm-project?rev=180197&view=rev
Log:
LoopVectorizer: Change variable name Stride to ConsecutiveStride
This makes it easier to read the code.
No functionality change.
Modified:
llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp?rev=180197&r1=180196&r2=180197&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Wed Apr 24 11:16:03 2013
@@ -964,10 +964,10 @@ void InnerLoopVectorizer::vectorizeMemor
// If the pointer is loop invariant or if it is non consecutive,
// scalarize the load.
- int Stride = Legal->isConsecutivePtr(Ptr);
- bool Reverse = Stride < 0;
+ int ConsecutiveStride = Legal->isConsecutivePtr(Ptr);
+ bool Reverse = ConsecutiveStride < 0;
bool UniformLoad = LI && Legal->isUniform(Ptr);
- if (Stride == 0 || UniformLoad)
+ if (!ConsecutiveStride || UniformLoad)
return scalarizeInstruction(Instr);
Constant *Zero = Builder.getInt32(0);
@@ -3562,11 +3562,11 @@ LoopVectorizationCostModel::getInstructi
TTI.getMemoryOpCost(I->getOpcode(), VectorTy, Alignment, AS);
// Scalarized loads/stores.
- int Stride = Legal->isConsecutivePtr(Ptr);
- bool Reverse = Stride < 0;
+ int ConsecutiveStride = Legal->isConsecutivePtr(Ptr);
+ bool Reverse = ConsecutiveStride < 0;
unsigned ScalarAllocatedSize = DL->getTypeAllocSize(ValTy);
unsigned VectorElementSize = DL->getTypeStoreSize(VectorTy)/VF;
- if (0 == Stride || ScalarAllocatedSize != VectorElementSize) {
+ if (!ConsecutiveStride || ScalarAllocatedSize != VectorElementSize) {
unsigned Cost = 0;
// The cost of extracting from the value vector and pointer vector.
Type *PtrTy = ToVectorTy(Ptr->getType(), VF);
More information about the llvm-commits
mailing list