diff options
| author | Dan Gohman <gohman@apple.com> | 2010-01-26 16:46:18 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-01-26 16:46:18 +0000 |
| commit | a91d48c9d44dc9420244f802ab7ef259c52df81f (patch) | |
| tree | 21d4b6b44aae8a56605738d57db2f4b188138adb /lib/Analysis/ScalarEvolution.cpp | |
| parent | d501cd7cf44fac060b3364c9c227474172f78bfd (diff) | |
| download | external_llvm-a91d48c9d44dc9420244f802ab7ef259c52df81f.zip external_llvm-a91d48c9d44dc9420244f802ab7ef259c52df81f.tar.gz external_llvm-a91d48c9d44dc9420244f802ab7ef259c52df81f.tar.bz2 | |
Rename ItCount to BECount, since it holds a backedge-taken count rather
than an iteration count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94549 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
| -rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index b875543..9f649ed 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -3358,19 +3358,19 @@ ScalarEvolution::getBackedgeTakenInfo(const Loop *L) { std::pair<std::map<const Loop *, BackedgeTakenInfo>::iterator, bool> Pair = BackedgeTakenCounts.insert(std::make_pair(L, getCouldNotCompute())); if (Pair.second) { - BackedgeTakenInfo ItCount = ComputeBackedgeTakenCount(L); - if (ItCount.Exact != getCouldNotCompute()) { - assert(ItCount.Exact->isLoopInvariant(L) && - ItCount.Max->isLoopInvariant(L) && - "Computed trip count isn't loop invariant for loop!"); + BackedgeTakenInfo BECount = ComputeBackedgeTakenCount(L); + if (BECount.Exact != getCouldNotCompute()) { + assert(BECount.Exact->isLoopInvariant(L) && + BECount.Max->isLoopInvariant(L) && + "Computed backedge-taken count isn't loop invariant for loop!"); ++NumTripCountsComputed; // Update the value in the map. - Pair.first->second = ItCount; + Pair.first->second = BECount; } else { - if (ItCount.Max != getCouldNotCompute()) + if (BECount.Max != getCouldNotCompute()) // Update the value in the map. - Pair.first->second = ItCount; + Pair.first->second = BECount; if (isa<PHINode>(L->getHeader()->begin())) // Only count loops that have phi nodes as not being computable. ++NumTripCountsNotComputed; @@ -3381,7 +3381,7 @@ ScalarEvolution::getBackedgeTakenInfo(const Loop *L) { // conservative estimates made without the benefit of trip count // information. This is similar to the code in forgetLoop, except that // it handles SCEVUnknown PHI nodes specially. - if (ItCount.hasAnyInfo()) { + if (BECount.hasAnyInfo()) { SmallVector<Instruction *, 16> Worklist; PushLoopPHIs(L, Worklist); |
