LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

llvm::DSGraph Struct Reference

#include <DSGraph.h>

Collaboration diagram for llvm::DSGraph:

Collaboration graph
[legend]
List of all members.

Public Types

typedef DSScalarMap ScalarMapTy
typedef hash_map< Function *,
DSNodeHandle
ReturnNodesTy
typedef hash_set< GlobalValue * > GlobalSetTy
typedef ilist< DSNodeNodeListTy
typedef hash_map< const DSNode *,
DSNodeHandle
NodeMapTy
typedef NodeListTy::compat_iterator node_iterator
enum  MarkIncompleteFlags { MarkFormalArgs = 1, IgnoreFormalArgs = 0, IgnoreGlobals = 2, MarkGlobalsIncomplete = 0 }
enum  RemoveDeadNodesFlags { RemoveUnreachableGlobals = 1, KeepUnreachableGlobals = 0 }
enum  CloneFlags {
  StripAllocaBit = 1 << 0, KeepAllocaBit = 0, DontCloneCallNodes = 1 << 1, CloneCallNodes = 0,
  DontCloneAuxCallNodes = 1 << 2, CloneAuxCallNodes = 0, StripModRefBits = 1 << 3, KeepModRefBits = 0,
  StripIncompleteBit = 1 << 4, KeepIncompleteBit = 0, UpdateInlinedGlobals = 1 << 5, DontUpdateInlinedGlobals = 0
}

Public Member Functions

 DSGraph (const TargetData &td)
 DSGraph (const TargetData &td, Function &F, DSGraph *GlobalsGraph)
 DSGraph (const DSGraph &DSG)
 DSGraph (const DSGraph &DSG, NodeMapTy &NodeMap)
 ~DSGraph ()
DSGraphgetGlobalsGraph () const
void setGlobalsGraph (DSGraph *G)
const TargetDatagetTargetData () const
void setPrintAuxCalls ()
bool shouldPrintAuxCalls () const
node_iterator node_begin () const
node_iterator node_end () const
std::string getFunctionNames () const
void addNode (DSNode *N)
void unlinkNode (DSNode *N)
ScalarMapTygetScalarMap ()
const ScalarMapTygetScalarMap () const
const std::vector< DSCallSite > & getFunctionCalls () const
std::vector< DSCallSite > & getAuxFunctionCalls ()
const std::vector< DSCallSite > & getAuxFunctionCalls () const
GlobalSetTygetInlinedGlobals ()
DSNodeHandlegetNodeForValue (Value *V)
const DSNodeHandlegetNodeForValue (Value *V) const
const ReturnNodesTygetReturnNodes () const
ReturnNodesTygetReturnNodes ()
DSNodeHandlegetReturnNodeFor (Function &F)
const DSNodeHandlegetReturnNodeFor (Function &F) const
unsigned getGraphSize () const
void print (std::ostream &O) const
void dump () const
void viewGraph () const
void writeGraphToFile (std::ostream &O, const std::string &GraphName) const
void maskNodeTypes (unsigned Mask)
void maskIncompleteMarkers ()
void markIncompleteNodes (unsigned Flags)
void removeDeadNodes (unsigned Flags)
void updateFromGlobalGraph ()
void cloneInto (const DSGraph &G, ScalarMapTy &OldValMap, ReturnNodesTy &OldReturnNodes, NodeMapTy &OldNodeMap, unsigned CloneFlags=0)
void mergeInGraph (const DSCallSite &CS, Function &F, const DSGraph &Graph, unsigned CloneFlags)
DSCallSite getCallSiteForArguments (Function &F) const
DSCallSite getDSCallSiteForCallSite (CallSite CS) const
void AssertNodeInGraph (const DSNode *N) const
void AssertNodeContainsGlobal (const DSNode *N, GlobalValue *GV) const
void AssertCallSiteInGraph (const DSCallSite &CS) const
void AssertCallNodesInGraph () const
void AssertAuxCallNodesInGraph () const
void AssertGraphOK () const
void removeTriviallyDeadNodes ()

