mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-03 14:31:10 +00:00
Add code to be able to merge two call sites
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4685 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
169f8b838b
commit
b0dfcbf584
@ -218,6 +218,17 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// MergeWith - Merge the return value and parameters of the these two call
|
||||
// sites.
|
||||
void mergeWith(DSCallSite &CS) {
|
||||
getRetVal().mergeWith(CS.getRetVal());
|
||||
unsigned MinArgs = getNumPtrArgs();
|
||||
if (CS.getNumPtrArgs() < MinArgs) MinArgs = CS.getNumPtrArgs();
|
||||
|
||||
for (unsigned a = 0; a != MinArgs; ++a)
|
||||
getPtrArg(a).mergeWith(CS.getPtrArg(a));
|
||||
}
|
||||
|
||||
bool operator<(const DSCallSite &CS) const {
|
||||
if (Callee < CS.Callee) return true; // This must sort by callee first!
|
||||
if (Callee > CS.Callee) return false;
|
||||
|
@ -218,6 +218,17 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// MergeWith - Merge the return value and parameters of the these two call
|
||||
// sites.
|
||||
void mergeWith(DSCallSite &CS) {
|
||||
getRetVal().mergeWith(CS.getRetVal());
|
||||
unsigned MinArgs = getNumPtrArgs();
|
||||
if (CS.getNumPtrArgs() < MinArgs) MinArgs = CS.getNumPtrArgs();
|
||||
|
||||
for (unsigned a = 0; a != MinArgs; ++a)
|
||||
getPtrArg(a).mergeWith(CS.getPtrArg(a));
|
||||
}
|
||||
|
||||
bool operator<(const DSCallSite &CS) const {
|
||||
if (Callee < CS.Callee) return true; // This must sort by callee first!
|
||||
if (Callee > CS.Callee) return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user