summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2017-07-28 03:25:07 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2017-07-28 03:25:07 +0000
commit843ab57457f546ef445937433a177b1e8c09a82a (patch)
tree954e2765c493dd036bc2f5b9a56a21c551a528db /llvm/lib
parent809d708b8af56391c448b72b49eedae650b98e83 (diff)
downloadbcm5719-llvm-843ab57457f546ef445937433a177b1e8c09a82a.tar.gz
bcm5719-llvm-843ab57457f546ef445937433a177b1e8c09a82a.zip
Revert "[SCEV] Cache results of computeExitLimit"
This reverts commit r309080. The patch needs to clear out the ScalarEvolution::ExitLimits cache in forgetMemoizedResults. I've replied on the commit thread for the patch with more details. llvm-svn: 309357
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/ScalarEvolution.cpp21
1 files changed, 0 insertions, 21 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
index b7421aa3c0d..4d7b59c4763 100644
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
+++ b/llvm/lib/Analysis/ScalarEvolution.cpp
@@ -6257,14 +6257,6 @@ void ScalarEvolution::forgetLoop(const Loop *L) {
PushDefUseChildren(I, Worklist);
}
- for (auto I = ExitLimits.begin(); I != ExitLimits.end();) {
- auto &Query = I->first;
- if (Query.L == L)
- ExitLimits.erase(I++);
- else
- ++I;
- }
-
// Forget all contained loops too, to avoid dangling entries in the
// ValuesAtScopes map.
for (Loop *I : *L)
@@ -6527,18 +6519,6 @@ ScalarEvolution::computeBackedgeTakenCount(const Loop *L,
ScalarEvolution::ExitLimit
ScalarEvolution::computeExitLimit(const Loop *L, BasicBlock *ExitingBlock,
bool AllowPredicates) {
- ExitLimitQuery Query(L, ExitingBlock, AllowPredicates);
- auto MaybeEL = ExitLimits.find(Query);
- if (MaybeEL != ExitLimits.end())
- return MaybeEL->second;
- ExitLimit EL = computeExitLimitImpl(L, ExitingBlock, AllowPredicates);
- ExitLimits.insert({Query, EL});
- return EL;
-}
-
-ScalarEvolution::ExitLimit
-ScalarEvolution::computeExitLimitImpl(const Loop *L, BasicBlock *ExitingBlock,
- bool AllowPredicates) {
// Okay, we've chosen an exiting block. See what condition causes us to exit
// at this block and remember the exit block and whether all other targets
@@ -10402,7 +10382,6 @@ ScalarEvolution::ScalarEvolution(ScalarEvolution &&Arg)
BackedgeTakenCounts(std::move(Arg.BackedgeTakenCounts)),
PredicatedBackedgeTakenCounts(
std::move(Arg.PredicatedBackedgeTakenCounts)),
- ExitLimits(std::move(Arg.ExitLimits)),
ConstantEvolutionLoopExitValue(
std::move(Arg.ConstantEvolutionLoopExitValue)),
ValuesAtScopes(std::move(Arg.ValuesAtScopes)),
OpenPOWER on IntegriCloud