Static Public Member Functions

static void computeNodeMapping (const DSNodeHandle &NH1, const DSNodeHandle &NH2, NodeMapTy &NodeMap, bool StrictChecking=true)

Detailed Description

DSGraph - The graph that represents a function.

Definition at line 100 of file DSGraph.h.


Member Typedef Documentation

typedef hash_set<GlobalValue*> llvm::DSGraph::GlobalSetTy
 

Definition at line 104 of file DSGraph.h.

typedef NodeListTy::compat_iterator llvm::DSGraph::node_iterator
 

node_iterator/begin/end - Iterate over all of the nodes in the graph. Be extremely careful with these methods because any merging of nodes could cause the node to be removed from this list. This means that if you are iterating over nodes and doing something that could cause _any_ node to merge, your node_iterators into this graph can be invalidated.

Definition at line 187 of file DSGraph.h.

typedef ilist<DSNode> llvm::DSGraph::NodeListTy
 

Definition at line 105 of file DSGraph.h.

typedef hash_map<const DSNode*, DSNodeHandle> llvm::DSGraph::NodeMapTy
 

NodeMapTy - This data type is used when cloning one graph into another to keep track of the correspondence between the nodes in the old and new graphs.

Definition at line 110 of file DSGraph.h.

typedef hash_map<Function*, DSNodeHandle> llvm::DSGraph::ReturnNodesTy
 

Definition at line 103 of file DSGraph.h.

typedef DSScalarMap llvm::DSGraph::ScalarMapTy
 

Definition at line 102 of file DSGraph.h.


Member Enumeration Documentation

enum llvm::DSGraph::CloneFlags
 

CloneFlags enum - Bits that may be passed into the cloneInto method to specify how to clone the function graph.

Enumerator:
StripAllocaBit 
KeepAllocaBit 
DontCloneCallNodes 
CloneCallNodes 
DontCloneAuxCallNodes 
CloneAuxCallNodes 
StripModRefBits 
KeepModRefBits 
StripIncompleteBit 
KeepIncompleteBit 
UpdateInlinedGlobals 
DontUpdateInlinedGlobals 

Definition at line 320 of file DSGraph.h.

enum llvm::DSGraph::MarkIncompleteFlags
 

Enumerator:
MarkFormalArgs 
IgnoreFormalArgs 
IgnoreGlobals 
MarkGlobalsIncomplete 

Definition at line 302 of file DSGraph.h.

enum llvm::DSGraph::RemoveDeadNodesFlags
 

Enumerator:
RemoveUnreachableGlobals 
KeepUnreachableGlobals 

Definition at line 313 of file DSGraph.h.


Constructor & Destructor Documentation

llvm::DSGraph::DSGraph const TargetData td  )  [inline]
 

Definition at line 151 of file DSGraph.h.

DSGraph::DSGraph const TargetData td,
Function F,
DSGraph GlobalsGraph
 

Definition at line 166 of file Analysis/DataStructure/Local.cpp.

References llvm::Timer::addPeakMemoryMeasurement(), B, llvm::DSScalarMap::begin(), DEBUG, llvm::DSScalarMap::end(), llvm::DSScalarMap::erase(), llvm::Value::getName(), llvm::DSScalarMap::global_begin(), llvm::DSScalarMap::global_end(), I, KeepUnreachableGlobals, MarkFormalArgs, markIncompleteNodes(), llvm::ReachabilityCloner::merge(), removeDeadNodes(), and ScalarMap.

DSGraph::DSGraph const DSGraph DSG  ) 
 

Definition at line 1069 of file DataStructure.cpp.

References cloneInto().

DSGraph::DSGraph const DSGraph DSG,
NodeMapTy NodeMap
 

Definition at line 1075 of file DataStructure.cpp.

References cloneInto().

DSGraph::~DSGraph  ) 
 

