LLVM API Documentation

llvm::ReachabilityCloner Class Reference

#include <DSGraph.h>

Collaboration diagram for llvm::ReachabilityCloner:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ReachabilityCloner (DSGraph &dest, const DSGraph &src, unsigned cloneFlags)
DSNodeHandle getClonedNH (const DSNodeHandle &SrcNH)
void merge (const DSNodeHandle &NH, const DSNodeHandle &SrcNH)
void mergeCallSite (DSCallSite &DestCS, const DSCallSite &SrcCS)
bool clonedAnyNodes () const
bool hasClonedNode (const DSNode *N)
void destroy ()

Detailed Description

ReachabilityCloner - This class is used to incrementally clone and merge nodes from a non-changing source graph into a potentially mutating destination graph. Nodes are only cloned over on demand, either in responds to a merge() or getClonedNH() call. When a node is cloned over, all of the nodes reachable from it are automatically brought over as well.

Definition at line 534 of file DSGraph.h.


Constructor & Destructor Documentation

llvm::ReachabilityCloner::ReachabilityCloner ( DSGraph dest,
const DSGraph src,
unsigned  cloneFlags 
) [inline]

Definition at line 547 of file DSGraph.h.

References llvm::DSNode::Modified, llvm::DSNode::Read, llvm::DSGraph::StripAllocaBit, llvm::DSGraph::StripIncompleteBit, and llvm::DSGraph::StripModRefBits.


Member Function Documentation

bool llvm::ReachabilityCloner::clonedAnyNodes (  )  const [inline]

Definition at line 568 of file DSGraph.h.

void llvm::ReachabilityCloner::destroy (  )  [inline]

Definition at line 576 of file DSGraph.h.

Referenced by llvm::DSGraph::removeDeadNodes().

DSNodeHandle ReachabilityCloner::getClonedNH ( const DSNodeHandle SrcNH  ) 

Definition at line 925 of file DataStructure.cpp.

References llvm::DSNode::addEdgeTo(), E, llvm::DSNode::getGlobalsList(), llvm::DSNode::getLink(), llvm::DSNodeHandle::getNode(), llvm::DSGraph::getNodeForValue(), llvm::DSNode::getNumLinks(), llvm::DSNodeHandle::getOffset(), llvm::DSGraph::getScalarMap(), llvm::DSNode::getSize(), GI, llvm::DSNode::globals_begin(), llvm::DSNode::globals_end(), llvm::DSNodeHandle::isNull(), merge(), llvm::DSNode::mergeGlobals(), llvm::DSNodeHandle::mergeWith(), and llvm::DS::PointerShift.

Referenced by merge(), mergeCallSite(), llvm::DSGraph::mergeInGraph(), llvm::DSGraph::removeDeadNodes(), llvm::EquivClassGraphs::runOnModule(), llvm::CompleteBUDataStructures::runOnModule(), and llvm::BUDataStructures::runOnModule().

bool llvm::ReachabilityCloner::hasClonedNode ( const DSNode N  )  [inline]

hasClonedNode - Return true if the specified node has been cloned from the source graph into the destination graph.

Definition at line 572 of file DSGraph.h.

void ReachabilityCloner::merge ( const DSNodeHandle NH,
const DSNodeHandle SrcNH 
)

Definition at line 996 of file DataStructure.cpp.

References COLLAPSE_ARRAYS_AGGRESSIVELY, E, llvm::DSNode::foldNodeCompletely(), getClonedNH(), llvm::DSNode::getGlobalsList(), llvm::DSNode::getLink(), llvm::DSNodeHandle::getNode(), llvm::DSNode::getNodeFlags(), llvm::DSGraph::getNodeForValue(), llvm::DSNode::getNumLinks(), llvm::DSNodeHandle::getOffset(), llvm::DSNode::getSize(), llvm::DSNode::getType(), llvm::DSNode::globals_begin(), llvm::DSNode::globals_end(), llvm::DSNode::isArray(), llvm::DSNode::isDeadNode(), llvm::DSNode::isNodeCompletelyFolded(), llvm::DSNodeHandle::isNull(), llvm::DSNode::maskNodeTypes(), llvm::DSNode::mergeGlobals(), llvm::DSNode::mergeNodeFlags(), llvm::DSNode::mergeTypeInfo(), llvm::DSNodeHandle::mergeWith(), llvm::DS::PointerShift, and llvm::Type::VoidTy.

Referenced by llvm::DSGraph::DSGraph(), getClonedNH(), mergeCallSite(), llvm::DSGraph::mergeInGraph(), and llvm::DSGraph::removeDeadNodes().

void ReachabilityCloner::mergeCallSite ( DSCallSite DestCS,
const DSCallSite SrcCS 
)

mergeCallSite - Merge the nodes reachable from the specified src call site into the nodes reachable from DestCS.

Definition at line 1155 of file DataStructure.cpp.

References llvm::DSCallSite::addPtrArg(), getClonedNH(), llvm::DSCallSite::getNumPtrArgs(), llvm::DSCallSite::getPtrArg(), llvm::DSCallSite::getRetVal(), and merge().


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