class CallGraphWrapperPass
Declaration
class CallGraphWrapperPass : public ModulePass { /* full declaration omitted */ };
Description
The \c ModulePass which wraps up a \c CallGraph and the logic to build it. This class exposes both the interface to the call graph container and the module pass which runs over a module of IR and produces the call graph. The call graph interface is entirelly a wrapper around a \c CallGraph object which is stored internally for each module.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:324
Inherits from: ModulePass
Member Variables
- public static char ID
Method Overview
- public CallGraphWrapperPass()
- public inline llvm::CallGraphWrapperPass::iterator begin()
- public inline llvm::CallGraphWrapperPass::const_iterator begin() const
- public void dump() const
- public inline llvm::CallGraphWrapperPass::iterator end()
- public inline llvm::CallGraphWrapperPass::const_iterator end() const
- public void getAnalysisUsage(llvm::AnalysisUsage & AU) const
- public const llvm::CallGraph & getCallGraph() const
- public llvm::CallGraph & getCallGraph()
- public llvm::CallGraphNode * getCallsExternalNode() const
- public llvm::CallGraphNode * getExternalCallingNode() const
- public llvm::Module & getModule() const
- public llvm::CallGraphNode * getOrInsertFunction(const llvm::Function * F)
- public void print(llvm::raw_ostream & o, const llvm::Module *) const
- public void releaseMemory()
- public llvm::Function * removeFunctionFromModule(llvm::CallGraphNode * CGN)
- public bool runOnModule(llvm::Module & M)
- public ~CallGraphWrapperPass()
Inherited from ModulePass:
- public assignPassManager
- public createPrinterPass
- public getPotentialPassManagerType
- public runOnModule
- protected skipModule
Inherited from Pass:
- public assignPassManager
- public createPass
- public createPrinterPass
- public doFinalization
- public doInitialization
- public dump
- public dumpPassStructure
- public getAdjustedAnalysisPointer
- public getAnalysis
- public getAnalysis
- public getAnalysisID
- public getAnalysisID
- public getAnalysisIfAvailable
- public getAnalysisUsage
- public getAsImmutablePass
- public getAsPMDataManager
- public getPassID
- public getPassKind
- public getPassName
- public getPotentialPassManagerType
- public getResolver
- public lookupPassInfo
- public lookupPassInfo
- public mustPreserveAnalysisID
- public preparePassManager
- public print
- public releaseMemory
- public setResolver
- public verifyAnalysis
Methods
¶CallGraphWrapperPass()
CallGraphWrapperPass()
Declared at: llvm/include/llvm/Analysis/CallGraph.h:330
¶inline llvm::CallGraphWrapperPass::iterator
begin()
inline llvm::CallGraphWrapperPass::iterator
begin()
Declared at: llvm/include/llvm/Analysis/CallGraph.h:344
¶inline llvm::CallGraphWrapperPass::const_iterator
begin() const
inline llvm::CallGraphWrapperPass::const_iterator
begin() const
Declared at: llvm/include/llvm/Analysis/CallGraph.h:346
¶void dump() const
void dump() const
Declared at: llvm/include/llvm/Analysis/CallGraph.h:397
¶inline llvm::CallGraphWrapperPass::iterator end()
inline llvm::CallGraphWrapperPass::iterator end()
Declared at: llvm/include/llvm/Analysis/CallGraph.h:345
¶inline llvm::CallGraphWrapperPass::const_iterator
end() const
inline llvm::CallGraphWrapperPass::const_iterator
end() const
Declared at: llvm/include/llvm/Analysis/CallGraph.h:347
¶void getAnalysisUsage(
llvm::AnalysisUsage& AU) const
void getAnalysisUsage(
llvm::AnalysisUsage& AU) const
Description
getAnalysisUsage - This function should be overriden by passes that need analysis information to do their job. If a pass specifies that it uses a particular analysis result to this function, it can then use the getAnalysis <AnalysisType >() function, below.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:392
Parameters
¶const llvm::CallGraph& getCallGraph() const
const llvm::CallGraph& getCallGraph() const
Description
The internal \c CallGraph around which the rest of this interface is wrapped.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:335
¶llvm::CallGraph& getCallGraph()
llvm::CallGraph& getCallGraph()
Declared at: llvm/include/llvm/Analysis/CallGraph.h:336
¶llvm::CallGraphNode* getCallsExternalNode() const
llvm::CallGraphNode* getCallsExternalNode() const
Declared at: llvm/include/llvm/Analysis/CallGraph.h:363
¶llvm::CallGraphNode* getExternalCallingNode()
const
llvm::CallGraphNode* getExternalCallingNode()
const
Description
Returns the \c CallGraphNode which is used to represent undetermined calls into the callgraph.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:359
¶llvm::Module& getModule() const
llvm::Module& getModule() const
Description
Returns the module the call graph corresponds to.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:342
¶llvm::CallGraphNode* getOrInsertFunction(
const llvm::Function* F)
llvm::CallGraphNode* getOrInsertFunction(
const llvm::Function* F)
Description
Similar to operator[], but this will insert a new CallGraphNode for\c F if one does not already exist.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:384
Parameters
- const llvm::Function* F
¶void print(llvm::raw_ostream& o,
const llvm::Module*) const
void print(llvm::raw_ostream& o,
const llvm::Module*) const
Description
print - Print out the internal state of the pass. This is called by Analyze to print out the contents of an analysis. Otherwise it is not necessary to implement this method. Beware that the module pointer MAY be null. This automatically forwards to a virtual function that does not provide the Module* in case the analysis doesn't need it it can just be ignored.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:396
Parameters
- llvm::raw_ostream& o
- const llvm::Module*
¶void releaseMemory()
void releaseMemory()
Description
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memory when it is no longer needed. The default behavior of passes is to hold onto memory for the entire duration of their lifetime (which is the entire compile time). For pipelined passes, this is not a big deal because that memory gets recycled every time the pass is invoked on another program unit. For IP passes, it is more important to free memory when it is unused. Optionally implement this function to release pass memory when it is no longer used.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:394
¶llvm::Function* removeFunctionFromModule(
llvm::CallGraphNode* CGN)
llvm::Function* removeFunctionFromModule(
llvm::CallGraphNode* CGN)
Description
Unlink the function from this module, returning it. Because this removes the function from the module, the call graph node is destroyed. This is only valid if the function does not call any other functions (ie, there are no edges in it's CGN). The easiest way to do this is to dropAllReferences before calling this.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:378
Parameters
- llvm::CallGraphNode* CGN
¶bool runOnModule(llvm::Module& M)
bool runOnModule(llvm::Module& M)
Description
runOnModule - Virtual method overriden by subclasses to process the module being operated on.
Declared at: llvm/include/llvm/Analysis/CallGraph.h:393
Parameters
- llvm::Module& M
¶~CallGraphWrapperPass()
~CallGraphWrapperPass()
Declared at: llvm/include/llvm/Analysis/CallGraph.h:331