[llvm-commits] [llvm] r139036 - in /llvm/trunk: include/llvm/Analysis/ScalarEvolution.h lib/Analysis/ScalarEvolution.cpp
Andrew Trick
atrick at apple.com
Fri Sep 2 14:20:47 PDT 2011
Author: atrick
Date: Fri Sep 2 16:20:46 2011
New Revision: 139036
URL: http://llvm.org/viewvc/llvm-project?rev=139036&view=rev
Log:
Comment and clarifying assert.
Modified:
llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=139036&r1=139035&r2=139036&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Fri Sep 2 16:20:46 2011
@@ -319,8 +319,9 @@
const SCEV *getExact(ScalarEvolution *SE) const;
/// getExact - Return the number of times this loop exit may fall through
- /// to the back edge. The loop is guaranteed not to exit via this block
- /// before this number of iterations, but may exit via another block.
+ /// to the back edge, or SCEVCouldNotCompute. The loop is guaranteed not
+ /// to exit via this block before this number of iterations, but may exit
+ /// via another block.
const SCEV *getExact(BasicBlock *ExitingBlock, ScalarEvolution *SE) const;
/// getMax - Get the max backedge taken count for the loop.
Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=139036&r1=139035&r2=139036&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Fri Sep 2 16:20:46 2011
@@ -4090,6 +4090,7 @@
else
BECount = SE->getUMinFromMismatchedTypes(BECount, ENT->ExactNotTaken);
}
+ assert(BECount && "Invalid not taken count for loop exit");
return BECount;
}
More information about the llvm-commits
mailing list