LLVM: llvm::LazyCallGraph::SCC Class Reference (original) (raw)
An SCC of the call graph. More...
#include "[llvm/Analysis/LazyCallGraph.h](LazyCallGraph%5F8h%5Fsource.html)"
| Public Member Functions | |
|---|---|
| iterator | begin () const |
| iterator | end () const |
| int | size () const |
| RefSCC & | getOuterRefSCC () const |
| bool | isParentOf (const SCC &C) const |
| Test if this SCC is a parent of C. | |
| bool | isAncestorOf (const SCC &C) const |
| Test if this SCC is an ancestor of C. | |
| bool | isChildOf (const SCC &C) const |
| Test if this SCC is a child of C. | |
| bool | isDescendantOf (const SCC &C) const |
| Test if this SCC is a descendant of C. | |
| std::string | getName () const |
| Provide a short name by printing this SCC to a std::string. |
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 [RefSCC](classllvm%5F1%5F1LazyCallGraph%5F1%5F1RefSCC.html "A RefSCC of the call graph."), see below for details about that outer structure. SCCs do not support mutation of the call graph, that must be done through the containing [RefSCC](classllvm%5F1%5F1LazyCallGraph%5F1%5F1RefSCC.html "A RefSCC of the call graph.") in order to fully reason about the ordering and connections of the graph.
Definition at line 417 of file LazyCallGraph.h.
◆ iterator
◆ begin()
| iterator llvm::LazyCallGraph::SCC::begin ( ) const | inline |
|---|
◆ end()
| iterator llvm::LazyCallGraph::SCC::end ( ) const | inline |
|---|
◆ getName()
| std::string llvm::LazyCallGraph::SCC::getName ( ) const | inline |
|---|
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.
Definition at line 512 of file LazyCallGraph.h.
References llvm::raw_ostream::flush().
◆ getOuterRefSCC()
| RefSCC & llvm::LazyCallGraph::SCC::getOuterRefSCC ( ) const | inline |
|---|
◆ isAncestorOf()
| bool LazyCallGraph::SCC::isAncestorOf | ( | const SCC & | C | ) | const |
|---|
Test if this SCC is an ancestor of 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!
Definition at line 299 of file LazyCallGraph.cpp.
References llvm::CallingConv::C, llvm::SmallVectorTemplateCommon< T, typename >::empty(), G, llvm::SmallPtrSetImpl< PtrType >::insert(), LazyCallGraph, LazyCallGraph::Node, N, llvm::SmallVectorImpl< T >::pop_back_val(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
◆ isChildOf()
| bool llvm::LazyCallGraph::SCC::isChildOf ( const SCC & C) const | inline |
|---|
◆ isDescendantOf()
| bool llvm::LazyCallGraph::SCC::isDescendantOf ( const SCC & C) const | inline |
|---|
Test if this SCC is a descendant of C.
See the comments for isParentOf for detailed notes about the complexity of this routine.
Definition at line 506 of file LazyCallGraph.h.
References llvm::CallingConv::C.
◆ isParentOf()
◆ size()
| int llvm::LazyCallGraph::SCC::size ( ) const | inline |
|---|
◆ LazyCallGraph::Node
◆ operator<<
Print a short description useful for debugging or logging.
We print the function names in the SCC wrapped in '()'s and skipping the middle functions if there are a large number.
Definition at line 440 of file LazyCallGraph.h.
References llvm::CallingConv::C, I, and N.
The documentation for this class was generated from the following files:
- include/llvm/Analysis/LazyCallGraph.h
- lib/Analysis/LazyCallGraph.cpp