1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 20:12:56 +02:00

Add code to be able to merge two call sites

llvm-svn: 4685
This commit is contained in:
Chris Lattner 2002-11-10 23:46:51 +00:00
parent f088bcac1c
commit aaabf591d2

View File

@ -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;