LLVM API Documentation

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 56 of file DSSupport.h.


Constructor & Destructor Documentation

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

Definition at line 62 of file DSSupport.h.

References setTo().

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

Definition at line 65 of file DSSupport.h.

References H, and setTo().

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

Definition at line 69 of file DSSupport.h.

References setTo().


Member Function Documentation

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

Definition at line 116 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 487 of file DSNode.h.

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

Referenced by addEdgeTo().

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

Definition at line 474 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 470 of file DSNode.h.

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

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

Definition at line 423 of file DSNode.h.

References llvm::DSNode::isForwarding().

Referenced by addEdgeTo(), llvm::DSGraph::AssertCallSiteInGraph(), CallSiteUsesAliveArgs(), llvm::DSGraph::cloneInto(), llvm::DSGraph::computeNodeMapping(), EliminateUsesOfECGlobals(), llvm::DSNode::foldNodeCompletely(), llvm::DSCallSite::getCalleeFunc(), llvm::DSCallSite::getCalleeNode(), llvm::ReachabilityCloner::getClonedNH(), llvm::DSNode::getForwardNode(), getLink(), hasLink(), killIfUselessEdge(), llvm::DSCallSite::markReachableNodes(), llvm::ReachabilityCloner::merge(), llvm::DSGraph::mergeInGraph(), mergeWith(), llvm::DSNode::mergeWith(), operator<(), operator==(), llvm::DSGraph::removeDeadNodes(), removeIdenticalCalls(), llvm::DSGraph::removeTriviallyDeadNodes(), setLink(), and setTo().

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

Definition at line 99 of file DSSupport.h.

Referenced by llvm::DSGraph::computeNodeMapping(), llvm::ReachabilityCloner::getClonedNH(), llvm::ReachabilityCloner::merge(), 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 461 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 95 of file DSSupport.h.

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

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 495 of file DSNode.h.

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

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

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

Definition at line 85 of file DSSupport.h.

References H.

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

Definition at line 77 of file DSSupport.h.

References getNode(), and H.

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

Definition at line 70 of file DSSupport.h.

References H, and setTo().

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

Definition at line 81 of file DSSupport.h.

References getNode(), and H.

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

Definition at line 80 of file DSSupport.h.

References H.

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

Definition at line 479 of file DSNode.h.

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

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

Definition at line 104 of file DSSupport.h.

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

Definition at line 443 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 87 of file DSSupport.h.

References N, and Offset.


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