Lines Matching defs:LazyCallGraph
1 //===- LazyCallGraph.cpp - Analysis of a Module's call graph --------------===//
9 #include "llvm/Analysis/LazyCallGraph.h"
40 template struct LLVM_EXPORT_TEMPLATE Any::TypeId<const LazyCallGraph::SCC *>;
42 void LazyCallGraph::EdgeSequence::insertEdgeInternal(Node &TargetN,
48 void LazyCallGraph::EdgeSequence::setEdgeKind(Node &TargetN, Edge::Kind EK) {
52 bool LazyCallGraph::EdgeSequence::removeEdgeInternal(Node &TargetN) {
62 static void addEdge(SmallVectorImpl<LazyCallGraph::Edge> &Edges,
63 DenseMap<LazyCallGraph::Node *, int> &EdgeIndexMap,
64 LazyCallGraph::Node &N, LazyCallGraph::Edge::Kind EK) {
69 Edges.emplace_back(LazyCallGraph::Edge(N, EK));
72 LazyCallGraph::EdgeSequence &LazyCallGraph::Node::populateSlow() {
108 LazyCallGraph::Edge::Call);
122 LazyCallGraph::Edge::Ref);
130 LazyCallGraph::Edge::Ref);
135 void LazyCallGraph::Node::replaceFunction(Function &NewF) {
141 LLVM_DUMP_METHOD void LazyCallGraph::Node::dump() const {
156 LazyCallGraph::LazyCallGraph(
205 LazyCallGraph::Edge::Ref);
209 LazyCallGraph::LazyCallGraph(LazyCallGraph &&G)
217 void LazyCallGraph::verify() {
224 bool LazyCallGraph::invalidate(Module &, const PreservedAnalyses &PA,
232 LazyCallGraph &LazyCallGraph::operator=(LazyCallGraph &&G) {
244 LLVM_DUMP_METHOD void LazyCallGraph::SCC::dump() const {
250 void LazyCallGraph::SCC::verify() {
286 bool LazyCallGraph::SCC::isParentOf(const SCC &C) const {
299 bool LazyCallGraph::SCC::isAncestorOf(const SCC &TargetC) const {
303 LazyCallGraph &G = *OuterRefSCC->G;
333 LazyCallGraph::RefSCC::RefSCC(LazyCallGraph &G) : G(&G) {}
336 LLVM_DUMP_METHOD void LazyCallGraph::RefSCC::dump() const {
342 void LazyCallGraph::RefSCC::verify() {
410 bool LazyCallGraph::RefSCC::isParentOf(const RefSCC &RC) const {
424 bool LazyCallGraph::RefSCC::isAncestorOf(const RefSCC &RC) const {
586 bool LazyCallGraph::RefSCC::switchInternalEdgeToCall(
733 void LazyCallGraph::RefSCC::switchTrivialInternalEdgeToRef(Node &SourceN,
751 iterator_range<LazyCallGraph::RefSCC::iterator>
752 LazyCallGraph::RefSCC::switchInternalEdgeToRef(Node &SourceN, Node &TargetN) {
932 void LazyCallGraph::RefSCC::switchOutgoingEdgeToCall(Node &SourceN,
953 void LazyCallGraph::RefSCC::switchOutgoingEdgeToRef(Node &SourceN,
974 void LazyCallGraph::RefSCC::insertInternalRefEdge(Node &SourceN,
986 void LazyCallGraph::RefSCC::insertOutgoingEdge(Node &SourceN, Node &TargetN,
1005 SmallVector<LazyCallGraph::RefSCC *, 1>
1006 LazyCallGraph::RefSCC::insertIncomingRefEdge(Node &SourceN, Node &TargetN) {
1147 void LazyCallGraph::RefSCC::removeOutgoingEdge(Node &SourceN, Node &TargetN) {
1164 SmallVector<LazyCallGraph::RefSCC *, 1>
1165 LazyCallGraph::RefSCC::removeInternalRefEdges(
1395 void LazyCallGraph::RefSCC::insertTrivialCallEdge(Node &SourceN,
1424 void LazyCallGraph::RefSCC::insertTrivialRefEdge(Node &SourceN, Node &TargetN) {
1448 void LazyCallGraph::RefSCC::replaceNodeFunction(Node &N, Function &NewF) {
1484 void LazyCallGraph::insertEdge(Node &SourceN, Node &TargetN, Edge::Kind EK) {
1491 void LazyCallGraph::removeEdge(Node &SourceN, Node &TargetN) {
1500 void LazyCallGraph::markDeadFunction(Function &F) {
1523 void LazyCallGraph::removeDeadFunctions(ArrayRef<Function *> DeadFs) {
1582 static LazyCallGraph::Edge::Kind getEdgeKind(Function &OriginalFunction,
1597 return LazyCallGraph::Edge::Kind::Call;
1612 LazyCallGraph::visitReferences(Worklist, Visited, [&](Function &F) {
1619 return LazyCallGraph::Edge::Kind::Ref;
1622 void LazyCallGraph::addSplitFunction(Function &OriginalFunction,
1701 void LazyCallGraph::addSplitRefRecursiveFunctions(
1785 LazyCallGraph::Node &LazyCallGraph::insertInto(Function &F, Node *&MappedN) {
1789 void LazyCallGraph::updateGraphPtrs() {
1799 LazyCallGraph::Node &LazyCallGraph::initNode(Function &F) {
1809 void LazyCallGraph::buildGenericSCCs(RootsT &&Roots, GetBeginT &&GetBegin,
1901 void LazyCallGraph::buildSCCs(RefSCC &RC, node_stack_range Nodes) {
1935 void LazyCallGraph::buildRefSCCs() {
1973 void LazyCallGraph::visitReferences(SmallVectorImpl<Constant *> &Worklist,
2000 static void printNode(raw_ostream &OS, LazyCallGraph::Node &N) {
2002 for (LazyCallGraph::Edge &E : N.populate())
2009 static void printSCC(raw_ostream &OS, LazyCallGraph::SCC &C) {
2012 for (LazyCallGraph::Node &N : C)
2016 static void printRefSCC(raw_ostream &OS, LazyCallGraph::RefSCC &C) {
2019 for (LazyCallGraph::SCC &InnerC : C)
2027 LazyCallGraph &G = AM.getResult<LazyCallGraphAnalysis>(M);
2036 for (LazyCallGraph::RefSCC &C : G.postorder_ref_sccs())
2045 static void printNodeDOT(raw_ostream &OS, LazyCallGraph::Node &N) {
2049 for (LazyCallGraph::Edge &E : N.populate()) {
2062 LazyCallGraph &G = AM.getResult<LazyCallGraphAnalysis>(M);