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 | f2aa160b357c98d8c37b69ea9775aa3e097d1319 (patch) | |
tree | bad306be76337b3a4dac25790e1644b4682642cb /lib/Analysis/MemoryDependenceAnalysis.cpp | |
parent | bee98c66c0c3d1f43244cdf237e572a9df031e40 (diff) | |
download | external_llvm-f2aa160b357c98d8c37b69ea9775aa3e097d1319.zip external_llvm-f2aa160b357c98d8c37b69ea9775aa3e097d1319.tar.gz external_llvm-f2aa160b357c98d8c37b69ea9775aa3e097d1319.tar.bz2 |
A better fix for PR2503 that doesn't pessimize GVN in the presence of unreachable blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53032 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r-- | lib/Analysis/MemoryDependenceAnalysis.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp index 1cd16bb..2012ab4 100644 --- a/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/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; |