diff options
| author | James Molloy <james.molloy@arm.com> | 2014-10-03 09:29:24 +0000 |
|---|---|---|
| committer | James Molloy <james.molloy@arm.com> | 2014-10-03 09:29:24 +0000 |
| commit | cb7449d0582991c5d788e3328f0c6e0b3048526e (patch) | |
| tree | 3dec59aa376c53ea9f31055baf0a6007b6b55378 /llvm/lib/Analysis | |
| parent | 9e3c7cbfa19fca397682c87271a7b63566c67a8a (diff) | |
| download | bcm5719-llvm-cb7449d0582991c5d788e3328f0c6e0b3048526e.tar.gz bcm5719-llvm-cb7449d0582991c5d788e3328f0c6e0b3048526e.zip | |
Revert r215343.
This was contentious and needs invesigation.
llvm-svn: 218971
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/LazyValueInfo.cpp | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp index 961fb0f7aef..414aaab265a 100644 --- a/llvm/lib/Analysis/LazyValueInfo.cpp +++ b/llvm/lib/Analysis/LazyValueInfo.cpp @@ -545,31 +545,7 @@ bool LazyValueInfoCache::solveBlockValue(Value *Val, BasicBlock *BB) { // cache needs updating, i.e. if we have solve a new value or not. OverDefinedCacheUpdater ODCacheUpdater(Val, BB, BBLV, this); - // Once this BB is encountered, Val's value for this BB will not be Undefined - // any longer. When we encounter this BB again, if Val's value is Overdefined, - // we need to compute its value again. - // - // For example, considering this control flow, - // BB1->BB2, BB1->BB3, BB2->BB3, BB2->BB4 - // - // Suppose we have "icmp slt %v, 0" in BB1, and "icmp sgt %v, 0" in BB3. At - // the very beginning, when analyzing edge BB2->BB3, we don't know %v's value - // in BB2, and the data flow algorithm tries to compute BB2's predecessors, so - // then we know %v has negative value on edge BB1->BB2. And then we return to - // check BB2 again, and at this moment BB2 has Overdefined value for %v in - // BB2. So we should have to follow data flow propagation algorithm to get the - // value on edge BB1->BB2 propagated to BB2, and finally %v on BB2 has a - // constant range describing a negative value. - // - // In the mean time, limit the number of additional lowering lattice value to - // avoid unjustified memory grows. - - if (LoweringOverdefinedTimes.count(BB) == 0) - LoweringOverdefinedTimes.insert(std::make_pair(BB, 0)); - if ((!BBLV.isUndefined() && !BBLV.isOverdefined()) || - (BBLV.isOverdefined() && - (LoweringOverdefinedTimes[BB] > OverdefinedThreshold || - LoweringOverdefinedTimes.size() > OverdefinedBBThreshold))) { + if (!BBLV.isUndefined()) { DEBUG(dbgs() << " reuse BB '" << BB->getName() << "' val=" << BBLV <<'\n'); // Since we're reusing a cached value here, we don't need to update the |