Definition at line 1081 of file DataStructure.cpp.

References llvm::DSScalarMap::clear(), E, node_begin(), and node_end().


Member Function Documentation

void llvm::DSGraph::addNode DSNode N  )  [inline]
 

addNode - Add a new node to the graph.

Definition at line 198 of file DSGraph.h.

Referenced by llvm::DSNode::DSNode().

void DSGraph::AssertAuxCallNodesInGraph  )  const
 

Definition at line 1955 of file DataStructure.cpp.

References AssertCallSiteInGraph().

Referenced by AssertGraphOK().

void DSGraph::AssertCallNodesInGraph  )  const
 

Definition at line 1951 of file DataStructure.cpp.

References AssertCallSiteInGraph().

Referenced by AssertGraphOK().

void DSGraph::AssertCallSiteInGraph const DSCallSite CS  )  const
 

Definition at line 1937 of file DataStructure.cpp.

References AssertNodeInGraph(), llvm::DSCallSite::getCalleeNode(), llvm::DSNode::getGlobals(), llvm::DSNodeHandle::getNode(), llvm::DSCallSite::getNumPtrArgs(), llvm::DSCallSite::getPtrArg(), llvm::DSCallSite::getRetVal(), and llvm::DSCallSite::isIndirectCall().

Referenced by AssertAuxCallNodesInGraph(), and AssertCallNodesInGraph().

void DSGraph::AssertGraphOK  )  const
 

Definition at line 1960 of file DataStructure.cpp.

References llvm::Function::abegin(), llvm::Function::aend(), AssertAuxCallNodesInGraph(), AssertCallNodesInGraph(), AssertNodeContainsGlobal(), AssertNodeInGraph(), llvm::DSScalarMap::begin(), E, llvm::DSScalarMap::end(), F, getNodeForValue(), I, llvm::DataStructureAnalysis::isPointerType(), node_begin(), and node_end().

Referenced by removeDeadNodes().

void llvm::DSGraph::AssertNodeContainsGlobal const DSNode N,
GlobalValue GV
const [inline]
 

Definition at line 375 of file DSGraph.h.

References llvm::DSNode::getGlobals().

Referenced by AssertGraphOK().

void llvm::DSGraph::AssertNodeInGraph const DSNode N  )  const [inline]
 

Definition at line 371 of file DSGraph.h.

References llvm::DSNode::getParentGraph().

Referenced by AssertCallSiteInGraph(), and AssertGraphOK().

void DSGraph::cloneInto const DSGraph G,
ScalarMapTy OldValMap,
ReturnNodesTy OldReturnNodes,
NodeMapTy OldNodeMap,
unsigned  CloneFlags = 0
 

cloneInto - Clone the specified DSGraph into the current graph. The translated ScalarMap for the old function is filled into the OldValMap member, and the translated ReturnNodes map is returned into ReturnNodes. OldNodeMap contains a mapping from the original nodes to the newly cloned nodes.

The CloneFlags member controls various aspects of the cloning process.

Definition at line 1142 of file DataStructure.cpp.

References llvm::Timer::addPeakMemoryMeasurement(), llvm::DSNode::AllocaNode, AuxFunctionCalls, llvm::DSScalarMap::begin(), llvm::DSNode::DEAD, DontCloneAuxCallNodes, DontCloneCallNodes, E, llvm::DSScalarMap::end(), FunctionCalls, llvm::DSNodeHandle::getNode(), llvm::DSNodeHandle::getOffset(), getReturnNodes(), H, I, llvm::DSNode::Incomplete, llvm::DSNode::maskNodeTypes(), llvm::DSNodeHandle::mergeWith(), llvm::DSNode::Modified, node_begin(), node_end(), llvm::DSNode::Read, llvm::ISD::Ret, ScalarMap, StripAllocaBit, StripIncompleteBit, StripModRefBits, TIME_REGION, UpdateInlinedGlobals, and llvm::X.

