class LazyCallGraph::SCC

Declaration

class LazyCallGraph::SCC { /* full declaration omitted */ };

Description

An SCC of the call graph. This represents a Strongly Connected Component of the direct call graph -- ignoring indirect calls and function references. It stores this as a collection of call graph nodes. While the order of nodes in the SCC is stable, it is not any particular order. The SCCs are nested within a \c RefSCC, see below for details about that outer structure. SCCs do not support mutation of the call graph, that must be done through the containing \c RefSCC in order to fully reason about the ordering and connections of the graph.

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:419

Member Variables

private llvm::LazyCallGraph::RefSCC* OuterRefSCC
private SmallVector<llvm::LazyCallGraph::Node*, 1> Nodes

Method Overview

  • private template <typename NodeRangeT> SCC(llvm::LazyCallGraph::RefSCC & OuterRefSCC, NodeRangeT && Nodes)
  • public llvm::LazyCallGraph::SCC::iterator begin() const
  • private void clear()
  • private void dump() const
  • public llvm::LazyCallGraph::SCC::iterator end() const
  • public std::string getName() const
  • public llvm::LazyCallGraph::RefSCC & getOuterRefSCC() const
  • public bool isAncestorOf(const llvm::LazyCallGraph::SCC & C) const
  • public bool isChildOf(const llvm::LazyCallGraph::SCC & C) const
  • public bool isDescendantOf(const llvm::LazyCallGraph::SCC & C) const
  • public bool isParentOf(const llvm::LazyCallGraph::SCC & C) const
  • public int size() const
  • private void verify()

Methods

template <typename NodeRangeT>
SCC(llvm::LazyCallGraph::RefSCC& OuterRefSCC,
    NodeRangeT&& Nodes)

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:427

Templates

NodeRangeT

Parameters

llvm::LazyCallGraph::RefSCC& OuterRefSCC
NodeRangeT&& Nodes

llvm::LazyCallGraph::SCC::iterator begin() const

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:477

void clear()

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:430

void dump() const

Description

Dump a short description of this SCC to stderr.

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:461

llvm::LazyCallGraph::SCC::iterator end() const

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:478

std::string getName() const

Description

Provide a short name by printing this SCC to a std::string. This copes with the fact that we don't have a name per se for an SCC while still making the use of this in debugging and logging useful.

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:514

llvm::LazyCallGraph::RefSCC& getOuterRefSCC()
    const

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:482

bool isAncestorOf(
    const llvm::LazyCallGraph::SCC& C) const

Description

Test if this SCC is an ancestor of \a C. Note that in the worst case this is linear in the number of edges departing the current SCC and every SCC in the entire graph reachable from this SCC. Thus this very well may walk every edge in the entire call graph! Do not call this in a tight loop!

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:496

Parameters

const llvm::LazyCallGraph::SCC& C

bool isChildOf(
    const llvm::LazyCallGraph::SCC& C) const

Description

Test if this SCC is a child of \a C. See the comments for \c isParentOf for detailed notes about the complexity of this routine.

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:502

Parameters

const llvm::LazyCallGraph::SCC& C

bool isDescendantOf(
    const llvm::LazyCallGraph::SCC& C) const

Description

Test if this SCC is a descendant of \a C. See the comments for \c isParentOf for detailed notes about the complexity of this routine.

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:508

Parameters

const llvm::LazyCallGraph::SCC& C

bool isParentOf(
    const llvm::LazyCallGraph::SCC& C) const

Description

Test if this SCC is a parent of \a C. Note that this is linear in the number of edges departing the current SCC.

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:488

Parameters

const llvm::LazyCallGraph::SCC& C

int size() const

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:480

void verify()

Description

Verify invariants about the SCC. This will attempt to validate all of the basic invariants within an SCC, but not that it is a strongly connected component per se. Primarily useful while building and updating the graph to check that basic properties are in place rather than having inexplicable crashes later.

Declared at: llvm/include/llvm/Analysis/LazyCallGraph.h:471