[llvm-commits] CVS: llvm/include/llvm/Analysis/DSSupport.h

Chris Lattner lattner at cs.uiuc.edu
Sun Nov 10 17:48:07 PST 2002


Changes in directory llvm/include/llvm/Analysis:

DSSupport.h updated: 1.6 -> 1.7

---
Log message:

Add code to be able to merge two call sites


---
Diffs of the changes:

Index: llvm/include/llvm/Analysis/DSSupport.h
diff -u llvm/include/llvm/Analysis/DSSupport.h:1.6 llvm/include/llvm/Analysis/DSSupport.h:1.7
--- llvm/include/llvm/Analysis/DSSupport.h:1.6	Sun Nov 10 00:48:11 2002
+++ llvm/include/llvm/Analysis/DSSupport.h	Sun Nov 10 17:46:51 2002
@@ -218,6 +218,17 @@
     }
   }
 
+  // MergeWith - Merge the return value and parameters of the these two call
+  // sites.
+  void mergeWith(DSCallSite &CS) {
+    getRetVal().mergeWith(CS.getRetVal());
+    unsigned MinArgs = getNumPtrArgs();
+    if (CS.getNumPtrArgs() < MinArgs) MinArgs = CS.getNumPtrArgs();
+
+    for (unsigned a = 0; a != MinArgs; ++a)
+      getPtrArg(a).mergeWith(CS.getPtrArg(a));
+  }
+
   bool operator<(const DSCallSite &CS) const {
     if (Callee < CS.Callee) return true;   // This must sort by callee first!
     if (Callee > CS.Callee) return false;





More information about the llvm-commits mailing list