Referenced by DSGraph().

void DSGraph::computeNodeMapping const DSNodeHandle NH1,
const DSNodeHandle NH2,
NodeMapTy NodeMap,
bool  StrictChecking = true
[static]
 

computeNodeMapping - Given roots in two different DSGraphs, traverse the nodes reachable from the two graphs, computing the mapping of nodes from the first to the second graph.

Definition at line 1996 of file DataStructure.cpp.

References llvm::DSNodeHandle::getLink(), llvm::DSNode::getLink(), llvm::DSNodeHandle::getNode(), llvm::DSNodeHandle::getOffset(), llvm::DSNode::getSize(), llvm::DSNode::isNodeCompletelyFolded(), llvm::DSNodeHandle::isNull(), llvm::DS::PointerSize, and llvm::DSNodeHandle::setTo().

void DSGraph::dump  )  const
 

dump - call print(std::cerr), for use from the debugger...

Definition at line 1097 of file DataStructure.cpp.

References print().

const std::vector<DSCallSite>& llvm::DSGraph::getAuxFunctionCalls  )  const [inline]
 

Definition at line 220 of file DSGraph.h.

std::vector<DSCallSite>& llvm::DSGraph::getAuxFunctionCalls  )  [inline]
 

getAuxFunctionCalls - Get the call sites as modified by whatever passes have been run.

Definition at line 217 of file DSGraph.h.

Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), llvm::DSCallSiteIterator::begin_aux(), llvm::DSCallSiteIterator::end_aux(), printCollection(), llvm::TDDataStructures::runOnModule(), and writeGraphToFile().

DSCallSite DSGraph::getCallSiteForArguments Function F  )  const
 

getCallSiteForArguments - Get the arguments and return value bindings for the specified function in the current graph.

Definition at line 1378 of file DataStructure.cpp.

References llvm::Function::abegin(), llvm::Function::aend(), E, getNodeForValue(), getReturnNodeFor(), I, and llvm::DataStructureAnalysis::isPointerType().

DSCallSite DSGraph::getDSCallSiteForCallSite CallSite  CS  )  const
 

getDSCallSiteForCallSite - Given an LLVM CallSite object that is live in the context of this graph, return the DSCallSite for it.

Definition at line 1390 of file DataStructure.cpp.

References llvm::CallSite::arg_begin(), llvm::CallSite::arg_end(), E, F, llvm::CallSite::getCalledFunction(), llvm::CallSite::getCalledValue(), llvm::CallSite::getInstruction(), llvm::DSNodeHandle::getNode(), getNodeForValue(), llvm::Value::getType(), I, and llvm::DataStructureAnalysis::isPointerType().

const std::vector<DSCallSite>& llvm::DSGraph::getFunctionCalls  )  const [inline]
 

getFunctionCalls - Return the list of call sites in the original local graph...

Definition at line 210 of file DSGraph.h.

Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), llvm::DSCallSiteIterator::begin_std(), llvm::DSCallSiteIterator::end_std(), printCollection(), llvm::CompleteBUDataStructures::runOnModule(), and writeGraphToFile().

std::string DSGraph::getFunctionNames  )  const
 

getFunctionNames - Return a space separated list of the name of the functions in this graph (if any)

Definition at line 1054 of file DataStructure.cpp.

References getReturnNodes(), and I.

Referenced by llvm::DOTGraphTraits< const DSGraph * >::getGraphName().

DSGraph* llvm::DSGraph::getGlobalsGraph  )  const [inline]
 

Definition at line 169 of file DSGraph.h.

unsigned llvm::DSGraph::getGraphSize  )  const [inline]
 

getGraphSize - Return the number of nodes in this graph.

Definition at line 265 of file DSGraph.h.

Referenced by llvm::DSGraphPrintHelper::DSGraphPrintHelper(), printCollection(), llvm::ModRefInfoBuilder::visitCallInst(), llvm::ModRefInfoBuilder::visitLoadInst(), llvm::ModRefInfoBuilder::visitStoreInst(), and writeGraphToFile().

