Static Value-Flow Analysis
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
SVF::MultiOpndStmt Class Reference

#include <SVFStatements.h>

Inheritance diagram for SVF::MultiOpndStmt:
SVF::SVFStmt SVF::GenericEdge< NodeTy > SVF::BinaryOPStmt SVF::CmpStmt SVF::PhiStmt SVF::SelectStmt

Public Types

typedef std::vector< SVFVar * > OPVars
 
- Public Types inherited from SVF::SVFStmt
enum  PEDGEK {
  Addr , Copy , Store , Load ,
  Call , Ret , Gep , Phi ,
  Select , Cmp , BinaryOp , UnaryOp ,
  Branch , ThreadFork , ThreadJoin
}
 
typedef GenericNode< SVFVar, SVFStmt >::GEdgeSetTy SVFStmtSetTy
 
typedef Map< EdgeID, SVFStmtSetTyPAGEdgeToSetMapTy
 
typedef PAGEdgeToSetMapTy KindToSVFStmtMapTy
 
typedef SVFStmtSetTy PAGEdgeSetTy
 
- Public Types inherited from SVF::GenericEdge< NodeTy >
typedef NodeTy NodeType
 Node type.
 
typedef u64_t GEdgeFlag
 
typedef s64_t GEdgeKind
 
typedef struct SVF::GenericEdge::equalGEdge equalGEdge
 Add the hash function for std::set (we also can overload operator< to implement this)
 

Public Member Functions

const SVFVargetOpVar (u32_t pos) const
 Operand SVFVars.
 
const SVFVargetRes () const
 Result SVFVar.
 
NodeID getOpVarID (u32_t pos) const
 
NodeID getResID () const
 
u32_t getOpVarNum () const
 
const OPVarsgetOpndVars () const
 
OPVars::const_iterator opVarBegin () const
 
OPVars::const_iterator opVerEnd () const
 
- Public Member Functions inherited from SVF::SVFStmt
 SVFStmt (SVFVar *s, SVFVar *d, GEdgeFlag k, bool real=true)
 Constructor.
 
 ~SVFStmt ()
 Destructor.
 
EdgeID getEdgeID () const
 Return Edge ID.
 
bool isPTAEdge () const
 Whether src and dst nodes are both of pointer type.
 
const SVFInstructiongetInst () const
 Get/set methods for llvm instruction.
 
void setValue (const SVFValue *val)
 
const SVFValuegetValue () const
 
void setBB (const SVFBasicBlock *bb)
 
const SVFBasicBlockgetBB () const
 
void setICFGNode (ICFGNode *node)
 
ICFGNodegetICFGNode () const
 
virtual const std::string toString () const
 
- Public Member Functions inherited from SVF::GenericEdge< NodeTy >
 GenericEdge (NodeTy *s, NodeTy *d, GEdgeFlag k)
 Constructor.
 
virtual ~GenericEdge ()
 Destructor.
 
NodeID getSrcID () const
 get methods of the components
 
NodeID getDstID () const
 
GEdgeKind getEdgeKind () const
 
GEdgeKind getEdgeKindWithoutMask () const
 
NodeTypegetSrcNode () const
 
NodeTypegetDstNode () const
 
virtual bool operator== (const GenericEdge< NodeType > *rhs) const
 

Static Public Member Functions

static bool classof (const MultiOpndStmt *)
 Methods for support type inquiry through isa, cast, and dyn_cast:
 
static bool classof (const SVFStmt *node)
 
static bool classof (const GenericPAGEdgeTy *node)
 
- Static Public Member Functions inherited from SVF::SVFStmt
static bool classof (const SVFStmt *)
 ClassOf.
 
static bool classof (const GenericPAGEdgeTy *edge)
 
static GEdgeFlag makeEdgeFlagWithAddionalOpnd (GEdgeKind k, const SVFVar *var)
 
static GEdgeFlag makeEdgeFlagWithCallInst (GEdgeKind k, const ICFGNode *cs)
 
static GEdgeFlag makeEdgeFlagWithStoreInst (GEdgeKind k, const ICFGNode *store)
 

Protected Member Functions

 MultiOpndStmt (SVFVar *r, const OPVars &opnds, GEdgeFlag k)
 Constructor, only used by subclasses but not external users.
 
 MultiOpndStmt (GEdgeFlag k)
 Constructs empty MultiOpndStmt (for SVFIRReader/serialization)
 
- Protected Member Functions inherited from SVF::SVFStmt
 SVFStmt (GEdgeFlag k)
 Private constructor for reading SVFIR from file without side-effect.
 

Protected Attributes

OPVars opVars
 

Private Member Functions

 MultiOpndStmt ()
 place holder
 
 MultiOpndStmt (const MultiOpndStmt &)
 place holder
 
void operator= (const MultiOpndStmt &)
 place holder
 
SVFVargetSrcNode ()
 not allowed, use getOpVar(idx) instead
 
SVFVargetDstNode ()
 not allowed, use getRes() instead
 
NodeID getSrcID ()
 not allowed, use getOpVarID(idx) instead
 
NodeID getDstID ()
 not allowed, use getResID() instead
 

Friends

class SVFIRWriter
 
class SVFIRReader
 

Additional Inherited Members

- Static Public Attributes inherited from SVF::SVFStmt
static u32_t totalEdgeNum
 Total edge number.
 
- Static Protected Attributes inherited from SVF::GenericEdge< NodeTy >
static constexpr unsigned char EdgeKindMaskBits = 8
 We use the lower 8 bits to denote edge kind.
 
