LLVM API Documentation

llvm::BUDataStructures Class Reference

#include <DataStructure.h>

Inheritance diagram for llvm::BUDataStructures:

Inheritance graph
[legend]
Collaboration diagram for llvm::BUDataStructures:

Collaboration graph
[legend]
List of all members.

Public Types

typedef std::set< std::pair<
Instruction *, Function * > > 
ActualCalleesTy
typedef ActualCalleesTy::const_iterator callee_iterator

Public Member Functions

 ~BUDataStructures ()
virtual bool runOnModule (Module &M)
bool hasGraph (const Function &F) const
DSGraphgetDSGraph (const Function &F) const
bool doneDSGraph (const Function *F) const
DSGraphgetGlobalsGraph () const
EquivalenceClasses< GlobalValue * > & getGlobalECs ()
DSGraphCreateGraphForExternalFunction (const Function &F)
void deleteValue (Value *V)
void copyValue (Value *From, Value *To)
void print (std::ostream &O, const Module *M) const
void releaseMyMemory ()
virtual void getAnalysisUsage (AnalysisUsage &AU) const
const ActualCalleesTygetActualCallees () const
callee_iterator callee_begin (Instruction *I) const
callee_iterator callee_end (Instruction *I) const

Protected Attributes

hash_map< Function *, DSGraph * > DSInfo
DSGraphGlobalsGraph
std::set< std::pair< Instruction *,
Function * > > 
ActualCallees
std::map< std::vector< Function * >,
std::pair< DSGraph *, std::vector<
DSNodeHandle > > > * 
IndCallGraphMap
EquivalenceClasses< GlobalValue * > GlobalECs
std::map< CallSite, std::vector<
Function * > > 
AlreadyInlined

Detailed Description

BUDataStructures - The analysis that computes the interprocedurally closed data structure graphs for all of the functions in the program. This pass only performs a "Bottom Up" propagation (hence the name).

Definition at line 105 of file DataStructure.h.


Member Typedef Documentation

typedef std::set<std::pair<Instruction*, Function*> > llvm::BUDataStructures::ActualCalleesTy

Definition at line 172 of file DataStructure.h.

typedef ActualCalleesTy::const_iterator llvm::BUDataStructures::callee_iterator

Definition at line 177 of file DataStructure.h.


Constructor & Destructor Documentation

llvm::BUDataStructures::~BUDataStructures (  )  [inline]

Definition at line 123 of file DataStructure.h.

References releaseMyMemory().


Member Function Documentation

bool BUDataStructures::runOnModule ( Module M  )  [virtual]

runOnModule - Virtual method overriden by subclasses to process the module being operated on.

Implements llvm::ModulePass.

Reimplemented in llvm::CompleteBUDataStructures.

Definition at line 152 of file BottomUpClosure.cpp.

References ActualCallees, AddGlobalToNode(), llvm::Module::begin(), BuildGlobalECs(), llvm::DSGraph::DontCloneAuxCallNodes, llvm::DSGraph::DontCloneCallNodes, DSInfo, E, EliminateUsesOfECGlobals(), llvm::Module::end(), GetAllCallees(), llvm::ReachabilityCloner::getClonedNH(), llvm::LocalDataStructures::getGlobalECs(), llvm::DSGraph::getGlobalsGraph(), llvm::LocalDataStructures::getGlobalsGraph(), llvm::Module::getMainFunction(), llvm::DSGraph::getNodeForValue(), llvm::DSGraph::getScalarMap(), GlobalECs, GlobalsGraph, llvm::DSGraph::IgnoreGlobals, IndCallGraphMap, M, llvm::DSGraph::MarkFormalArgs, llvm::DSGraph::markIncompleteNodes(), llvm::DSGraph::maskIncompleteMarkers(), NumCallEdges, RC, llvm::DSGraph::removeTriviallyDeadNodes(), llvm::DSGraph::setPrintAuxCalls(), Stack, and llvm::X.

bool llvm::BUDataStructures::hasGraph ( const Function F  )  const [inline]

Reimplemented in llvm::CompleteBUDataStructures.

Definition at line 127 of file DataStructure.h.

References DSInfo, and F.

DSGraph& llvm::BUDataStructures::getDSGraph ( const Function F  )  const [inline]

getDSGraph - Return the data structure graph for the specified function.

Reimplemented in llvm::CompleteBUDataStructures.

Definition at line 133 of file DataStructure.h.

References CreateGraphForExternalFunction(), DSInfo, and F.

Referenced by copyValue(), and deleteValue().

bool llvm::BUDataStructures::doneDSGraph ( const Function F  )  const [inline]

DSGraphExists - Is the DSGraph computed for this function?

Definition at line 144 of file DataStructure.h.

References DSInfo, and F.

DSGraph& llvm::BUDataStructures::getGlobalsGraph (  )  const [inline]

Definition at line 148 of file DataStructure.h.

References GlobalsGraph.

