mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-16 00:16:50 +00:00
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:
parent
947b10c167
commit
998c49c247
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user