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

#include <ICFGNode.h>

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

Public Member Functions

 IntraBlockNode (NodeID id, const Instruction *i)
 
const InstructiongetInst () const
 
const std::string toString () const
 
- 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 IntraBlockNode *)
 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 Instructioninst
 

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

ICFG node stands for a program statement

Definition at line 175 of file ICFGNode.h.

Constructor & Destructor Documentation

◆ IntraBlockNode()

SVF::IntraBlockNode::IntraBlockNode ( NodeID  id,
const Instruction i 
)
inline

Definition at line 181 of file ICFGNode.h.

181  : ICFGNode(id, IntraBlock), inst(i)
182  {
184  bb = inst->getParent();
185  }
const SVFFunction * fun
Definition: ICFGNode.h:132
ICFGNode(NodeID i, ICFGNodeK k)
Constructor.
Definition: ICFGNode.h:74
const Instruction * inst
Definition: ICFGNode.h:178
const BasicBlock * bb
Definition: ICFGNode.h:133
static LLVMModuleSet * getLLVMModuleSet()
Definition: LLVMModule.h:69
const SVFFunction * getSVFFunction(const Function *fun) const
Definition: LLVMModule.h:110

Member Function Documentation

◆ classof() [1/3]

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

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

Definition at line 194 of file ICFGNode.h.

195  {
196  return true;
197  }

◆ classof() [2/3]

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

Definition at line 199 of file ICFGNode.h.

200  {
201  return node->getNodeKind() == IntraBlock;
202  }

◆ classof() [3/3]

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

Definition at line 204 of file ICFGNode.h.

205  {
206  return node->getNodeKind() == IntraBlock;
207  }

◆ getInst()

const Instruction* SVF::IntraBlockNode::getInst ( ) const
inline

Definition at line 187 of file ICFGNode.h.

188  {
189  return inst;
190  }
const Instruction * inst
Definition: ICFGNode.h:178

◆ toString()

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

Reimplemented from SVF::ICFGNode.

Definition at line 80 of file ICFG.cpp.

80  {
81  std::string str;
82  raw_string_ostream rawstr(str);
83  rawstr << "IntraBlockNode ID: " << getId();
84  rawstr << value2String(getInst()) << " {fun: " << getFun()->getName() << "}";
85  return rawstr.str();
86 }
virtual const SVFFunction * getFun() const
Return the function of this ICFGNode.
Definition: ICFGNode.h:80
const llvm::StringRef getName() const
const Instruction * getInst() const
Definition: ICFGNode.h:187
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

◆ inst

const Instruction* SVF::IntraBlockNode::inst
private

Definition at line 178 of file ICFGNode.h.


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