LLVM API Documentation
#include <DataStructure.h>
Inheritance diagram for llvm::EquivClassGraphs:
Definition at line 332 of file DataStructure.h.
typedef std::set<std::pair<Instruction*, Function*> > llvm::EquivClassGraphs::ActualCalleesTy |
Definition at line 399 of file DataStructure.h.
typedef ActualCalleesTy::const_iterator llvm::EquivClassGraphs::callee_iterator |
Definition at line 404 of file DataStructure.h.
callee_iterator llvm::EquivClassGraphs::callee_begin | ( | Instruction * | I | ) | const [inline] |
callee_iterator llvm::EquivClassGraphs::callee_end | ( | Instruction * | I | ) | const [inline] |
bool llvm::EquivClassGraphs::ContainsDSGraphFor | ( | const Function & | F | ) | const [inline] |
ContainsDSGraphFor - Return true if we have a graph for the specified function.
Definition at line 386 of file DataStructure.h.
const ActualCalleesTy& llvm::EquivClassGraphs::getActualCallees | ( | ) | const [inline] |
virtual void llvm::EquivClassGraphs::getAnalysisUsage | ( | AnalysisUsage & | AU | ) | const [inline, virtual] |
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.
Reimplemented from llvm::Pass.
Definition at line 414 of file DataStructure.h.
References llvm::AnalysisUsage::addRequired(), and llvm::AnalysisUsage::setPreservesAll().
getDSGraph - Return the data structure graph for the specified function. This returns the folded graph. The folded graph is the same as the CBU graph iff the function is in a singleton equivalence class AND all its callees also have the same folded graph as the CBU graph.
Definition at line 374 of file DataStructure.h.
Referenced by getSomeCalleeForCallSite().
EquivalenceClasses<GlobalValue*>& llvm::EquivClassGraphs::getGlobalECs | ( | ) | [inline] |
DSGraph& llvm::EquivClassGraphs::getGlobalsGraph | ( | ) | const [inline] |
Definition at line 395 of file DataStructure.h.
References GlobalsGraph.
Referenced by runOnModule().
getSomeCalleeForCallSite - Return any one callee function at a call site.
Definition at line 60 of file EquivClassGraphs.cpp.
References llvm::CallSite::getCalledValue(), llvm::CallSite::getCaller(), getDSGraph(), llvm::DSGraph::getNodeForValue(), I, and OneCalledFunction.
bool llvm::EquivClassGraphs::hasGraph | ( | const Function & | F | ) | const [inline] |
void EquivClassGraphs::print | ( | std::ostream & | O, | |
const Module * | M | |||
) | const [virtual] |
print - Print out the analysis results...
Reimplemented from llvm::Pass.
Definition at line 359 of file Printer.cpp.
References DontPrintAnything, M, and printCollection().
bool EquivClassGraphs::runOnModule | ( | Module & | M | ) | [virtual] |
EquivClassGraphs - Computes the equivalence classes and then the folded DS graphs for each class.
Implements llvm::ModulePass.
Definition at line 73 of file EquivClassGraphs.cpp.
References ActualCallees, llvm::Module::begin(), CBU, CheckAllGraphs(), DEBUG, llvm::DSGraph::DontCloneAuxCallNodes, llvm::DSGraph::DontCloneCallNodes, E, llvm::Module::end(), llvm::BUDataStructures::getActualCallees(), llvm::ReachabilityCloner::getClonedNH(), llvm::BUDataStructures::getGlobalECs(), llvm::DSGraph::getGlobalsGraph(), getGlobalsGraph(), llvm::BUDataStructures::getGlobalsGraph(), llvm::Module::getMainFunction(), llvm::DSGraph::getNodeForValue(), llvm::DSGraph::getScalarMap(), GI, llvm::Module::global_begin(), llvm::Module::global_end(), GlobalECs, GlobalsGraph, I, llvm::DSGraph::IgnoreGlobals, llvm::Function::isExternal(), M, llvm::DSGraph::MarkFormalArgs, llvm::DSGraph::markIncompleteNodes(), RC, llvm::DSGraph::removeTriviallyDeadNodes(), llvm::DSGraph::setPrintAuxCalls(), and Stack.
std::set<std::pair<Instruction*, Function*> > llvm::EquivClassGraphs::ActualCallees |
ActualCallees - The actual functions callable from indirect call sites.
Definition at line 342 of file DataStructure.h.
Referenced by callee_begin(), callee_end(), getActualCallees(), and runOnModule().
Definition at line 338 of file DataStructure.h.
Referenced by ContainsDSGraphFor(), getDSGraph(), and hasGraph().
Definition at line 346 of file DataStructure.h.
GlobalECs - The equivalence classes for each global value that is merged with other global values in the DSGraphs.
Definition at line 355 of file DataStructure.h.
Referenced by getGlobalECs(), and runOnModule().
std::map<DSNode*, Function *> llvm::EquivClassGraphs::OneCalledFunction |
OneCalledFunction - For each indirect call, we keep track of one target of the call. This is used to find equivalence class called by a call site.
Definition at line 351 of file DataStructure.h.
Referenced by getSomeCalleeForCallSite().