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::DSNodeHandle Class Reference

#include <DSSupport.h>

Collaboration diagram for llvm::DSNodeHandle:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DSNodeHandle (DSNode *n=0, unsigned offs=0)
 DSNodeHandle (const DSNodeHandle &H)
 ~DSNodeHandle ()
DSNodeHandleoperator= (const DSNodeHandle &H)
bool operator< (const DSNodeHandle &H) const
bool operator> (const DSNodeHandle &H) const
bool operator== (const DSNodeHandle &H) const
bool operator!= (const DSNodeHandle &H) const
void swap (DSNodeHandle &NH)
bool isNull () const
DSNodegetNode () const
unsigned getOffset () const
void setOffset (unsigned O)
void setTo (DSNode *N, unsigned O) const
void addEdgeTo (unsigned LinkNo, const DSNodeHandle &N)
void addEdgeTo (const DSNodeHandle &N)
void mergeWith (const DSNodeHandle &N) const
bool hasLink (unsigned Num) const
const DSNodeHandlegetLink (unsigned Num) const
DSNodeHandlegetLink (unsigned Num)
void setLink (unsigned Num, const DSNodeHandle &NH)

Detailed Description

DSNodeHandle - Implement a "handle" to a data structure node that takes care of all of the add/un'refing of the node to prevent the backpointers in the graph from getting out of date. This class represents a "pointer" in the graph, whose destination is an indexed offset into a node.

Note: some functions that are marked as inline in DSNodeHandle are actually defined in DSNode.h because they need knowledge of DSNode operation. Putting them in a CPP file wouldn't help making them inlined and keeping DSNode and DSNodeHandle (and friends) in one file complicates things.

Definition at line 55 of file DSSupport.h.


Constructor & Destructor Documentation

llvm::DSNodeHandle::DSNodeHandle DSNode n = 0,
unsigned  offs = 0
[inline]
 

Definition at line 61 of file DSSupport.h.

References setTo().

llvm::DSNodeHandle::DSNodeHandle const DSNodeHandle H  )  [inline]
 

Definition at line 64 of file DSSupport.h.

References getNode(), Offset, and setTo().

llvm::DSNodeHandle::~DSNodeHandle  )  [inline]
 

Definition at line 68 of file DSSupport.h.

References setTo().


Member Function Documentation

void llvm::DSNodeHandle::addEdgeTo const DSNodeHandle N  )  [inline]
 

Definition at line 115 of file DSSupport.h.

References addEdgeTo().

void llvm::DSNodeHandle::addEdgeTo unsigned  Off,
const DSNodeHandle Node
[inline]
 

addEdgeTo - Add an edge from the current node to the specified node. This can cause merging of nodes in the graph.

Definition at line 448 of file DSNode.h.

References llvm::DSNode::addEdgeTo(), and getNode().

Referenced by addEdgeTo().

DSNodeHandle & llvm::DSNodeHandle::getLink unsigned  Num  )  [inline]
 

Definition at line 435 of file DSNode.h.

References llvm::DSNode::getLink(), and getNode().

const DSNodeHandle & llvm::DSNodeHandle::getLink unsigned  Num  )  const [inline]
 

getLink - Treat this current node pointer as a pointer to a structure of some sort. This method will return the pointer a mem[this+Num]

Definition at line 431 of file DSNode.h.

References llvm::DSNode::getLink(), and getNode().

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

DSNode * llvm::DSNodeHandle::getNode  )  const [inline]
 

Definition at line 388 of file DSNode.h.

References llvm::DSNode::isForwarding(), llvm::DSNode::isNodeCompletelyFolded(), and llvm::DSNode::Size.

Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), addEdgeTo(), llvm::DSGraph::AssertCallSiteInGraph(), CallSiteUsesAliveArgs(), CanReachAliveNodes(), llvm::DSGraph::cloneInto(), llvm::DSGraph::computeNodeMapping(), DSNodeHandle(), llvm::DSNode::foldNodeCompletely(), llvm::DSCallSite::getCalleeFunc(), llvm::DSCallSite::getCalleeNode(), llvm::ReachabilityCloner::getClonedNH(), llvm::DSGraph::getDSCallSiteForCallSite(), llvm::DSNode::getForwardNode(), getLink(), llvm::FunctionModRefInfo::getNodeId(), hasLink(), killIfUselessEdge(), markIncomplete(), markIncompleteNode(), llvm::DSCallSite::markReachableNodes(), llvm::DSNode::markReachableNodes(), llvm::ReachabilityCloner::merge(), llvm::DSGraph::mergeInGraph(), mergeWith(), llvm::DSNode::mergeWith(), operator<(), operator=(), operator==(), PathExistsToClonedNode(), llvm::DSGraph::removeTriviallyDeadNodes(), llvm::TDDataStructures::runOnModule(), setLink(), setTo(), llvm::ModRefInfoBuilder::visitLoadInst(), and llvm::ModRefInfoBuilder::visitStoreInst().

