LLVM  13.0.0git
Classes | Namespaces
LazyCallGraph.h File Reference
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/iterator.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/Analysis/TargetLibraryInfo.h"
#include "llvm/IR/Constant.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <iterator>
#include <string>
#include <utility>
Include dependency graph for LazyCallGraph.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


class  llvm::LazyCallGraph
 A lazily constructed view of the call graph of a module. More...
class  llvm::LazyCallGraph::Edge
 A class used to represent edges in the call graph. More...
class  llvm::LazyCallGraph::EdgeSequence
 The edge sequence object. More...
class  llvm::LazyCallGraph::EdgeSequence::iterator
 An iterator used for the edges to both entry nodes and child nodes. More...
class  llvm::LazyCallGraph::EdgeSequence::call_iterator
 An iterator over specifically call edges. More...
class  llvm::LazyCallGraph::Node
 A node in the call graph. More...
class  llvm::LazyCallGraph::SCC
 An SCC of the call graph. More...
class  llvm::LazyCallGraph::RefSCC
 A RefSCC of the call graph. More...
class  llvm::LazyCallGraph::postorder_ref_scc_iterator
 A post-order depth-first RefSCC iterator over the call graph. More...
struct  llvm::GraphTraits< LazyCallGraph::Node * >
struct  llvm::GraphTraits< LazyCallGraph * >
class  llvm::LazyCallGraphAnalysis
 An analysis pass which computes the call graph for a module. More...
class  llvm::LazyCallGraphPrinterPass
 A pass which prints the call graph to a raw_ostream. More...
class  llvm::LazyCallGraphDOTPrinterPass
 A pass which prints the call graph as a DOT file to a raw_ostream. More...



Detailed Description

Implements a lazy call graph analysis and related passes for the new pass manager.

NB: This is not a traditional call graph! It is a graph which models both the current calls and potential calls. As a consequence there are many edges in this call graph that do not correspond to a 'call' or 'invoke' instruction.

The primary use cases of this graph analysis is to facilitate iterating across the functions of a module in ways that ensure all callees are visited prior to a caller (given any SCC constraints), or vice versa. As such is it particularly well suited to organizing CGSCC optimizations such as inlining, outlining, argument promotion, etc. That is its primary use case and motivates the design. It may not be appropriate for other purposes. The use graph of functions or some other conservative analysis of call instructions may be interesting for optimizations and subsequent analyses which don't work in the context of an overly specified potential-call-edge graph.

To understand the specific rules and nature of this call graph analysis, see the documentation of the LazyCallGraph below.

Definition in file LazyCallGraph.h.