Lines Matching defs:Clone

214       : public std::pair<FuncTy *, unsigned /*Clone number*/> {
224 struct CallInfo final : public std::pair<CallTy, unsigned /*Clone number*/> {
372 void addClone(ContextNode *Clone) {
374 CloneOf->Clones.push_back(Clone);
375 Clone->CloneOf = CloneOf;
377 Clones.push_back(Clone);
378 assert(!Clone->CloneOf);
379 Clone->CloneOf = this;
646 /// Clone the given function for the given callsite, recording mapping of all
977 const ContextNode<DerivedCCG, FuncTy, CallTy> *Clone) {
978 const ContextNode<DerivedCCG, FuncTy, CallTy> *Node = Clone->CloneOf;
986 for (const auto &E : Clone->CalleeEdges) {
2808 for (auto *Clone : Clones)
2809 OS << LS << Clone;
3050 ContextNode *Clone =
3052 Node->addClone(Clone);
3053 Clone->MatchingCalls = Node->MatchingCalls;
3054 moveEdgeToExistingCalleeClone(Edge, Clone, /*NewClone=*/true,
3056 return Clone;
3268 for (auto *Clone : Node->Clones)
3269 recursivelyRemoveNoneTypeCalleeEdges(Clone, Visited);
3467 ContextNode *Clone = nullptr;
3486 Clone = CurClone;
3492 if (Clone)
3493 moveEdgeToExistingCalleeClone(CallerEdge, Clone, /*NewClone=*/false,
3496 Clone = moveEdgeToNewCalleeClone(CallerEdge, CallerEdgeContextsForAlloc);
3499 assert(Clone->AllocTypes != (uint8_t)AllocationType::None);
3640 // Clone = pop front ClonesWorklist
3644 // Assign Clone to original Func
3652 // For each caller of Clone:
3654 // If we cannot assign Clone to that function clone:
3655 // Create new callsite Clone NewClone
3658 // Assign Clone to existing caller's called function clone
3660 // If Clone not already assigned to a function clone:
3741 ContextNode *Clone = ClonesWorklist.front();
3745 checkNode<DerivedCCG, FuncTy, CallTy>(Clone);
3758 Clone->CallerEdges, [&](const std::shared_ptr<ContextEdge> &E) {
3761 // Initialize with empty call map, assign Clone to original function
3765 OrigFunc, Call, Clone,
3767 for (auto &CE : Clone->CallerEdges) {
3783 Clone->CallerEdges, [&](const std::shared_ptr<ContextEdge> &E) {
3787 if (EI != Clone->CallerEdges.end()) {
3794 // Clone function and save it along with the CallInfo map created
3798 assert(CloneNo > 0 && "Clone 0 is the original function, which "
3811 NewFuncClone, Call, Clone,
3813 for (auto &CE : Clone->CallerEdges) {
3826 // The none type edge removal may remove some of this Clone's caller
3829 auto CallerEdges = Clone->CallerEdges;
3833 assert(!is_contained(Clone->CallerEdges, CE));
3854 // callers. Clone the other callees of the current callsite's caller
3875 if (Callee == Clone || !Callee->hasCall())
3937 // Iterate over a copy of Clone's caller edges, since we may need to
3940 auto CloneCallerEdges = Clone->CallerEdges;
3961 Clone) ||
3965 // reach via call contexts). Is this Clone of callsite Node
4004 removeNoneTypeCalleeEdges(Clone);
4014 // Assign Clone to FuncCloneCalledByCaller
4016 FuncCloneCalledByCaller, Call, Clone,
4043 // Assign Clone to FuncCloneAssignedToCurCallsiteClone
4045 FuncCloneAssignedToCurCallsiteClone, Call, Clone,
4049 [FuncCloneAssignedToCurCallsiteClone] == Clone);
4062 for (auto *Clone : Node->Clones) {
4063 checkNode<DerivedCCG, FuncTy, CallTy>(Clone);
4064 for (const auto &PE : Clone->CalleeEdges)
4066 for (const auto &CE : Clone->CallerEdges)
4083 for (auto *Clone : Node->Clones)
4084 UpdateCalls(Clone, Visited, UpdateCalls);