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
This commit is contained in:
Owen Anderson 2007-09-09 21:43:49 +00:00
parent 2f5d5937ec
commit 7fad7e3db8

View File

@ -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;
}
} else
NumUncacheNonlocal++;
// 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;
}
// 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