Referenced by llvm::TDDataStructures::runOnModule(), llvm::EquivClassGraphs::runOnModule(), and llvm::CompleteBUDataStructures::runOnModule().

EquivalenceClasses<GlobalValue*>& llvm::BUDataStructures::getGlobalECs (  )  [inline]

Definition at line 150 of file DataStructure.h.

References GlobalECs.

Referenced by llvm::TDDataStructures::runOnModule(), llvm::EquivClassGraphs::runOnModule(), and llvm::CompleteBUDataStructures::runOnModule().

DSGraph & BUDataStructures::CreateGraphForExternalFunction ( const Function F  ) 

Definition at line 472 of file BottomUpClosure.cpp.

References DSInfo, F, llvm::DSGraph::getTargetData(), GlobalECs, and GlobalsGraph.

Referenced by getDSGraph().

void BUDataStructures::deleteValue ( Value V  ) 

deleteValue/copyValue - Interfaces to update the DSGraphs in the program. These correspond to the interfaces defined in the AliasAnalysis class.

Definition at line 740 of file BottomUpClosure.cpp.

References DSInfo, F, getDSGraph(), getFnForValue(), llvm::DSGraph::getReturnNodes(), llvm::DSGraph::getScalarMap(), and V.

void BUDataStructures::copyValue ( Value From,
Value To 
)

Definition at line 758 of file BottomUpClosure.cpp.

References DSInfo, F, G, getDSGraph(), getFnForValue(), llvm::DSGraph::getScalarMap(), and GlobalECs.

void BUDataStructures::print ( std::ostream &  O,
const Module M 
) const [virtual]

print - Print out the analysis results...

Reimplemented from llvm::Pass.

Reimplemented in llvm::CompleteBUDataStructures.

Definition at line 334 of file Printer.cpp.

References DontPrintAnything, M, and printCollection().

void BUDataStructures::releaseMyMemory (  ) 

Definition at line 457 of file BottomUpClosure.cpp.

References DSInfo, E, and GlobalsGraph.

Referenced by ~BUDataStructures().

virtual void llvm::BUDataStructures::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.

Reimplemented in llvm::CompleteBUDataStructures.

Definition at line 167 of file DataStructure.h.

References llvm::AnalysisUsage::addRequired(), and llvm::AnalysisUsage::setPreservesAll().

const ActualCalleesTy& llvm::BUDataStructures::getActualCallees (  )  const [inline]

Definition at line 173 of file DataStructure.h.

References ActualCallees.

Referenced by llvm::EquivClassGraphs::runOnModule(), and llvm::CompleteBUDataStructures::runOnModule().

callee_iterator llvm::BUDataStructures::callee_begin ( Instruction I  )  const [inline]

Definition at line 178 of file DataStructure.h.

References ActualCallees.

callee_iterator llvm::BUDataStructures::callee_end ( Instruction I  )  const [inline]

Definition at line 182 of file DataStructure.h.

References ActualCallees.


Member Data Documentation

hash_map<Function*, DSGraph*> llvm::BUDataStructures::DSInfo [protected]

Definition at line 108 of file DataStructure.h.

Referenced by copyValue(), CreateGraphForExternalFunction(), deleteValue(), doneDSGraph(), llvm::CompleteBUDataStructures::getDSGraph(), getDSGraph(), llvm::CompleteBUDataStructures::hasGraph(), hasGraph(), releaseMyMemory(), llvm::CompleteBUDataStructures::runOnModule(), and runOnModule().

DSGraph* llvm::BUDataStructures::GlobalsGraph [protected]

Definition at line 109 of file DataStructure.h.

Referenced by CreateGraphForExternalFunction(), getGlobalsGraph(), releaseMyMemory(), llvm::CompleteBUDataStructures::runOnModule(), and runOnModule().

std::set<std::pair<Instruction*, Function*> > llvm::BUDataStructures::ActualCallees [protected]

Definition at line 110 of file DataStructure.h.

Referenced by callee_begin(), callee_end(), getActualCallees(), llvm::CompleteBUDataStructures::runOnModule(), and runOnModule().

std::map<std::vector<Function*>, std::pair<DSGraph*, std::vector<DSNodeHandle> > >* llvm::BUDataStructures::IndCallGraphMap [protected]

Definition at line 114 of file DataStructure.h.

Referenced by runOnModule().

EquivalenceClasses<GlobalValue*> llvm::BUDataStructures::GlobalECs [protected]

GlobalECs - The equivalence classes for each global value that is merged with other global values in the DSGraphs.

Definition at line 118 of file DataStructure.h.

Referenced by copyValue(), CreateGraphForExternalFunction(), getGlobalECs(), llvm::CompleteBUDataStructures::runOnModule(), and runOnModule().

std::map<CallSite, std::vector<Function*> > llvm::BUDataStructures::AlreadyInlined [protected]

Definition at line 120 of file DataStructure.h.


The documentation for this class was generated from the following files: