diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-29 03:47:00 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-29 03:47:00 +0000 |
commit | 5391a1d8046396fb4dd005b1910973789f5427f4 (patch) | |
tree | dd2a5dc79b55d0f0e685d466973ba182619feba1 /include/llvm/Analysis/MemoryDependenceAnalysis.h | |
parent | 411052bb96fb4a30035de6cafa492fa4f598e824 (diff) |
Split getDependency into getDependency and getDependencyFrom, the
former does caching, the later doesn't. This dramatically simplifies
the logic in getDependency and getDependencyFrom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60234 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/MemoryDependenceAnalysis.h')
-rw-r--r-- | include/llvm/Analysis/MemoryDependenceAnalysis.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/llvm/Analysis/MemoryDependenceAnalysis.h b/include/llvm/Analysis/MemoryDependenceAnalysis.h index 618a18ba92..28548229a4 100644 --- a/include/llvm/Analysis/MemoryDependenceAnalysis.h +++ b/include/llvm/Analysis/MemoryDependenceAnalysis.h @@ -14,6 +14,7 @@ #ifndef LLVM_ANALYSIS_MEMORY_DEPENDENCE_H #define LLVM_ANALYSIS_MEMORY_DEPENDENCE_H +#include "llvm/BasicBlock.h" #include "llvm/Pass.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallPtrSet.h" @@ -156,9 +157,15 @@ namespace llvm { virtual void getAnalysisUsage(AnalysisUsage &AU) const; /// getDependency - Return the instruction on which a memory operation - /// depends, starting with start. - MemDepResult getDependency(Instruction *query, Instruction *start = 0, - BasicBlock *block = 0); + /// depends. + MemDepResult getDependency(Instruction *QueryInst); + + /// getDependencyFrom - Return the instruction on which the memory operation + /// 'QueryInst' depends. This starts scanning from the instruction before + /// the position indicated by ScanIt. + MemDepResult getDependencyFrom(Instruction *QueryInst, + BasicBlock::iterator ScanIt, BasicBlock *BB); + /// getNonLocalDependency - Fills the passed-in map with the non-local /// dependencies of the queries. The map will contain NonLocal for @@ -199,8 +206,8 @@ namespace llvm { /// in our internal data structures. void verifyRemoved(Instruction *Inst) const; - MemDepResult getCallSiteDependency(CallSite C, Instruction* start, - BasicBlock* block); + MemDepResult getCallSiteDependency(CallSite C, BasicBlock::iterator ScanIt, + BasicBlock *BB); void nonLocalHelper(Instruction* query, BasicBlock* block, DenseMap<BasicBlock*, DepResultTy> &resp); }; |