summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LoopUtils.cpp
diff options
context:
space:
mode:
authorSilviu Baranga <silviu.baranga@arm.com>2015-12-09 15:25:28 +0000
committerSilviu Baranga <silviu.baranga@arm.com>2015-12-09 15:25:28 +0000
commitad1ccb357b81d58e4fa15a4239ad5da7230a8d0d (patch)
treedbc9d96ca19238ced92ff053c15ffde9b80b829a /llvm/lib/Transforms/Utils/LoopUtils.cpp
parent4514a87c4d6b13c61902cec4211d8dde72af8b44 (diff)
downloadbcm5719-llvm-ad1ccb357b81d58e4fa15a4239ad5da7230a8d0d.tar.gz
bcm5719-llvm-ad1ccb357b81d58e4fa15a4239ad5da7230a8d0d.zip
Revert r255115 until we figure out how to fix the bot failures.
llvm-svn: 255117
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopUtils.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopUtils.cpp43
1 files changed, 0 insertions, 43 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp
index 091f14ebe9f..e03880526bf 100644
--- a/llvm/lib/Transforms/Utils/LoopUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp
@@ -727,46 +727,3 @@ SmallVector<Instruction *, 8> llvm::findDefsUsedOutsideOfLoop(Loop *L) {
return UsedOutside;
}
-
-PredicatedScalarEvolution::PredicatedScalarEvolution(ScalarEvolution &SE)
- : SE(SE), Generation(0) {}
-
-const SCEV *PredicatedScalarEvolution::getSCEV(Value *V) {
- const SCEV *Expr = SE.getSCEV(V);
- RewriteEntry &Entry = RewriteMap[Expr];
-
- // If we already have an entry and the version matches, return it.
- if (Entry.second && Generation == Entry.first)
- return Entry.second;
-
- // We found an entry but it's stale. Rewrite the stale entry
- // acording to the current predicate.
- if (Entry.second)
- Expr = Entry.second;
-
- const SCEV *NewSCEV = SE.rewriteUsingPredicate(Expr, Preds);
- Entry = {Generation, NewSCEV};
-
- return NewSCEV;
-}
-
-void PredicatedScalarEvolution::addPredicate(const SCEVPredicate &Pred) {
- if (Preds.implies(&Pred))
- return;
- Preds.add(&Pred);
- updateGeneration();
-}
-
-const SCEVUnionPredicate &PredicatedScalarEvolution::getUnionPredicate() const {
- return Preds;
-}
-
-void PredicatedScalarEvolution::updateGeneration() {
- // If the generation number wrapped recompute everything.
- if (++Generation == 0) {
- for (auto &II : RewriteMap) {
- const SCEV *Rewritten = II.second.second;
- II.second = {Generation, SE.rewriteUsingPredicate(Rewritten, Preds)};
- }
- }
-}
OpenPOWER on IntegriCloud