32 return Func->getName();
34 return "external node";
48 struct CallGraphViewer
50 AnalysisCallGraphWrapperPassTraits> {
62 CallGraphWrapperPass, true, CallGraph *,
63 AnalysisCallGraphWrapperPassTraits> {
77 INITIALIZE_PASS(CallGraphViewer,
"view-callgraph",
"View call graph",
false,
82 "Print call graph to 'dot' file",
false,
false)
91 return new CallGraphDOTPrinter();
static PassRegistry * getPassRegistry()
getPassRegistry - Access the global registry object, which is automatically initialized at applicatio...
This class represents lattice values for constants.
INITIALIZE_PASS(CallGraphViewer, "view-callgraph", "View call graph", false, false) char CallGraphDOTPrinter INITIALIZE_PASS(CallGraphDOTPrinter, "dot-callgraph", "Print call graph to 'dot' file", false, false) ModulePass *llvm
A node in the call graph for a module.
ModulePass * createCallGraphDOTPrinterPass()
static bool isSimple(Instruction *I)
This file provides interfaces used to build and manipulate a call graph, which is a very useful tool ...
DOTGraphTraits(bool isSimple=false)
static std::string getGraphName(CallGraph *Graph)
void initializeCallGraphViewerPass(PassRegistry &)
The ModulePass which wraps up a CallGraph and the logic to build it.
std::string getNodeLabel(CallGraphNode *Node, CallGraph *Graph)
void initializeCallGraphDOTPrinterPass(PassRegistry &)
const CallGraph & getCallGraph() const
The internal CallGraph around which the rest of this interface is wrapped.
Function * getFunction() const
Returns the function that this call graph node represents.
DOTGraphTraits - Template class that can be specialized to customize how graphs are converted to 'dot...
The basic data container for the call graph of a Module of IR.
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
DefaultDOTGraphTraits - This class provides the default implementations of all of the DOTGraphTraits ...
static CallGraph * getGraph(CallGraphWrapperPass *P)
ModulePass * createCallGraphViewerPass()