Home | History | Annotate | Download | only in Analysis

Lines Matching refs:Node

25     SmallVectorImpl<PointerUnion<Function *, LazyCallGraph::Node *>> &Callees,
56 LazyCallGraph::Node::Node(LazyCallGraph &G, Function &F)
78 void LazyCallGraph::Node::insertEdgeInternal(Function &Callee) {
79 if (Node *N = G->lookup(Callee))
86 void LazyCallGraph::Node::insertEdgeInternal(Node &CalleeN) {
91 void LazyCallGraph::Node::removeEdgeInternal(Function &Callee) {
129 SCCEntryNodes.push_back(&Entry.get<Node *>()->getFunction());
159 void LazyCallGraph::SCC::insert(Node &N) {
180 void LazyCallGraph::SCC::insertIntraSCCEdge(Node &CallerN, Node &CalleeN) {
190 void LazyCallGraph::SCC::insertOutgoingEdge(Node &CallerN, Node &CalleeN) {
206 LazyCallGraph::SCC::insertIncomingEdge(Node &CallerN, Node &CalleeN) {
265 // thus up the parent graph from the caller), the current node needs to be
280 // Pop off the prior node and position to unwind the depth first recursion.
299 for (Node *N : *C) {
300 for (Node &ChildN : *N) {
311 for (Node &ChildN : **I) {
324 void LazyCallGraph::SCC::removeInterSCCEdge(Node &CallerN, Node &CalleeN) {
325 // First remove it from the node.
341 for (Node *N : *this) {
342 for (Node &OtherCalleeN : *N) {
378 SmallVectorImpl<std::pair<Node *, Node::iterator>> &DFSStack,
379 SmallVectorImpl<Node *> &PendingSCCStack, Node *N,
381 Node::iterator I = N->begin();
386 "before processing a node.");
389 Node::iterator E = N->end();
391 Node &ChildN = *I;
393 // Check if we have reached a node in the new (known connected) set of
413 // Mark that we should start at this child when next this node is the
418 // Continue, resetting to the child node.
442 // just sitting here waiting until some node further down the stack gets
457 LazyCallGraph::SCC::removeIntraSCCEdge(Node &CallerN,
458 Node &CalleeN) {
459 // First remove it from the node.
469 // The worklist is every node in the original SCC.
470 SmallVector<Node *, 1> Worklist;
472 for (Node *N : Worklist) {
481 // The callee can already reach every node in this SCC (by definition). It is
482 // the only node we know will stay inside this SCC. Everything which
485 // node set to the new node set. This short circuits one side of the Tarjan's
490 SmallVector<std::pair<Node *, Node::iterator>, 4> DFSStack;
491 SmallVector<Node *, 4> PendingSCCStack;
493 Node *N = Worklist.pop_back_val();
503 for (Node *N : Nodes) {
504 for (Node &ChildN : *N) {
531 void LazyCallGraph::insertEdge(Node &CallerN, Function &Callee) {
538 void LazyCallGraph::removeEdge(Node &CallerN, Function &Callee) {
545 LazyCallGraph::Node &LazyCallGraph::insertInto(Function &F, Node *&MappedN) {
546 return *new (MappedN = BPA.Allocate()) Node(*this, F);
552 SmallVector<Node *, 16> Worklist;
554 if (Node *EntryN = Entry.dyn_cast<Node *>())
558 Node *N = Worklist.pop_back_val();
562 if (Node *CalleeN = Callee.dyn_cast<Node *>())
580 LazyCallGraph::SCC *LazyCallGraph::formSCC(Node *RootN,
581 SmallVectorImpl<Node *> &NodeStack) {
598 for (Node *SCCN : NewSCC->Nodes)
599 for (Node &SCCChildN : *SCCN) {
615 Node *N;
616 Node::iterator I;
636 "before placing a node onto the stack.");
638 Node::iterator E = N->end();
640 Node &ChildN = *I;
642 // Mark that we should start at this child when next this node is the
647 // Recurse onto this node via a tail call.
649 "Found a node with 0 DFS number but already in an SCC!");
671 // just sitting here waiting until some node further down the stack gets
687 static void printNodes(raw_ostream &OS, LazyCallGraph::Node &N,
688 SmallPtrSetImpl<LazyCallGraph::Node *> &Printed) {
690 for (LazyCallGraph::Node &ChildN : N)
705 for (LazyCallGraph::Node *N : SCC)
718 SmallPtrSet<LazyCallGraph::Node *, 16> Printed;
719 for (LazyCallGraph::Node &N : G)