[llvm] r247140 - Rename ExitCount to BackedgeTakenCount, because that's what it is.
James Molloy via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 9 05:51:10 PDT 2015
Author: jamesm
Date: Wed Sep 9 07:51:10 2015
New Revision: 247140
URL: http://llvm.org/viewvc/llvm-project?rev=247140&view=rev
Log:
Rename ExitCount to BackedgeTakenCount, because that's what it is.
We called a variable ExitCount, stored the backedge count in it, then redefined it to be the exit count again.
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=247140&r1=247139&r2=247140&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp Wed Sep 9 07:51:10 2015
@@ -2605,8 +2605,8 @@ Value *InnerLoopVectorizer::getOrCreateT
IRBuilder<> Builder(L->getLoopPreheader()->getTerminator());
// Find the loop boundaries.
- const SCEV *ExitCount = SE->getBackedgeTakenCount(OrigLoop);
- assert(ExitCount != SE->getCouldNotCompute() && "Invalid loop count");
+ const SCEV *BackedgeTakenCount = SE->getBackedgeTakenCount(OrigLoop);
+ assert(BackedgeTakenCount != SE->getCouldNotCompute() && "Invalid loop count");
Type *IdxTy = Legal->getWidestInductionType();
@@ -2615,14 +2615,15 @@ Value *InnerLoopVectorizer::getOrCreateT
// compare. The only way that we get a backedge taken count is that the
// induction variable was signed and as such will not overflow. In such a case
// truncation is legal.
- if (ExitCount->getType()->getPrimitiveSizeInBits() >
+ if (BackedgeTakenCount->getType()->getPrimitiveSizeInBits() >
IdxTy->getPrimitiveSizeInBits())
- ExitCount = SE->getTruncateOrNoop(ExitCount, IdxTy);
-
- const SCEV *BackedgeTakeCount = SE->getNoopOrZeroExtend(ExitCount, IdxTy);
+ BackedgeTakenCount = SE->getTruncateOrNoop(BackedgeTakenCount, IdxTy);
+ BackedgeTakenCount = SE->getNoopOrZeroExtend(BackedgeTakenCount, IdxTy);
+
// Get the total trip count from the count by adding 1.
- ExitCount = SE->getAddExpr(BackedgeTakeCount,
- SE->getConstant(BackedgeTakeCount->getType(), 1));
+ const SCEV *ExitCount =
+ SE->getAddExpr(BackedgeTakenCount,
+ SE->getConstant(BackedgeTakenCount->getType(), 1));
const DataLayout &DL = L->getHeader()->getModule()->getDataLayout();
More information about the llvm-commits
mailing list