diff options
author | Chris Lattner <sabre@nondot.org> | 2008-12-07 00:35:51 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-12-07 00:35:51 +0000 |
commit | e765305d65e2604d7f7ce202ffdfd4b6c3adb966 (patch) | |
tree | 2c5dd93f75c5ecb94774cf0a46032a6c6290251c | |
parent | 3ac60821e283673c709e52368eb1a7c70704ef5a (diff) | |
download | external_llvm-e765305d65e2604d7f7ce202ffdfd4b6c3adb966.zip external_llvm-e765305d65e2604d7f7ce202ffdfd4b6c3adb966.tar.gz external_llvm-e765305d65e2604d7f7ce202ffdfd4b6c3adb966.tar.bz2 |
Rename getCallSiteDependency -> getCallSiteDependencyFrom to
emphasize the scanning and make it more similar to
getDependencyFrom
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60642 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Analysis/MemoryDependenceAnalysis.h | 8 | ||||
-rw-r--r-- | lib/Analysis/MemoryDependenceAnalysis.cpp | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/include/llvm/Analysis/MemoryDependenceAnalysis.h b/include/llvm/Analysis/MemoryDependenceAnalysis.h index 00c3755..e61a431 100644 --- a/include/llvm/Analysis/MemoryDependenceAnalysis.h +++ b/include/llvm/Analysis/MemoryDependenceAnalysis.h @@ -223,18 +223,16 @@ namespace llvm { /// getDependencyFrom - Return the instruction on which the memory operation /// 'QueryInst' depends. This starts scanning from the instruction before /// the position indicated by ScanIt. - /// - /// Note that this method does no caching at all. You should use - /// getDependency where possible. MemDepResult getDependencyFrom(Instruction *QueryInst, BasicBlock::iterator ScanIt, BasicBlock *BB); + MemDepResult getCallSiteDependencyFrom(CallSite C, + BasicBlock::iterator ScanIt, + BasicBlock *BB); /// verifyRemoved - Verify that the specified instruction does not occur /// in our internal data structures. void verifyRemoved(Instruction *Inst) const; - MemDepResult getCallSiteDependency(CallSite C, BasicBlock::iterator ScanIt, - BasicBlock *BB); }; } // End llvm namespace diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp index cf748df..7c00a6c 100644 --- a/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -52,10 +52,11 @@ bool MemoryDependenceAnalysis::runOnFunction(Function &) { } -/// getCallSiteDependency - Private helper for finding the local dependencies -/// of a call site. +/// getCallSiteDependencyFrom - Private helper for finding the local +/// dependencies of a call site. MemDepResult MemoryDependenceAnalysis:: -getCallSiteDependency(CallSite CS, BasicBlock::iterator ScanIt, BasicBlock *BB) { +getCallSiteDependencyFrom(CallSite CS, BasicBlock::iterator ScanIt, + BasicBlock *BB) { // Walk backwards through the block, looking for dependencies while (ScanIt != BB->begin()) { Instruction *Inst = --ScanIt; @@ -138,7 +139,7 @@ getDependencyFrom(Instruction *QueryInst, BasicBlock::iterator ScanIt, // FreeInsts erase the entire structure, not just a field. MemSize = ~0UL; } else if (isa<CallInst>(QueryInst) || isa<InvokeInst>(QueryInst)) { - return getCallSiteDependency(CallSite::get(QueryInst), ScanIt, BB); + return getCallSiteDependencyFrom(CallSite::get(QueryInst), ScanIt, BB); } else { // Otherwise, this is a vaarg or non-memory instruction, just return a // clobber dependency on the previous inst. |