mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-31 11:32:42 +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!
|
// FIXME: Evaluate how many times this is tripped!
|
||||||
NumDuplicateCalls > 20) {
|
NumDuplicateCalls > 20) {
|
||||||
DSCallSite &OCS = Calls[i-1];
|
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!
|
// The node will now be eliminated as a duplicate!
|
||||||
if (CS.getNumPtrArgs() < OCS.getNumPtrArgs())
|
if (CS.getNumPtrArgs() < OCS.getNumPtrArgs())
|
||||||
CS = OCS;
|
CS = OCS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user