GlobalSetTy& llvm::DSGraph::getInlinedGlobals  )  [inline]
 

getInlinedGlobals - Get the set of globals that are have been inlined (from callees in BU or from callers in TD) into the current graph.

Definition at line 227 of file DSGraph.h.

Referenced by llvm::ReachabilityCloner::getClonedNH(), and llvm::ReachabilityCloner::merge().

const DSNodeHandle& llvm::DSGraph::getNodeForValue Value V  )  const [inline]
 

Definition at line 236 of file DSGraph.h.

References llvm::DSScalarMap::end(), llvm::DSScalarMap::find(), and I.

DSNodeHandle& llvm::DSGraph::getNodeForValue Value V  )  [inline]
 

getNodeForValue - Given a value that is used or defined in the body of the current function, return the DSNode that it points to.

Definition at line 234 of file DSGraph.h.

Referenced by AssertGraphOK(), getCallSiteForArguments(), llvm::ReachabilityCloner::getClonedNH(), getDSCallSiteForCallSite(), llvm::FunctionModRefInfo::getNodeId(), markIncompleteNodes(), llvm::ReachabilityCloner::merge(), mergeInGraph(), removeTriviallyDeadNodes(), updateFromGlobalGraph(), llvm::ModRefInfoBuilder::visitLoadInst(), and llvm::ModRefInfoBuilder::visitStoreInst().

const DSNodeHandle& llvm::DSGraph::getReturnNodeFor Function F  )  const [inline]
 

Definition at line 257 of file DSGraph.h.

References I.

DSNodeHandle& llvm::DSGraph::getReturnNodeFor Function F  )  [inline]
 

getReturnNodeFor - Return the return node for the specified function.

Definition at line 251 of file DSGraph.h.

References I.

Referenced by getCallSiteForArguments(), and mergeInGraph().

ReturnNodesTy& llvm::DSGraph::getReturnNodes  )  [inline]
 

Definition at line 247 of file DSGraph.h.

const ReturnNodesTy& llvm::DSGraph::getReturnNodes  )  const [inline]
 

getReturnNodes - Return the mapping of functions to their return nodes for this graph.

Definition at line 246 of file DSGraph.h.

Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), cloneInto(), getCaption(), getFunctionNames(), llvm::DOTGraphTraits< const DSGraph * >::getGraphName(), and llvm::DSNode::mergeTypeInfo().

const ScalarMapTy& llvm::DSGraph::getScalarMap  )  const [inline]
 

Definition at line 205 of file DSGraph.h.

ScalarMapTy& llvm::DSGraph::getScalarMap  )  [inline]
 

getScalarMap - Get a map that describes what the nodes the scalars in this function point to...

Definition at line 204 of file DSGraph.h.

Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), llvm::DSNode::assertOK(), llvm::DSGraphPrintHelper::DSGraphPrintHelper(), getCaption(), llvm::ReachabilityCloner::getClonedNH(), mergeInGraph(), llvm::TDDataStructures::runOnModule(), and updateFromGlobalGraph().

const TargetData& llvm::DSGraph::getTargetData  )  const [inline]
 

getTargetData - Return the TargetData object for the current target.

Definition at line 174 of file DSGraph.h.

Referenced by llvm::DSNode::getTargetData().

void DSGraph::markIncompleteNodes unsigned  Flags  ) 
 

Definition at line 1452 of file DataStructure.cpp.

References llvm::Function::abegin(), llvm::Function::aend(), E, F, llvm::Value::getName(), getNodeForValue(), llvm::DSScalarMap::global_begin(), llvm::DSScalarMap::global_end(), I, IgnoreGlobals, llvm::DataStructureAnalysis::isPointerType(), MarkFormalArgs, markIncomplete(), markIncompleteNode(), and shouldPrintAuxCalls().

Referenced by DSGraph(), and llvm::LocalDataStructures::runOnModule().

void llvm::DSGraph::maskIncompleteMarkers  )  [inline]
 

Definition at line 291 of file DSGraph.h.

References llvm::DSNode::Incomplete, and maskNodeTypes().

Referenced by llvm::BUDataStructures::runOnModule().

void llvm::DSGraph::maskNodeTypes unsigned  Mask  )  [inline]
 

maskNodeTypes - Apply a mask to all of the node types in the graph. This is useful for clearing out markers like Incomplete.

Definition at line 287 of file DSGraph.h.

References E, I, node_begin(), and node_end().

Referenced by maskIncompleteMarkers().

void DSGraph::mergeInGraph const DSCallSite CS,
Function F,
const DSGraph Graph,
unsigned  CloneFlags
 

mergeInGraph - The method is used for merging graphs together. If the argument graph is not *this, it makes a clone of the specified graph, then merges the nodes specified in the call site with the formal arguments in the graph. If the StripAlloca's argument is 'StripAllocaBit' then Alloca markers are removed from nodes.

Definition at line 1246 of file DataStructure.cpp.

References llvm::Function::abegin(), llvm::Function::aend(), AuxFunctionCalls, llvm::DSScalarMap::count(), DontCloneAuxCallNodes, DontCloneCallNodes, E, FunctionCalls, llvm::ReachabilityCloner::getClonedNH(), llvm::Function::getFunctionType(), llvm::Value::getName(), llvm::DSNodeHandle::getNode(), getNodeForValue(), llvm::DSCallSite::getNumPtrArgs(), llvm::DSCallSite::getPtrArg(), getReturnNodeFor(), llvm::DSCallSite::getRetVal(), getScalarMap(), llvm::DSScalarMap::global_begin(), llvm::DSScalarMap::global_end(), llvm::ReachabilityCloner::hasClonedNode(), I, llvm::DSNodeHandle::isNull(), llvm::DataStructureAnalysis::isPointerType(), llvm::FunctionType::isVarArg(), llvm::ReachabilityCloner::merge(), llvm::DSNodeHandle::mergeWith(), PathExistsToClonedNode(), TIME_REGION, and llvm::X.

node_iterator llvm::DSGraph::node_begin  )  const [inline]
 

Definition at line 188 of file DSGraph.h.

Referenced by AssertGraphOK(), cloneInto(), llvm::FunctionModRefInfo::FunctionModRefInfo(), maskNodeTypes(), llvm::GraphTraits< const DSGraph * >::nodes_begin(), llvm::GraphTraits< DSGraph * >::nodes_begin(), printCollection(), removeTriviallyDeadNodes(), and ~DSGraph().

node_iterator llvm::DSGraph::node_end  )  const [inline]
 

Definition at line 189 of file DSGraph.h.

Referenced by AssertGraphOK(), cloneInto(), llvm::FunctionModRefInfo::FunctionModRefInfo(), maskNodeTypes(), llvm::GraphTraits< const DSGraph * >::nodes_end(), llvm::GraphTraits< DSGraph * >::nodes_end(), printCollection(), removeTriviallyDeadNodes(), and ~DSGraph().

void DSGraph::print std::ostream &  O  )  const
 

print - Print a dot graph to the specified ostream...

Definition at line 221 of file Printer.cpp.

References llvm::WriteGraph().

Referenced by dump(), llvm::DSGraphPrintHelper::printValuesInBitVec(), viewGraph(), and writeGraphToFile().

void DSGraph::removeDeadNodes unsigned  Flags  ) 
 

Definition at line 1766 of file DataStructure.cpp.

