mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-15 16:38:41 +00:00
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
This commit is contained in:
parent
f21107c07a
commit
93dacadb46
@ -3358,19 +3358,19 @@ ScalarEvolution::getBackedgeTakenInfo(const Loop *L) {
|
|||||||
std::pair<std::map<const Loop *, BackedgeTakenInfo>::iterator, bool> Pair =
|
std::pair<std::map<const Loop *, BackedgeTakenInfo>::iterator, bool> Pair =
|
||||||
BackedgeTakenCounts.insert(std::make_pair(L, getCouldNotCompute()));
|
BackedgeTakenCounts.insert(std::make_pair(L, getCouldNotCompute()));
|
||||||
if (Pair.second) {
|
if (Pair.second) {
|
||||||
BackedgeTakenInfo ItCount = ComputeBackedgeTakenCount(L);
|
BackedgeTakenInfo BECount = ComputeBackedgeTakenCount(L);
|
||||||
if (ItCount.Exact != getCouldNotCompute()) {
|
if (BECount.Exact != getCouldNotCompute()) {
|
||||||
assert(ItCount.Exact->isLoopInvariant(L) &&
|
assert(BECount.Exact->isLoopInvariant(L) &&
|
||||||
ItCount.Max->isLoopInvariant(L) &&
|
BECount.Max->isLoopInvariant(L) &&
|
||||||
"Computed trip count isn't loop invariant for loop!");
|
"Computed backedge-taken count isn't loop invariant for loop!");
|
||||||
++NumTripCountsComputed;
|
++NumTripCountsComputed;
|
||||||
|
|
||||||
// Update the value in the map.
|
// Update the value in the map.
|
||||||
Pair.first->second = ItCount;
|
Pair.first->second = BECount;
|
||||||
} else {
|
} else {
|
||||||
if (ItCount.Max != getCouldNotCompute())
|
if (BECount.Max != getCouldNotCompute())
|
||||||
// Update the value in the map.
|
// Update the value in the map.
|
||||||
Pair.first->second = ItCount;
|
Pair.first->second = BECount;
|
||||||
if (isa<PHINode>(L->getHeader()->begin()))
|
if (isa<PHINode>(L->getHeader()->begin()))
|
||||||
// Only count loops that have phi nodes as not being computable.
|
// Only count loops that have phi nodes as not being computable.
|
||||||
++NumTripCountsNotComputed;
|
++NumTripCountsNotComputed;
|
||||||
@ -3381,7 +3381,7 @@ ScalarEvolution::getBackedgeTakenInfo(const Loop *L) {
|
|||||||
// conservative estimates made without the benefit of trip count
|
// conservative estimates made without the benefit of trip count
|
||||||
// information. This is similar to the code in forgetLoop, except that
|
// information. This is similar to the code in forgetLoop, except that
|
||||||
// it handles SCEVUnknown PHI nodes specially.
|
// it handles SCEVUnknown PHI nodes specially.
|
||||||
if (ItCount.hasAnyInfo()) {
|
if (BECount.hasAnyInfo()) {
|
||||||
SmallVector<Instruction *, 16> Worklist;
|
SmallVector<Instruction *, 16> Worklist;
|
||||||
PushLoopPHIs(L, Worklist);
|
PushLoopPHIs(L, Worklist);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user