diff options
author | Owen Anderson <resistor@mac.com> | 2007-09-09 21:43:49 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2007-09-09 21:43:49 +0000 |
commit | 7fad7e3db87c80f18a449c44394ee32c4e2af136 (patch) | |
tree | e2a045098118cf993c968331a5bee4045a8683a6 /lib/Analysis/MemoryDependenceAnalysis.cpp | |
parent | 2f5d5937eccfaa17c01ab5136bfde20f2f6d767c (diff) | |
download | external_llvm-7fad7e3db87c80f18a449c44394ee32c4e2af136.zip external_llvm-7fad7e3db87c80f18a449c44394ee32c4e2af136.tar.gz external_llvm-7fad7e3db87c80f18a449c44394ee32c4e2af136.tar.bz2 |
Remove an un-needed dependence query. This improves compile time marginally on 401.bzip2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41792 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/MemoryDependenceAnalysis.cpp')
-rw-r--r-- | lib/Analysis/MemoryDependenceAnalysis.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp index 11a8009..3072a5c 100644 --- a/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -21,9 +21,15 @@ #include "llvm/Analysis/AliasAnalysis.h" #include "llvm/Support/CFG.h" #include "llvm/Target/TargetData.h" +#include "llvm/ADT/Statistic.h" + +#define DEBUG_TYPE "memdep" using namespace llvm; +STATISTIC(NumCacheNonlocal, "Number of cached non-local responses"); +STATISTIC(NumUncacheNonlocal, "Number of uncached non-local responses"); + char MemoryDependenceAnalysis::ID = 0; Instruction* const MemoryDependenceAnalysis::NonLocal = (Instruction*)-3; @@ -205,17 +211,12 @@ void MemoryDependenceAnalysis::getNonLocalDependency(Instruction* query, DenseMap<BasicBlock*, Value*>& resp) { if (depGraphNonLocal.count(query)) { resp = depGraphNonLocal[query]; + NumCacheNonlocal++; return; - } - - // First check that we don't actually have a local dependency. - Instruction* localDep = getDependency(query); - if (localDep != NonLocal) { - resp.insert(std::make_pair(query->getParent(),localDep)); - return; - } + } else + NumUncacheNonlocal++; - // If not, go ahead and search for non-local ones. + // If not, go ahead and search for non-local deps. nonLocalHelper(query, query->getParent(), resp); // Update the non-local dependency cache |