References AssertGraphOK(), llvm::DSScalarMap::begin(), CallSiteUsesAliveArgs(), CanReachAliveNodes(), DEBUG, llvm::ReachabilityCloner::destroy(), E, llvm::DSScalarMap::end(), llvm::DSScalarMap::erase(), first, llvm::ReachabilityCloner::getClonedNH(), llvm::DSNode::getNodeFlags(), I, llvm::DSNode::isForwarding(), llvm::DSNode::markReachableNodes(), llvm::ReachabilityCloner::merge(), NumDNE, removeTriviallyDeadNodes(), RemoveUnreachableGlobals, second, StripAllocaBit, StripIncompleteBit, TIME_REGION, llvm::DSNode::UnknownNode, llvm::X, and Y.

Referenced by DSGraph().

void DSGraph::removeTriviallyDeadNodes  ) 
 

removeTriviallyDeadNodes - After the graph has been constructed, this method removes all unreachable nodes that are created because they got merged with other nodes in the graph. This is used as the first step of removeDeadNodes.

Definition at line 1604 of file DataStructure.cpp.

References llvm::DSScalarMap::begin(), E, llvm::DSScalarMap::end(), llvm::DSScalarMap::erase(), llvm::DSNode::getGlobals(), llvm::DSNode::getLink(), llvm::DSNodeHandle::getNode(), llvm::DSNode::getNodeFlags(), getNodeForValue(), llvm::DSNode::getNumLinks(), llvm::DSNode::getNumReferrers(), llvm::DSNode::getPointerSize(), llvm::DSNode::hasNoReferrers(), I, llvm::DSNode::isComplete(), llvm::DSNode::isGlobalNode(), llvm::DSNode::isModified(), llvm::DSNode::isRead(), l, llvm::DSNode::makeNodeDead(), node_begin(), node_end(), NumTrivialDNE, NumTrivialGlobalDNE, removeIdenticalCalls(), TIME_REGION, and llvm::X.

Referenced by removeDeadNodes(), llvm::TDDataStructures::runOnModule(), llvm::LocalDataStructures::runOnModule(), llvm::CompleteBUDataStructures::runOnModule(), and llvm::BUDataStructures::runOnModule().

void llvm::DSGraph::setGlobalsGraph DSGraph G  )  [inline]
 

Definition at line 170 of file DSGraph.h.

void llvm::DSGraph::setPrintAuxCalls  )  [inline]
 

setPrintAuxCalls - If you call this method, the auxillary call vector will be printed instead of the standard call vector to the dot file.

Definition at line 179 of file DSGraph.h.

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

bool llvm::DSGraph::shouldPrintAuxCalls  )  const [inline]
 

Definition at line 180 of file DSGraph.h.

Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), markIncompleteNodes(), printCollection(), and writeGraphToFile().

void llvm::DSGraph::unlinkNode DSNode N  )  [inline]
 

Definition at line 199 of file DSGraph.h.

Referenced by llvm::DSNode::forwardNode().

void DSGraph::updateFromGlobalGraph  ) 
 

updateFromGlobalGraph - This function rematerializes global nodes and nodes reachable from them from the globals graph into the current graph. It uses the vector InlinedGlobals to avoid cloning and merging globals that are already up-to-date in the current graph. In practice, in the TD pass, this is likely to be a large fraction of the live global nodes in each function (since most live nodes are likely to have been brought up-to-date in at _some_ caller or callee).

Definition at line 1122 of file DataStructure.cpp.

References E, llvm::DSScalarMap::end(), llvm::DSScalarMap::find(), getNodeForValue(), getScalarMap(), I, llvm::ReachabilityCloner::merge(), ScalarMap, TIME_REGION, and llvm::X.

void DSGraph::viewGraph  )  const
 

viewGraph - Emit a dot graph, run 'dot', run gv on the postscript file, then cleanup. For use from the debugger.

Definition at line 244 of file Printer.cpp.

References F, and print().

void DSGraph::writeGraphToFile std::ostream &  O,
const std::string &  GraphName
const
 

Definition at line 225 of file Printer.cpp.

References F, getAuxFunctionCalls(), getFunctionCalls(), getGraphSize(), print(), and shouldPrintAuxCalls().

Referenced by printCollection().


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