mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-05 18:17:00 +00:00
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
This commit is contained in:
parent
745291a6ce
commit
8ef57c5faf
@ -223,18 +223,16 @@ namespace llvm {
|
|||||||
/// getDependencyFrom - Return the instruction on which the memory operation
|
/// getDependencyFrom - Return the instruction on which the memory operation
|
||||||
/// 'QueryInst' depends. This starts scanning from the instruction before
|
/// 'QueryInst' depends. This starts scanning from the instruction before
|
||||||
/// the position indicated by ScanIt.
|
/// the position indicated by ScanIt.
|
||||||
///
|
|
||||||
/// Note that this method does no caching at all. You should use
|
|
||||||
/// getDependency where possible.
|
|
||||||
MemDepResult getDependencyFrom(Instruction *QueryInst,
|
MemDepResult getDependencyFrom(Instruction *QueryInst,
|
||||||
BasicBlock::iterator ScanIt, BasicBlock *BB);
|
BasicBlock::iterator ScanIt, BasicBlock *BB);
|
||||||
|
MemDepResult getCallSiteDependencyFrom(CallSite C,
|
||||||
|
BasicBlock::iterator ScanIt,
|
||||||
|
BasicBlock *BB);
|
||||||
|
|
||||||
/// verifyRemoved - Verify that the specified instruction does not occur
|
/// verifyRemoved - Verify that the specified instruction does not occur
|
||||||
/// in our internal data structures.
|
/// in our internal data structures.
|
||||||
void verifyRemoved(Instruction *Inst) const;
|
void verifyRemoved(Instruction *Inst) const;
|
||||||
|
|
||||||
MemDepResult getCallSiteDependency(CallSite C, BasicBlock::iterator ScanIt,
|
|
||||||
BasicBlock *BB);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End llvm namespace
|
} // End llvm namespace
|
||||||
|
@ -52,10 +52,11 @@ bool MemoryDependenceAnalysis::runOnFunction(Function &) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// getCallSiteDependency - Private helper for finding the local dependencies
|
/// getCallSiteDependencyFrom - Private helper for finding the local
|
||||||
/// of a call site.
|
/// dependencies of a call site.
|
||||||
MemDepResult MemoryDependenceAnalysis::
|
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
|
// Walk backwards through the block, looking for dependencies
|
||||||
while (ScanIt != BB->begin()) {
|
while (ScanIt != BB->begin()) {
|
||||||
Instruction *Inst = --ScanIt;
|
Instruction *Inst = --ScanIt;
|
||||||
@ -138,7 +139,7 @@ getDependencyFrom(Instruction *QueryInst, BasicBlock::iterator ScanIt,
|
|||||||
// FreeInsts erase the entire structure, not just a field.
|
// FreeInsts erase the entire structure, not just a field.
|
||||||
MemSize = ~0UL;
|
MemSize = ~0UL;
|
||||||
} else if (isa<CallInst>(QueryInst) || isa<InvokeInst>(QueryInst)) {
|
} else if (isa<CallInst>(QueryInst) || isa<InvokeInst>(QueryInst)) {
|
||||||
return getCallSiteDependency(CallSite::get(QueryInst), ScanIt, BB);
|
return getCallSiteDependencyFrom(CallSite::get(QueryInst), ScanIt, BB);
|
||||||
} else {
|
} else {
|
||||||
// Otherwise, this is a vaarg or non-memory instruction, just return a
|
// Otherwise, this is a vaarg or non-memory instruction, just return a
|
||||||
// clobber dependency on the previous inst.
|
// clobber dependency on the previous inst.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user