diff options
author | Owen Anderson <resistor@mac.com> | 2007-07-16 21:52:50 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2007-07-16 21:52:50 +0000 |
commit | faac518ce0ae88a19f26b9aa9d34f6bf86ecb8c4 (patch) | |
tree | ec921ad0c2c4ec94bd031b3765b544bdd4b54ce4 /include/llvm/Analysis/MemoryDependenceAnalysis.h | |
parent | 1629a1fa87f8c32d6d33173d6d6e77dc4ed1ca4f (diff) |
Add support for walking up memory def chains, which enables finding many more
dead stores on 400.perlbench.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39929 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/MemoryDependenceAnalysis.h')
-rw-r--r-- | include/llvm/Analysis/MemoryDependenceAnalysis.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/include/llvm/Analysis/MemoryDependenceAnalysis.h b/include/llvm/Analysis/MemoryDependenceAnalysis.h index 00f5587d23..014922e155 100644 --- a/include/llvm/Analysis/MemoryDependenceAnalysis.h +++ b/include/llvm/Analysis/MemoryDependenceAnalysis.h @@ -35,7 +35,8 @@ class MemoryDependenceAnalysis : public FunctionPass { DenseMap<Instruction*, std::pair<Instruction*, bool> > depGraphLocal; std::multimap<Instruction*, Instruction*> reverseDep; - Instruction* getCallSiteDependency(CallSite C, bool local = true); + Instruction* getCallSiteDependency(CallSite C, Instruction* start, + bool local = true); public: static Instruction* NonLocal; @@ -60,8 +61,9 @@ class MemoryDependenceAnalysis : public FunctionPass { virtual void getAnalysisUsage(AnalysisUsage &AU) const; /// getDependency - Return the instruction on which a memory operation - /// depends. - Instruction* getDependency(Instruction* query, bool local = true); + /// depends, starting with start. + Instruction* getDependency(Instruction* query, Instruction* start = 0, + bool local = true); /// removeInstruction - Remove an instruction from the dependence analysis, /// updating the dependence of instructions that previously depended on it. |