diff options
Diffstat (limited to 'include/llvm/Analysis/DataStructure/DSSupport.h')
-rw-r--r-- | include/llvm/Analysis/DataStructure/DSSupport.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/llvm/Analysis/DataStructure/DSSupport.h b/include/llvm/Analysis/DataStructure/DSSupport.h index 3a5341fb35..32aec2c463 100644 --- a/include/llvm/Analysis/DataStructure/DSSupport.h +++ b/include/llvm/Analysis/DataStructure/DSSupport.h @@ -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; |