diff options
| author | Owen Anderson <resistor@mac.com> | 2008-07-02 17:20:16 +0000 | 
|---|---|---|
| committer | Owen Anderson <resistor@mac.com> | 2008-07-02 17:20:16 +0000 | 
| commit | b22a640fe4385eae5d26a7bf1069fea8507424f3 (patch) | |
| tree | 068aa23c6ccbeb579a9d6a50bea02e359ce7a439 /llvm/lib/Analysis | |
| parent | 4b7c1acf26b85bda27e73c497fedf6a47c9d1824 (diff) | |
| download | bcm5719-llvm-b22a640fe4385eae5d26a7bf1069fea8507424f3.tar.gz bcm5719-llvm-b22a640fe4385eae5d26a7bf1069fea8507424f3.zip | |
A better fix for PR2503 that doesn't pessimize GVN in the presence of unreachable blocks.
llvm-svn: 53032
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/MemoryDependenceAnalysis.cpp | 13 | 
1 files changed, 0 insertions, 13 deletions
| diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp index 1cd16bb06de..2012ab473c9 100644 --- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -19,7 +19,6 @@  #include "llvm/Instructions.h"  #include "llvm/Function.h"  #include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/Analysis/Dominators.h"  #include "llvm/Support/CFG.h"  #include "llvm/Support/CommandLine.h"  #include "llvm/Target/TargetData.h" @@ -83,7 +82,6 @@ void MemoryDependenceAnalysis::getAnalysisUsage(AnalysisUsage &AU) const {    AU.setPreservesAll();    AU.addRequiredTransitive<AliasAnalysis>();    AU.addRequiredTransitive<TargetData>(); -  AU.addRequiredTransitive<DominatorTree>();  }  /// getCallSiteDependency - Private helper for finding the local dependencies @@ -224,17 +222,6 @@ void MemoryDependenceAnalysis::nonLocalHelper(Instruction* query,        continue;      } -    // Don't recur upwards if the current block is unreachable. -    // Instead, mark it as having no dependency on this path, -    // which will block optzns from occuring.  For this reason, -    // eliminating unreachable blocks before running a memdep -    // based optimization is recommended. -    DominatorTree& DT = getAnalysis<DominatorTree>(); -    if (!DT.isReachableFromEntry(BB)) { -      resp.insert(std::make_pair(BB, None)); -      continue; -    } -          // If we didn't find anything, recurse on the precessors of this block      // Only do this for blocks with a small number of predecessors.      bool predOnStack = false; | 

