[llvm-commits] [llvm] r60642 - in /llvm/trunk: include/llvm/Analysis/MemoryDependenceAnalysis.h lib/Analysis/MemoryDependenceAnalysis.cpp

Chris Lattner sabre at nondot.org
Sat Dec 6 16:35:52 PST 2008


Author: lattner
Date: Sat Dec  6 18:35:51 2008
New Revision: 60642

URL: http://llvm.org/viewvc/llvm-project?rev=60642&view=rev
Log:
Rename getCallSiteDependency -> getCallSiteDependencyFrom to
emphasize the scanning and make it more similar to 
getDependencyFrom
 

Modified:
    llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h
    llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp

Modified: llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h?rev=60642&r1=60641&r2=60642&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h (original)
+++ llvm/trunk/include/llvm/Analysis/MemoryDependenceAnalysis.h Sat Dec  6 18:35:51 2008
@@ -223,18 +223,16 @@
     /// 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

Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=60642&r1=60641&r2=60642&view=diff

==============================================================================
--- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Sat Dec  6 18:35:51 2008
@@ -52,10 +52,11 @@
 }
 
 
-/// 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 @@
     // 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.





More information about the llvm-commits mailing list