LLVM API Documentation

llvm::DSCallSite Class Reference

#include <DSSupport.h>

Collaboration diagram for llvm::DSCallSite:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DSCallSite (CallSite CS, const DSNodeHandle &rv, DSNode *Callee, std::vector< DSNodeHandle > &Args)
 DSCallSite (CallSite CS, const DSNodeHandle &rv, Function *Callee, std::vector< DSNodeHandle > &Args)
 DSCallSite (const DSCallSite &DSCS)
template<typename MapTy>
 DSCallSite (const DSCallSite &FromCall, MapTy &NodeMap)
const DSCallSiteoperator= (const DSCallSite &RHS)
bool isDirectCall () const
bool isIndirectCall () const
FunctiongetCaller () const
CallSite getCallSite () const
DSNodeHandlegetRetVal ()
const DSNodeHandlegetRetVal () const
DSNodegetCalleeNode () const
FunctiongetCalleeFunc () const
unsigned getNumPtrArgs () const
DSNodeHandlegetPtrArg (unsigned i)
const DSNodeHandlegetPtrArg (unsigned i) const
void addPtrArg (const DSNodeHandle &NH)
void swap (DSCallSite &CS)
void mergeWith (DSCallSite &CS)
void markReachableNodes (hash_set< const DSNode * > &Nodes) const
bool operator< (const DSCallSite &CS) const
bool operator== (const DSCallSite &CS) const

Detailed Description

DSCallSite - Representation of a call site via its call instruction, the DSNode handle for the callee function (or function pointer), and the DSNode handles for the function arguments.

Definition at line 165 of file DSSupport.h.


Constructor & Destructor Documentation

llvm::DSCallSite::DSCallSite ( CallSite  CS,
const DSNodeHandle rv,
DSNode Callee,
std::vector< DSNodeHandle > &  Args 
) [inline]

Constructor. Note - This ctor destroys the argument vector passed in. On exit, the argument vector is empty.

Definition at line 201 of file DSSupport.h.

llvm::DSCallSite::DSCallSite ( CallSite  CS,
const DSNodeHandle rv,
Function Callee,
std::vector< DSNodeHandle > &  Args 
) [inline]

Definition at line 207 of file DSSupport.h.

llvm::DSCallSite::DSCallSite ( const DSCallSite DSCS  )  [inline]

Definition at line 214 of file DSSupport.h.

template<typename MapTy>
llvm::DSCallSite::DSCallSite ( const DSCallSite FromCall,
MapTy NodeMap 
) [inline]

Mapping copy constructor - This constructor takes a preexisting call site to copy plus a map that specifies how the links should be transformed. This is useful when moving a call site from one graph to another.

Definition at line 223 of file DSSupport.h.

References CallArgs, CalleeF, CalleeN, RetVal, and Site.


Member Function Documentation

void llvm::DSCallSite::addPtrArg ( const DSNodeHandle NH  )  [inline]

Definition at line 275 of file DSSupport.h.

Referenced by llvm::ReachabilityCloner::mergeCallSite().

Function* llvm::DSCallSite::getCalleeFunc (  )  const [inline]

Definition at line 260 of file DSSupport.h.

References llvm::DSNodeHandle::getNode().

Referenced by GetAllCallees(), and removeIdenticalCalls().

DSNode* llvm::DSCallSite::getCalleeNode (  )  const [inline]

Definition at line 257 of file DSSupport.h.

References llvm::DSNodeHandle::getNode().

Referenced by llvm::DSGraph::AssertCallSiteInGraph(), CallSiteUsesAliveArgs(), GetAllCallees(), markReachableNodes(), and removeIdenticalCalls().

Function & DSCallSite::getCaller (  )  const

Definition at line 1174 of file DataStructure.cpp.

References llvm::CallSite::getInstruction(), llvm::BasicBlock::getParent(), and llvm::Instruction::getParent().

CallSite llvm::DSCallSite::getCallSite (  )  const [inline]

Definition at line 253 of file DSSupport.h.

