/// 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
}
-/// 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;
// 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.