LLVM API Documentation
#include <DataStructure.h>
Inheritance diagram for llvm::EquivClassGraphs:
Definition at line 341 of file DataStructure.h.
typedef std::set<std::pair<Instruction*, Function*> > llvm::EquivClassGraphs::ActualCalleesTy |
Definition at line 408 of file DataStructure.h.
typedef ActualCalleesTy::const_iterator llvm::EquivClassGraphs::callee_iterator |
Definition at line 413 of file DataStructure.h.
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 71 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, llvm::DSGraph::IgnoreGlobals, llvm::Function::isExternal(), M, llvm::DSGraph::MarkFormalArgs, llvm::DSGraph::markIncompleteNodes(), RC, llvm::DSGraph::removeTriviallyDeadNodes(), llvm::DSGraph::setPrintAuxCalls(), and Stack.
void EquivClassGraphs::print | ( | std::ostream & | O, | |
const Module * | M | |||
) | const [virtual] |
print - Print out the analysis results...
Reimplemented from llvm::Pass.
Definition at line 350 of file Printer.cpp.
References DontPrintAnything, M, and printCollection().
EquivalenceClasses<GlobalValue*>& llvm::EquivClassGraphs::getGlobalECs | ( | ) | [inline] |
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 383 of file DataStructure.h.
Referenced by getSomeCalleeForCallSite().
bool llvm::EquivClassGraphs::hasGraph | ( | const Function & | F | ) | 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 395 of file DataStructure.h.
getSomeCalleeForCallSite - Return any one callee function at a call site.
Definition at line 58 of file EquivClassGraphs.cpp.
References llvm::CallSite::getCalledValue(), llvm::CallSite::getCaller(), getDSGraph(), llvm::DSGraph::getNodeForValue(), and OneCalledFunction.
DSGraph& llvm::EquivClassGraphs::getGlobalsGraph | ( | ) | const [inline] |
Definition at line 404 of file DataStructure.h.
References GlobalsGraph.
Referenced by runOnModule().
const ActualCalleesTy& llvm::EquivClassGraphs::getActualCallees | ( | ) | const [inline] |
callee_iterator llvm::EquivClassGraphs::callee_begin | ( | Instruction * | I | ) | const [inline] |
callee_iterator llvm::EquivClassGraphs::callee_end | ( | Instruction * | I | ) | 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 423 of file DataStructure.h.
References llvm::AnalysisUsage::addRequired(), and llvm::AnalysisUsage::setPreservesAll().
hash_map<const Function*, DSGraph*> llvm::EquivClassGraphs::DSInfo |
Definition at line 347 of file DataStructure.h.
Referenced by ContainsDSGraphFor(), getDSGraph(), and hasGraph().
std::set<std::pair<Instruction*, Function*> > llvm::EquivClassGraphs::ActualCallees |
ActualCallees - The actual functions callable from indirect call sites.
Definition at line 351 of file DataStructure.h.
Referenced by callee_begin(), callee_end(), getActualCallees(), and runOnModule().
Definition at line 355 of file DataStructure.h.
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 360 of file DataStructure.h.
Referenced by getSomeCalleeForCallSite().
GlobalECs - The equivalence classes for each global value that is merged with other global values in the DSGraphs.
Definition at line 364 of file DataStructure.h.
Referenced by getGlobalECs(), and runOnModule().