static constexpr u64_t EdgeKindMask = (~0ULL) >> (64 - EdgeKindMaskBits)
 

Detailed Description

Definition at line 732 of file SVFStatements.h.

Member Typedef Documentation

◆ OPVars

Definition at line 738 of file SVFStatements.h.

Constructor & Destructor Documentation

◆ MultiOpndStmt() [1/4]

SVF::MultiOpndStmt::MultiOpndStmt ( )
private

place holder

◆ MultiOpndStmt() [2/4]

SVF::MultiOpndStmt::MultiOpndStmt ( const MultiOpndStmt )
private

place holder

◆ MultiOpndStmt() [3/4]

MultiOpndStmt::MultiOpndStmt ( SVFVar r,
const OPVars opnds,
GEdgeFlag  k 
)
protected

Constructor, only used by subclasses but not external users.

Definition at line 345 of file SVFStatements.cpp.

346 : SVFStmt(opnds.at(0), r, k), opVars(opnds)
347{
348}
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

◆ MultiOpndStmt() [4/4]

SVF::MultiOpndStmt::MultiOpndStmt ( GEdgeFlag  k)
inlineprotected

Constructs empty MultiOpndStmt (for SVFIRReader/serialization)

Definition at line 754 of file SVFStatements.h.

754: SVFStmt(k) {}
SVFStmt(GEdgeFlag k)
Private constructor for reading SVFIR from file without side-effect.

Member Function Documentation

◆ classof() [1/3]

static bool SVF::MultiOpndStmt::classof ( const GenericPAGEdgeTy node)
inlinestatic

Definition at line 768 of file SVFStatements.h.

769 {
770 return node->getEdgeKind() == Phi || node->getEdgeKind() == Select ||
771 node->getEdgeKind() == BinaryOp || node->getEdgeKind() == Cmp;
772 }

◆ classof() [2/3]

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

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

Definition at line 759 of file SVFStatements.h.

760 {
761 return true;
762 }

◆ classof() [3/3]

static bool SVF::MultiOpndStmt::classof ( const SVFStmt node)
inlinestatic

Definition at line 763 of file SVFStatements.h.

764 {
765 return node->getEdgeKind() == Phi || node->getEdgeKind() == Select ||
766 node->getEdgeKind() == BinaryOp || node->getEdgeKind() == Cmp;
767 }

◆ getDstID()

NodeID SVF::MultiOpndStmt::getDstID ( )
private

not allowed, use getResID() instead

◆ getDstNode()

SVFVar * SVF::MultiOpndStmt::getDstNode ( )
private

not allowed, use getRes() instead

◆ getOpndVars()

const OPVars & SVF::MultiOpndStmt::getOpndVars ( ) const
inline

Definition at line 795 of file SVFStatements.h.

796 {
797 return opVars;
798 }

◆ getOpVar()

const SVFVar * SVF::MultiOpndStmt::getOpVar ( u32_t  pos) const
inline

Operand SVFVars.

Operands and result at a BinaryNode e.g., p = q + r, p is resVar and r is OpVar

Definition at line 778 of file SVFStatements.h.

779 {
780 return opVars.at(pos);
781 }

◆ getOpVarID()

NodeID MultiOpndStmt::getOpVarID ( u32_t  pos) const

Definition at line 284 of file SVFStatements.cpp.

285{
286 return getOpVar(pos)->getId();
287}
const SVFVar * getOpVar(u32_t pos) const
Operand SVFVars.
NodeID getId() const
Get ID.

◆ getOpVarNum()

u32_t SVF::MultiOpndStmt::getOpVarNum ( ) const
inline

Definition at line 791 of file SVFStatements.h.

792 {
793 return opVars.size();
794 }

◆ getRes()

const SVFVar * SVF::MultiOpndStmt::getRes ( ) const
inline

Result SVFVar.

Definition at line 783 of file SVFStatements.h.

784 {
785 return SVFStmt::getDstNode();
786 }
NodeType * getDstNode() const

◆ getResID()

NodeID MultiOpndStmt::getResID ( ) const

Definition at line 289 of file SVFStatements.cpp.

290{
291 return getRes()->getId();
292}
const SVFVar * getRes() const
Result SVFVar.

◆ getSrcID()

NodeID SVF::MultiOpndStmt::getSrcID ( )
private

not allowed, use getOpVarID(idx) instead

◆ getSrcNode()

SVFVar * SVF::MultiOpndStmt::getSrcNode ( )
private

not allowed, use getOpVar(idx) instead

◆ operator=()

void SVF::MultiOpndStmt::operator= ( const MultiOpndStmt )
private

place holder

◆ opVarBegin()

OPVars::const_iterator SVF::MultiOpndStmt::opVarBegin ( ) const
inline

Definition at line 799 of file SVFStatements.h.

800 {
801 return opVars.begin();
802 }

◆ opVerEnd()

OPVars::const_iterator SVF::MultiOpndStmt::opVerEnd ( ) const
inline

Definition at line 803 of file SVFStatements.h.

804 {
805 return opVars.end();
806 }

Friends And Related Symbol Documentation

◆ SVFIRReader

Definition at line 735 of file SVFStatements.h.

◆ SVFIRWriter

Definition at line 734 of file SVFStatements.h.

Member Data Documentation

◆ opVars

OPVars SVF::MultiOpndStmt::opVars
protected

Definition at line 750 of file SVFStatements.h.


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