summaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2007-08-16 21:27:05 +0000
committerOwen Anderson <resistor@mac.com>2007-08-16 21:27:05 +0000
commit4d13de4e3bfc5121207efd01e1b31caa6bb4e40b (patch)
tree0371940ab6fd369f8f377513679cf6fd433d78a5 /include/llvm/Analysis
parentfe8e14a6c99261cfe9238c35761083cb4c99cc6a (diff)
downloadexternal_llvm-4d13de4e3bfc5121207efd01e1b31caa6bb4e40b.zip
external_llvm-4d13de4e3bfc5121207efd01e1b31caa6bb4e40b.tar.gz
external_llvm-4d13de4e3bfc5121207efd01e1b31caa6bb4e40b.tar.bz2
Cache non-local memory dependence analysis. This is a significant compile
time performance win in most cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41126 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r--include/llvm/Analysis/MemoryDependenceAnalysis.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/llvm/Analysis/MemoryDependenceAnalysis.h b/include/llvm/Analysis/MemoryDependenceAnalysis.h
index 0b8dec8..067bbcb 100644
--- a/include/llvm/Analysis/MemoryDependenceAnalysis.h
+++ b/include/llvm/Analysis/MemoryDependenceAnalysis.h
@@ -37,12 +37,20 @@ class MemoryDependenceAnalysis : public FunctionPass {
depMapType;
depMapType depGraphLocal;
+ // A map from instructions to their non-local dependencies.
+ typedef DenseMap<Instruction*, DenseMap<BasicBlock*, Value*> >
+ nonLocalDepMapType;
+ nonLocalDepMapType depGraphNonLocal;
+
// A reverse mapping form dependencies to the dependees. This is
// used when removing instructions to keep the cache coherent.
- typedef DenseMap<Instruction*, SmallPtrSet<Instruction*, 4> >
+ typedef DenseMap<Value*, SmallPtrSet<Instruction*, 4> >
reverseDepMapType;
reverseDepMapType reverseDep;
+ // A reverse mapping form dependencies to the non-local dependees.
+ reverseDepMapType reverseDepNonLocal;
+
public:
// Special marker indicating that the query has no dependency
// in the specified block.
@@ -61,7 +69,9 @@ class MemoryDependenceAnalysis : public FunctionPass {
/// Clean up memory in between runs
void releaseMemory() {
depGraphLocal.clear();
+ depGraphNonLocal.clear();
reverseDep.clear();
+ reverseDepNonLocal.clear();
}
/// getAnalysisUsage - Does not modify anything. It uses Value Numbering