LLVM 20.0.0git
Classes | Namespaces
LazyCallGraph.h File Reference

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

#include "llvm/ADT/Any.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/SetVector.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/PassManager.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <iterator>
#include <optional>
#include <string>
#include <utility>

Go to the source code of this file.

Classes

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...
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

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.