unsigned llvm::DSNodeHandle::getOffset  )  const [inline]
 

Definition at line 98 of file DSSupport.h.

Referenced by llvm::DOTGraphTraits< const DSGraph * >::addCustomGraphFeatures(), llvm::DSGraph::cloneInto(), llvm::DSGraph::computeNodeMapping(), llvm::DOTGraphTraits< const DSGraph * >::edgeTargetsEdgeSource(), llvm::ReachabilityCloner::getClonedNH(), llvm::DOTGraphTraits< const DSGraph * >::getEdgeTarget(), llvm::ReachabilityCloner::merge(), mergeWith(), and llvm::DSNode::mergeWith().

bool llvm::DSNodeHandle::hasLink unsigned  Num  )  const [inline]
 

hasLink - Return true if there is a link at the specified offset...

Definition at line 422 of file DSNode.h.

References getNode(), and llvm::DSNode::hasLink().

bool llvm::DSNodeHandle::isNull  )  const [inline]
 

isNull - Check to see if getNode() == 0, without going through the trouble of checking to see if we are forwarding...

Definition at line 94 of file DSSupport.h.

Referenced by llvm::DSNode::addEdgeTo(), llvm::DSGraph::computeNodeMapping(), llvm::DSNode::forwardNode(), llvm::ReachabilityCloner::getClonedNH(), llvm::DSNode::isForwarding(), llvm::ReachabilityCloner::merge(), llvm::DSGraph::mergeInGraph(), and mergeWith().

void llvm::DSNodeHandle::mergeWith const DSNodeHandle N  )  const [inline]
 

mergeWith - Merge the logical node pointed to by 'this' with the node pointed to by 'N'.

Definition at line 456 of file DSNode.h.

References getNode(), getOffset(), isNull(), llvm::DSNode::mergeWith(), and setTo().

Referenced by llvm::DSNode::addEdgeTo(), llvm::DSGraph::cloneInto(), llvm::ReachabilityCloner::getClonedNH(), llvm::ReachabilityCloner::merge(), llvm::DSGraph::mergeInGraph(), llvm::DSCallSite::mergeWith(), and llvm::DSNode::mergeWith().

bool llvm::DSNodeHandle::operator!= const DSNodeHandle H  )  const [inline]
 

Definition at line 84 of file DSSupport.h.

bool llvm::DSNodeHandle::operator< const DSNodeHandle H  )  const [inline]
 

Definition at line 76 of file DSSupport.h.

References getNode(), N, and Offset.

DSNodeHandle& llvm::DSNodeHandle::operator= const DSNodeHandle H  )  [inline]
 

Definition at line 69 of file DSSupport.h.

References getNode(), Offset, and setTo().

bool llvm::DSNodeHandle::operator== const DSNodeHandle H  )  const [inline]
 

Definition at line 80 of file DSSupport.h.

References getNode(), and Offset.

bool llvm::DSNodeHandle::operator> const DSNodeHandle H  )  const [inline]
 

Definition at line 79 of file DSSupport.h.

void llvm::DSNodeHandle::setLink unsigned  Num,
const DSNodeHandle NH
[inline]
 

Definition at line 440 of file DSNode.h.

References getNode(), and llvm::DSNode::setLink().

void llvm::DSNodeHandle::setOffset unsigned  O  )  [inline]
 

Definition at line 103 of file DSSupport.h.

void llvm::DSNodeHandle::setTo DSNode N,
unsigned  O
const [inline]
 

Definition at line 404 of file DSNode.h.

References llvm::DSNode::DEAD, getNode(), llvm::DSNode::isForwarding(), llvm::DSNode::NodeType, llvm::DSNode::NumReferrers, and llvm::DSNode::Size.

Referenced by llvm::DSGraph::computeNodeMapping(), llvm::DSNode::dropAllReferences(), DSNodeHandle(), llvm::DSNode::forwardNode(), killIfUselessEdge(), mergeWith(), operator=(), llvm::DSNode::stopForwarding(), and ~DSNodeHandle().

void llvm::DSNodeHandle::swap DSNodeHandle NH  )  [inline]
 

Definition at line 86 of file DSSupport.h.

References N, and Offset.


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