From 998c49c2472f29cfe2df0e87f35128858c178428 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 11 Nov 2002 00:00:46 +0000 Subject: [PATCH] Use call site mergeWith method to simplify code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4687 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Analysis/DataStructure/DataStructure.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index 67778181ef1..b07a0f7d854 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/lib/Analysis/DataStructure/DataStructure.cpp @@ -830,12 +830,8 @@ static void removeIdenticalCalls(vector &Calls, // FIXME: Evaluate how many times this is tripped! NumDuplicateCalls > 20) { DSCallSite &OCS = Calls[i-1]; - OCS.getRetVal().mergeWith(CS.getRetVal()); + OCS.mergeWith(CS); - for (unsigned a = 0, - e = std::min(CS.getNumPtrArgs(), OCS.getNumPtrArgs()); - a != e; ++a) - OCS.getPtrArg(a).mergeWith(CS.getPtrArg(a)); // The node will now be eliminated as a duplicate! if (CS.getNumPtrArgs() < OCS.getNumPtrArgs()) CS = OCS;