unsigned llvm::DSCallSite::getNumPtrArgs (  )  const [inline]

Definition at line 264 of file DSSupport.h.

Referenced by llvm::DSGraph::AssertCallSiteInGraph(), CallSiteUsesAliveArgs(), llvm::DSGraph::computeCalleeCallerMapping(), markReachableNodes(), llvm::ReachabilityCloner::mergeCallSite(), llvm::DSGraph::mergeInGraph(), mergeWith(), and removeIdenticalCalls().

const DSNodeHandle& llvm::DSCallSite::getPtrArg ( unsigned  i  )  const [inline]

Definition at line 270 of file DSSupport.h.

DSNodeHandle& llvm::DSCallSite::getPtrArg ( unsigned  i  )  [inline]

Definition at line 266 of file DSSupport.h.

Referenced by llvm::DSGraph::AssertCallSiteInGraph(), CallSiteUsesAliveArgs(), llvm::DSGraph::computeCalleeCallerMapping(), markReachableNodes(), llvm::ReachabilityCloner::mergeCallSite(), llvm::DSGraph::mergeInGraph(), mergeWith(), and removeIdenticalCalls().

const DSNodeHandle& llvm::DSCallSite::getRetVal (  )  const [inline]

Definition at line 255 of file DSSupport.h.

DSNodeHandle& llvm::DSCallSite::getRetVal (  )  [inline]

Definition at line 254 of file DSSupport.h.

Referenced by llvm::DSGraph::AssertCallSiteInGraph(), CallSiteUsesAliveArgs(), llvm::DSGraph::computeCalleeCallerMapping(), markReachableNodes(), llvm::ReachabilityCloner::mergeCallSite(), llvm::DSGraph::mergeInGraph(), mergeWith(), and removeIdenticalCalls().

bool llvm::DSCallSite::isDirectCall (  )  const [inline]

isDirectCall - Return true if this call site is a direct call of the function specified by getCalleeFunc. If not, it is an indirect call to the node specified by getCalleeNode.

Definition at line 247 of file DSSupport.h.

Referenced by GetAllCallees(), isIndirectCall(), operator<(), and removeIdenticalCalls().

bool llvm::DSCallSite::isIndirectCall (  )  const [inline]

Definition at line 248 of file DSSupport.h.

References isDirectCall().

Referenced by llvm::DSGraph::AssertCallSiteInGraph(), CallSiteUsesAliveArgs(), markReachableNodes(), operator<(), and removeIdenticalCalls().

void DSCallSite::markReachableNodes ( hash_set< const DSNode * > &  Nodes  )  const

markReachableNodes - This method recursively traverses the specified DSNodes, marking any nodes which are reachable. All reachable nodes it adds to the set, which allows it to only traverse visited nodes once.

Definition at line 1995 of file DataStructure.cpp.

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

void llvm::DSCallSite::mergeWith ( DSCallSite CS  )  [inline]

mergeWith - Merge the return value and parameters of the these two call sites.

Definition at line 292 of file DSSupport.h.

References getNumPtrArgs(), getPtrArg(), getRetVal(), and llvm::DSNodeHandle::mergeWith().

bool llvm::DSCallSite::operator< ( const DSCallSite CS  )  const [inline]

Definition at line 310 of file DSSupport.h.

References CallArgs, CalleeF, CalleeN, isDirectCall(), isIndirectCall(), and RetVal.

const DSCallSite& llvm::DSCallSite::operator= ( const DSCallSite RHS  )  [inline]

Definition at line 234 of file DSSupport.h.

References CallArgs, CalleeF, CalleeN, RetVal, and Site.

bool llvm::DSCallSite::operator== ( const DSCallSite CS  )  const [inline]

Definition at line 325 of file DSSupport.h.

References CallArgs, CalleeF, CalleeN, and RetVal.

void llvm::DSCallSite::swap ( DSCallSite CS  )  [inline]

Definition at line 279 of file DSSupport.h.

References CallArgs, CalleeF, CalleeN, RetVal, and Site.


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