From 4d13de4e3bfc5121207efd01e1b31caa6bb4e40b Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Thu, 16 Aug 2007 21:27:05 +0000 Subject: 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 --- include/llvm/Analysis/MemoryDependenceAnalysis.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/llvm/Analysis/MemoryDependenceAnalysis.h b/include/llvm/Analysis/MemoryDependenceAnalysis.h index 0b8dec8310..067bbcb8bc 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 > + nonLocalDepMapType; + nonLocalDepMapType depGraphNonLocal; + // A reverse mapping form dependencies to the dependees. This is // used when removing instructions to keep the cache coherent. - typedef DenseMap > + typedef DenseMap > 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 -- cgit v1.2.3-70-g09d2