Lines Matching defs:Clone

194       : public std::pair<FuncTy *, unsigned /*Clone number*/> {
204 struct CallInfo final : public std::pair<CallTy, unsigned /*Clone number*/> {
345 void addClone(ContextNode *Clone) {
347 CloneOf->Clones.push_back(Clone);
348 Clone->CloneOf = CloneOf;
350 Clones.push_back(Clone);
351 assert(!Clone->CloneOf);
352 Clone->CloneOf = this;
548 /// Clone the given function for the given callsite, recording mapping of all
2246 for (auto *Clone : Clones)
2247 OS << FS << Clone;
2479 ContextNode *Clone = NodeOwner.back().get();
2480 Node->addClone(Clone);
2482 NodeToCallingFunc[Clone] = NodeToCallingFunc[Node];
2483 moveEdgeToExistingCalleeClone(Edge, Clone, CallerEdgeI, /*NewClone=*/true,
2485 return Clone;
2620 for (auto *Clone : Node->Clones)
2621 recursivelyRemoveNoneTypeCalleeEdges(Clone, Visited);
2799 ContextNode *Clone = nullptr;
2808 Clone = CurClone;
2813 if (Clone)
2814 moveEdgeToExistingCalleeClone(CallerEdge, Clone, &EI, /*NewClone=*/false,
2817 Clone =
2823 assert(Clone->AllocTypes != (uint8_t)AllocationType::None);
2948 // Clone = pop front ClonesWorklist
2952 // Assign Clone to original Func
2960 // For each caller of Clone:
2962 // If we cannot assign Clone to that function clone:
2963 // Create new callsite Clone NewClone
2966 // Assign Clone to existing caller's called function clone
2968 // If Clone not already assigned to a function clone:
3041 ContextNode *Clone = ClonesWorklist.front();
3045 checkNode<DerivedCCG, FuncTy, CallTy>(Clone);
3058 Clone->CallerEdges, [&](const std::shared_ptr<ContextEdge> &E) {
3061 // Initialize with empty call map, assign Clone to original function
3065 OrigFunc, Call, Clone,
3067 for (auto &CE : Clone->CallerEdges) {
3083 Clone->CallerEdges, [&](const std::shared_ptr<ContextEdge> &E) {
3087 if (EI != Clone->CallerEdges.end()) {
3094 // Clone function and save it along with the CallInfo map created
3098 assert(CloneNo > 0 && "Clone 0 is the original function, which "
3111 NewFuncClone, Call, Clone,
3113 for (auto &CE : Clone->CallerEdges) {
3126 for (auto CE : Clone->CallerEdges) {
3147 // callers. Clone the other callees of the current callsite's caller
3161 if (Callee == Clone || !Callee->hasCall())
3215 for (auto EI = Clone->CallerEdges.begin();
3216 EI != Clone->CallerEdges.end();) {
3239 Clone) ||
3243 // reach via call contexts). Is this Clone of callsite Node
3278 assert(EI == Clone->CallerEdges.end() ||
3279 Clone->AllocTypes != (uint8_t)AllocationType::None);
3284 removeNoneTypeCalleeEdges(Clone);
3295 // Assign Clone to FuncCloneCalledByCaller
3297 FuncCloneCalledByCaller, Call, Clone,
3324 // Assign Clone to FuncCloneAssignedToCurCallsiteClone
3326 FuncCloneAssignedToCurCallsiteClone, Call, Clone,
3330 [FuncCloneAssignedToCurCallsiteClone] == Clone);
3345 for (auto *Clone : Node->Clones) {
3346 checkNode<DerivedCCG, FuncTy, CallTy>(Clone);
3347 for (const auto &PE : Clone->CalleeEdges)
3349 for (const auto &CE : Clone->CallerEdges)
3363 for (auto *Clone : Node->Clones)
3364 UpdateCalls(Clone, Visited, UpdateCalls);