diff options
author | Owen Anderson <resistor@mac.com> | 2007-08-16 21:27:05 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2007-08-16 21:27:05 +0000 |
commit | 4d13de4e3bfc5121207efd01e1b31caa6bb4e40b (patch) | |
tree | 0371940ab6fd369f8f377513679cf6fd433d78a5 /include/llvm/Analysis | |
parent | fe8e14a6c99261cfe9238c35761083cb4c99cc6a (diff) | |
download | external_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.h | 12 |
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 |