The reachability cloner should add arguments to merged calls when the RHS of
authorChris Lattner <sabre@nondot.org>
Mon, 21 Mar 2005 09:39:51 +0000 (09:39 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 21 Mar 2005 09:39:51 +0000 (09:39 +0000)
the merge has more operands than the LHS.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20731 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/DataStructure.cpp

index ed7fa9ac4f0807110c749c312456d02495b6ab3a..87163860cc1e59009546d1404059f9883c82bbba 100644 (file)
@@ -1087,7 +1087,7 @@ void ReachabilityCloner::merge(const DSNodeHandle &NH,
 
 /// mergeCallSite - Merge the nodes reachable from the specified src call
 /// site into the nodes reachable from DestCS.
-void ReachabilityCloner::mergeCallSite(const DSCallSite &DestCS,
+void ReachabilityCloner::mergeCallSite(DSCallSite &DestCS,
                                        const DSCallSite &SrcCS) {
   merge(DestCS.getRetVal(), SrcCS.getRetVal());
   unsigned MinArgs = DestCS.getNumPtrArgs();
@@ -1095,6 +1095,9 @@ void ReachabilityCloner::mergeCallSite(const DSCallSite &DestCS,
   
   for (unsigned a = 0; a != MinArgs; ++a)
     merge(DestCS.getPtrArg(a), SrcCS.getPtrArg(a));
+
+  for (unsigned a = MinArgs, e = SrcCS.getNumPtrArgs(); a != e; ++a)
+    DestCS.addPtrArg(getClonedNH(SrcCS.getPtrArg(a)));
 }