Lines Matching full:edges
42 EdgeIndexMap.try_emplace(&TargetN, Edges.size());
43 Edges.emplace_back(TargetN, EK);
47 Edges[EdgeIndexMap.find(&TargetN)->second].setKind(EK);
55 Edges[IndexMapI->second] = Edge();
60 static void addEdge(SmallVectorImpl<LazyCallGraph::Edge> &Edges,
63 if (!EdgeIndexMap.try_emplace(&N, Edges.size()).second)
67 Edges.emplace_back(LazyCallGraph::Edge(N, EK));
71 assert(!Edges && "Must not have already populated the edges for this node!");
76 Edges = EdgeSequence();
82 // Find all the potential call graph edges in this function. We track both
83 // actual call edges and indirect references to functions. The direct calls
105 addEdge(Edges->Edges, Edges->EdgeIndexMap, G->get(*Callee),
119 addEdge(Edges->Edges, Edges->EdgeIndexMap, G->get(F),
123 // Add implicit reference edges to any defined libcall functions (if we
127 addEdge(Edges->Edges, Edges->EdgeIndexMap, G->get(*F),
130 return *Edges;
162 // synthesize reference edges to it to model the fact that LLVM can turn
170 // External linkage defined functions have edges to them from other
174 addEdge(EntryEdges.Edges, EntryEdges.EdgeIndexMap, get(F), Edge::Ref);
178 // edges to the module.
186 addEdge(EntryEdges.Edges, EntryEdges.EdgeIndexMap, get(*F), Edge::Ref);
202 addEdge(EntryEdges.Edges, EntryEdges.EdgeIndexMap, get(F),
293 // No edges found.
307 // Walk down the graph until we run out of edges or find a path to TargetC.
412 // Search all edges to see if this is a parent.
455 /// all edges in the SCC DAG point to prior SCCs in the sequence.
477 /// 3) Otherwise, starting from the target SCC, walk all edges which reach an
498 /// - Big-O is the number of edges in the closed postorder range of SCCs from
508 /// the source SCC via some (transitive) set of edges. The second computes the
510 /// (transitive) set of edges. Both callbacks should populate the set argument
609 // edge is toward the beginning of the postorder sequence because all edges
644 // edges.
799 // cycle without walking all the edges that form this connection, and instead
806 // Scan down the stack and DFS across the call edges.
916 // of the old SCC. This means that we will have edges into all the new SCCs,
942 // Edges between RefSCCs are the same regardless of call or ref, so we can
963 // Edges between RefSCCs are the same regardless of call or ref, so we can
1029 // more importantly this removes examining all forward edges in all RefSCCs
1031 // RefSCCs (and their edges) are visited here.
1053 // edges.
1098 // Walk the inner SCCs to update their up-pointer and walk all the edges to
1164 ArrayRef<std::pair<Node *, Node *>> Edges) {
1181 // First remove the actual edges.
1182 for (auto [SourceN, TargetN] : Edges) {
1192 // If all targets are in the same SCC as the source, because no call edges
1194 if (llvm::all_of(Edges, [&](std::pair<Node *, Node *> E) {
1399 // this is quadratic in the number of edges in the call graph!
1409 SourceN->EdgeIndexMap.try_emplace(&TargetN, SourceN->Edges.size());
1412 Edge &E = SourceN->Edges[Iterator->second];
1418 SourceN->Edges.emplace_back(TargetN, Edge::Call);
1436 SourceN->EdgeIndexMap.try_emplace(&TargetN, SourceN->Edges.size());
1443 SourceN->Edges.emplace_back(TargetN, Edge::Ref);
1461 // edges in the graph. The common and expected way to use this is when
1514 // Remove all call edges out of dead function.
1532 "dead function shouldn't have any outgoing call edges");
1538 // Remove outgoing edges from all dead functions. Dead functions should
1539 // already have had their call edges removed in markDeadFunction(), so we only
1540 // need to worry about spurious ref edges.
1681 // We didn't find any edges back to the original function's RefSCC, so the
1743 // since there are only edges from the original function's RefSCC to the new
1770 "Expected ref edges from original function to every new function");
1777 "Edges between new functions must be ref edges");
1815 // Scan down the stack and DFS across the call edges.
1914 // a direct walk of the call edges using Tarjan's algorithm. We reuse the
1948 // We need to populate each node as we begin to walk its edges.
1999 OS << " Edges in function: " << N.getFunction().getName() << "\n";