Lines Matching defs:LazyCallGraph

1 //===- LazyCallGraph.cpp - Analysis of a Module's call graph --------------===//
9 #include "llvm/Analysis/LazyCallGraph.h"
40 void LazyCallGraph::EdgeSequence::insertEdgeInternal(Node &TargetN,
46 void LazyCallGraph::EdgeSequence::setEdgeKind(Node &TargetN, Edge::Kind EK) {
50 bool LazyCallGraph::EdgeSequence::removeEdgeInternal(Node &TargetN) {
60 static void addEdge(SmallVectorImpl<LazyCallGraph::Edge> &Edges,
61 DenseMap<LazyCallGraph::Node *, int> &EdgeIndexMap,
62 LazyCallGraph::Node &N, LazyCallGraph::Edge::Kind EK) {
67 Edges.emplace_back(LazyCallGraph::Edge(N, EK));
70 LazyCallGraph::EdgeSequence &LazyCallGraph::Node::populateSlow() {
106 LazyCallGraph::Edge::Call);
120 LazyCallGraph::Edge::Ref);
128 LazyCallGraph::Edge::Ref);
133 void LazyCallGraph::Node::replaceFunction(Function &NewF) {
139 LLVM_DUMP_METHOD void LazyCallGraph::Node::dump() const {
154 LazyCallGraph::LazyCallGraph(
203 LazyCallGraph::Edge::Ref);
207 LazyCallGraph::LazyCallGraph(LazyCallGraph &&G)
215 void LazyCallGraph::verify() {
222 bool LazyCallGraph::invalidate(Module &, const PreservedAnalyses &PA,
230 LazyCallGraph &LazyCallGraph::operator=(LazyCallGraph &&G) {
242 LLVM_DUMP_METHOD void LazyCallGraph::SCC::dump() const {
248 void LazyCallGraph::SCC::verify() {
284 bool LazyCallGraph::SCC::isParentOf(const SCC &C) const {
297 bool LazyCallGraph::SCC::isAncestorOf(const SCC &TargetC) const {
301 LazyCallGraph &G = *OuterRefSCC->G;
331 LazyCallGraph::RefSCC::RefSCC(LazyCallGraph &G) : G(&G) {}
334 LLVM_DUMP_METHOD void LazyCallGraph::RefSCC::dump() const {
340 void LazyCallGraph::RefSCC::verify() {
408 bool LazyCallGraph::RefSCC::isParentOf(const RefSCC &RC) const {
422 bool LazyCallGraph::RefSCC::isAncestorOf(const RefSCC &RC) const {
584 bool LazyCallGraph::RefSCC::switchInternalEdgeToCall(
731 void LazyCallGraph::RefSCC::switchTrivialInternalEdgeToRef(Node &SourceN,
749 iterator_range<LazyCallGraph::RefSCC::iterator>
750 LazyCallGraph::RefSCC::switchInternalEdgeToRef(Node &SourceN, Node &TargetN) {
930 void LazyCallGraph::RefSCC::switchOutgoingEdgeToCall(Node &SourceN,
951 void LazyCallGraph::RefSCC::switchOutgoingEdgeToRef(Node &SourceN,
972 void LazyCallGraph::RefSCC::insertInternalRefEdge(Node &SourceN,
984 void LazyCallGraph::RefSCC::insertOutgoingEdge(Node &SourceN, Node &TargetN,
1003 SmallVector<LazyCallGraph::RefSCC *, 1>
1004 LazyCallGraph::RefSCC::insertIncomingRefEdge(Node &SourceN, Node &TargetN) {
1145 void LazyCallGraph::RefSCC::removeOutgoingEdge(Node &SourceN, Node &TargetN) {
1162 SmallVector<LazyCallGraph::RefSCC *, 1>
1163 LazyCallGraph::RefSCC::removeInternalRefEdges(
1393 void LazyCallGraph::RefSCC::insertTrivialCallEdge(Node &SourceN,
1422 void LazyCallGraph::RefSCC::insertTrivialRefEdge(Node &SourceN, Node &TargetN) {
1446 void LazyCallGraph::RefSCC::replaceNodeFunction(Node &N, Function &NewF) {
1482 void LazyCallGraph::insertEdge(Node &SourceN, Node &TargetN, Edge::Kind EK) {
1489 void LazyCallGraph::removeEdge(Node &SourceN, Node &TargetN) {
1498 void LazyCallGraph::markDeadFunction(Function &F) {
1521 void LazyCallGraph::removeDeadFunctions(ArrayRef<Function *> DeadFs) {
1580 static LazyCallGraph::Edge::Kind getEdgeKind(Function &OriginalFunction,
1595 return LazyCallGraph::Edge::Kind::Call;
1610 LazyCallGraph::visitReferences(Worklist, Visited, [&](Function &F) {
1617 return LazyCallGraph::Edge::Kind::Ref;
1620 void LazyCallGraph::addSplitFunction(Function &OriginalFunction,
1699 void LazyCallGraph::addSplitRefRecursiveFunctions(
1783 LazyCallGraph::Node &LazyCallGraph::insertInto(Function &F, Node *&MappedN) {
1787 void LazyCallGraph::updateGraphPtrs() {
1797 LazyCallGraph::Node &LazyCallGraph::initNode(Function &F) {
1807 void LazyCallGraph::buildGenericSCCs(RootsT &&Roots, GetBeginT &&GetBegin,
1899 void LazyCallGraph::buildSCCs(RefSCC &RC, node_stack_range Nodes) {
1933 void LazyCallGraph::buildRefSCCs() {
1971 void LazyCallGraph::visitReferences(SmallVectorImpl<Constant *> &Worklist,
1998 static void printNode(raw_ostream &OS, LazyCallGraph::Node &N) {
2000 for (LazyCallGraph::Edge &E : N.populate())
2007 static void printSCC(raw_ostream &OS, LazyCallGraph::SCC &C) {
2010 for (LazyCallGraph::Node &N : C)
2014 static void printRefSCC(raw_ostream &OS, LazyCallGraph::RefSCC &C) {
2017 for (LazyCallGraph::SCC &InnerC : C)
2025 LazyCallGraph &G = AM.getResult<LazyCallGraphAnalysis>(M);
2034 for (LazyCallGraph::RefSCC &C : G.postorder_ref_sccs())
2043 static void printNodeDOT(raw_ostream &OS, LazyCallGraph::Node &N) {
2047 for (LazyCallGraph::Edge &E : N.populate()) {
2060 LazyCallGraph &G = AM.getResult<LazyCallGraphAnalysis>(M);