diff options
author | Dan Gohman <gohman@apple.com> | 2009-04-30 20:48:53 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-04-30 20:48:53 +0000 |
commit | fa066ef136e02c5191f776ce7acffbe967ef017c (patch) | |
tree | 9c31a3a226bebb65eeb06ea5ecd7886b9095f75e /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | 2b8da35f9d2fbcfd7ec671a2312b53858f62f4da (diff) | |
download | bcm5719-llvm-fa066ef136e02c5191f776ce7acffbe967ef017c.tar.gz bcm5719-llvm-fa066ef136e02c5191f776ce7acffbe967ef017c.zip |
Add some comments, and tidy up some whitespace.
llvm-svn: 70510
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 252eabe2f26..fbfb0308e34 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -2986,8 +2986,9 @@ SCEVHandle ScalarEvolution::HowFarToNonZero(SCEV *V, const Loop *L) { /// BasicBlock * ScalarEvolution::getPredecessorWithUniqueSuccessorForBB(BasicBlock *BB) { - // If the block has a unique predecessor, the predecessor must have - // no other successors from which BB is reachable. + // If the block has a unique predecessor, then there is no path from the + // predecessor to the block that does not go through the direct edge + // from the predecessor to the block. if (BasicBlock *Pred = BB->getSinglePredecessor()) return Pred; @@ -3002,10 +3003,11 @@ ScalarEvolution::getPredecessorWithUniqueSuccessorForBB(BasicBlock *BB) { } /// isLoopGuardedByCond - Test whether entry to the loop is protected by -/// a conditional between LHS and RHS. +/// a conditional between LHS and RHS. This is used to help avoid max +/// expressions in loop trip counts. bool ScalarEvolution::isLoopGuardedByCond(const Loop *L, - ICmpInst::Predicate Pred, - SCEV *LHS, SCEV *RHS) { + ICmpInst::Predicate Pred, + SCEV *LHS, SCEV *RHS) { BasicBlock *Preheader = L->getLoopPreheader(); BasicBlock *PreheaderDest = L->getHeader(); |