Comment and clarifying assert.
authorAndrew Trick <atrick@apple.com>
Fri, 2 Sep 2011 21:20:46 +0000 (21:20 +0000)
committerAndrew Trick <atrick@apple.com>
Fri, 2 Sep 2011 21:20:46 +0000 (21:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139036 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/ScalarEvolution.h
lib/Analysis/ScalarEvolution.cpp

index 6e30b3177149296369ff48153eac7d8b20ef45cb..f249bcf8c5ddb88182f6514c7b4362ba8b5264cb 100644 (file)
@@ -319,8 +319,9 @@ namespace llvm {
       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.
index 202e715aba30003c6386ef9cc468f8c483e3904e..8859c3b22fbe62c64a738dfa70d88a1424bf835b 100644 (file)
@@ -4090,6 +4090,7 @@ ScalarEvolution::BackedgeTakenInfo::getExact(ScalarEvolution *SE) const {
     else
       BECount = SE->getUMinFromMismatchedTypes(BECount, ENT->ExactNotTaken);
   }
+  assert(BECount && "Invalid not taken count for loop exit");
   return BECount;
 }