SVF
Public Member Functions | Private Attributes | List of all members
SVF::RetBlockNode Class Reference

#include <ICFGNode.h>

Inheritance diagram for SVF::RetBlockNode:
SVF::InterBlockNode SVF::ICFGNode SVF::GenericNode< NodeTy, EdgeTy >

Public Member Functions

 RetBlockNode (NodeID id, const Instruction *c, CallBlockNode *cb)
 
const InstructiongetCallSite () const
 Return callsite. More...
 
const CallBlockNodegetCallBlockNode () const
 
const PAGNodegetActualRet () const
 Return actual return parameter. More...
 
void addActualRet (const PAGNode *ar)
 Add actual return parameter. More...
 
virtual const std::string toString () const
 
- Public Member Functions inherited from SVF::InterBlockNode
 InterBlockNode (NodeID id, ICFGNodeK k)
 Constructor. More...
 
- Public Member Functions inherited from SVF::ICFGNode
 ICFGNode (NodeID i, ICFGNodeK k)
 Constructor. More...
 
virtual const SVFFunctiongetFun () const
 Return the function of this ICFGNode. More...
 
virtual const BasicBlockgetBB () const
 Return the function of this ICFGNode. More...
 
void dump () const
 
void addVFGNode (const VFGNode *vfgNode)
 
const VFGNodeListgetVFGNodes () const
 
void addPAGEdge (const PAGEdge *edge)
 
const PAGEdgeListgetPAGEdges () const
 
- Public Member Functions inherited from SVF::GenericNode< NodeTy, EdgeTy >
 GenericNode (NodeID i, GNodeK k)
 Constructor. More...
 
virtual ~GenericNode ()
 Destructor. More...
 
NodeID getId () const
 Get ID. More...
 
GNodeK getNodeKind () const
 Get node kind. More...
 
const GEdgeSetTygetOutEdges () const
 
const GEdgeSetTygetInEdges () const
 
bool hasIncomingEdge () const
 Has incoming/outgoing edge set. More...
 
bool hasOutgoingEdge () const
 
iterator OutEdgeBegin ()
 iterators More...
 
iterator OutEdgeEnd ()
 
iterator InEdgeBegin ()
 
iterator InEdgeEnd ()
 
const_iterator OutEdgeBegin () const
 
const_iterator OutEdgeEnd () const
 
const_iterator InEdgeBegin () const
 
const_iterator InEdgeEnd () const
 
virtual iterator directOutEdgeBegin ()
 Iterators used for SCC detection, overwrite it in child class if necessory. More...
 
virtual iterator directOutEdgeEnd ()
 
virtual iterator directInEdgeBegin ()
 
virtual iterator directInEdgeEnd ()
 
virtual const_iterator directOutEdgeBegin () const
 
virtual const_iterator directOutEdgeEnd () const
 
virtual const_iterator directInEdgeBegin () const
 
virtual const_iterator directInEdgeEnd () const
 
bool addIncomingEdge (EdgeType *inEdge)
 Add incoming and outgoing edges. More...
 
bool addOutgoingEdge (EdgeType *outEdge)
 
Size_t removeIncomingEdge (EdgeType *edge)
 
Size_t removeOutgoingEdge (EdgeType *edge)
 
EdgeTypehasIncomingEdge (EdgeType *edge) const
 Find incoming and outgoing edges. More...
 
EdgeTypehasOutgoingEdge (EdgeType *edge) const
 

Static Public Member Functions

static bool classof (const RetBlockNode *)
 Methods for support type inquiry through isa, cast, and dyn_cast: More...
 
static bool classof (const InterBlockNode *node)
 
static bool classof (const ICFGNode *node)
 
static bool classof (const GenericICFGNodeTy *node)
 
- Static Public Member Functions inherited from SVF::InterBlockNode
static bool classof (const InterBlockNode *)
 Methods for support type inquiry through isa, cast, and dyn_cast: More...
 
static bool classof (const ICFGNode *node)
 
static bool classof (const GenericICFGNodeTy *node)
 

Private Attributes

const Instructioncs
 
const PAGNodeactualRet
 
const CallBlockNodecallBlockNode
 

Additional Inherited Members

- Public Types inherited from SVF::ICFGNode
enum  ICFGNodeK {
  IntraBlock, FunEntryBlock, FunExitBlock, FunCallBlock,
  FunRetBlock, GlobalBlock
}
 
typedef ICFGEdge::ICFGEdgeSetTy::iterator iterator
 
typedef ICFGEdge::ICFGEdgeSetTy::const_iterator const_iterator
 
typedef Set< const CallPE * > CallPESet
 
typedef Set< const RetPE * > RetPESet
 
typedef std::list< const VFGNode * > VFGNodeList
 
typedef std::list< const PAGEdge * > PAGEdgeList
 
- Public Types inherited from SVF::GenericNode< NodeTy, EdgeTy >
typedef NodeTy NodeType
 
typedef EdgeTy EdgeType
 
typedef s32_t GNodeK
 Edge kind. More...
 
typedef OrderedSet< EdgeType *, typename EdgeType::equalGEdge > GEdgeSetTy
 
