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
This commit is contained in:
Chris Lattner 2002-11-11 00:00:46 +00:00
parent 947b10c167
commit 998c49c247

View File

@ -830,12 +830,8 @@ static void removeIdenticalCalls(vector<DSCallSite> &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;