typedef GEdgeSetTy::iterator iterator
 
typedef GEdgeSetTy::const_iterator const_iterator
 
- Protected Attributes inherited from SVF::ICFGNode
const SVFFunctionfun
 
const BasicBlockbb
 
VFGNodeList VFGNodes
 
PAGEdgeList pagEdges
 

Detailed Description

Return ICFGNode containing (at most one) ActualRetVFGNode at a callsite

Definition at line 459 of file ICFGNode.h.

Constructor & Destructor Documentation

◆ RetBlockNode()

SVF::RetBlockNode::RetBlockNode ( NodeID  id,
const Instruction c,
CallBlockNode cb 
)
inline

Definition at line 467 of file ICFGNode.h.

467  :
468  InterBlockNode(id, FunRetBlock), cs(c), actualRet(nullptr), callBlockNode(cb)
469  {
471  bb = cs->getParent();
472  }
const CallBlockNode * callBlockNode
Definition: ICFGNode.h:465
const SVFFunction * fun
Definition: ICFGNode.h:132
const BasicBlock * bb
Definition: ICFGNode.h:133
const PAGNode * actualRet
Definition: ICFGNode.h:464
InterBlockNode(NodeID id, ICFGNodeK k)
Constructor.
Definition: ICFGNode.h:218
static LLVMModuleSet * getLLVMModuleSet()
Definition: LLVMModule.h:69
const Instruction * cs
Definition: ICFGNode.h:463
const SVFFunction * getSVFFunction(const Function *fun) const
Definition: LLVMModule.h:110

Member Function Documentation

◆ addActualRet()

void SVF::RetBlockNode::addActualRet ( const PAGNode ar)
inline

Add actual return parameter.

Definition at line 491 of file ICFGNode.h.

492  {
493  actualRet = ar;
494  }
const PAGNode * actualRet
Definition: ICFGNode.h:464

◆ classof() [1/4]

static bool SVF::RetBlockNode::classof ( const RetBlockNode )
inlinestatic

Methods for support type inquiry through isa, cast, and dyn_cast:

Definition at line 498 of file ICFGNode.h.

499  {
500  return true;
501  }

◆ classof() [2/4]

static bool SVF::RetBlockNode::classof ( const InterBlockNode node)
inlinestatic

Definition at line 503 of file ICFGNode.h.

504  {
505  return node->getNodeKind() == FunRetBlock;
506  }

◆ classof() [3/4]

static bool SVF::RetBlockNode::classof ( const ICFGNode node)
inlinestatic

Definition at line 508 of file ICFGNode.h.

509  {
510  return node->getNodeKind() == FunRetBlock;
511  }

◆ classof() [4/4]

static bool SVF::RetBlockNode::classof ( const GenericICFGNodeTy node)
inlinestatic

Definition at line 513 of file ICFGNode.h.

514  {
515  return node->getNodeKind() == FunRetBlock;
516  }

◆ getActualRet()

const PAGNode* SVF::RetBlockNode::getActualRet ( ) const
inline

Return actual return parameter.

Definition at line 485 of file ICFGNode.h.

486  {
487  return actualRet;
488  }
const PAGNode * actualRet
Definition: ICFGNode.h:464

◆ getCallBlockNode()

const CallBlockNode* SVF::RetBlockNode::getCallBlockNode ( ) const
inline

Definition at line 480 of file ICFGNode.h.

481  {
482  return callBlockNode;
483  }
const CallBlockNode * callBlockNode
Definition: ICFGNode.h:465

◆ getCallSite()

const Instruction* SVF::RetBlockNode::getCallSite ( ) const
inline

Return callsite.

Definition at line 475 of file ICFGNode.h.

476  {
477  return cs;
478  }
const Instruction * cs
Definition: ICFGNode.h:463

◆ toString()

const std::string RetBlockNode::toString ( ) const
virtual

Reimplemented from SVF::ICFGNode.

Definition at line 122 of file ICFG.cpp.

122  {
123  std::string str;
124  raw_string_ostream rawstr(str);
125  rawstr << "RetBlockNode ID: " << getId();
126  rawstr << value2String(getCallSite()) << " {fun: " << getFun()->getName() << "}";
127  return rawstr.str();
128 }
const Instruction * getCallSite() const
Return callsite.
Definition: ICFGNode.h:475
virtual const SVFFunction * getFun() const
Return the function of this ICFGNode.
Definition: ICFGNode.h:80
const llvm::StringRef getName() const
llvm::raw_string_ostream raw_string_ostream
Definition: BasicTypes.h:100
const std::string value2String(const Value *value)
Definition: SVFUtil.cpp:359
NodeID getId() const
Get ID.
Definition: GenericGraph.h:164

Member Data Documentation

◆ actualRet

const PAGNode* SVF::RetBlockNode::actualRet
private

Definition at line 464 of file ICFGNode.h.

◆ callBlockNode

const CallBlockNode* SVF::RetBlockNode::callBlockNode
private

Definition at line 465 of file ICFGNode.h.

◆ cs

const Instruction* SVF::RetBlockNode::cs
private

Definition at line 463 of file ICFGNode.h.


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