Static Value-Flow Analysis
Loading...
Searching...
No Matches
SVF::MultiOpndStmt Class Reference

#include <SVFStatements.h>

Inheritance diagram for SVF::MultiOpndStmt:
SVF::SVFStmt SVF::GenericEdge< SVFVar > SVF::BinaryOPStmt SVF::CallPE SVF::CmpStmt SVF::PhiStmt SVF::SelectStmt SVF::TDForkPE

Public Types

typedef std::vector< ValVar * > 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, SVFStmtSetTy > PAGEdgeToSetMapTy
typedef PAGEdgeToSetMapTy KindToSVFStmtMapTy
typedef SVFStmtSetTy PAGEdgeSetTy
Public Types inherited from SVF::GenericEdge< SVFVar >
typedef SVFVar 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 ValVar * getOpVar (u32_t pos) const
 Operand SVFVars.
const ValVar * getRes () const
 Result SVFVar.
NodeID getOpVarID (u32_t pos) const
NodeID getResID () const
u32_t getOpVarNum () const
const OPVars & getOpndVars () 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.
virtual bool isPTAEdge () const
 Whether src and dst nodes are both of pointer type.
void setValue (const SVFVar *val)
 Get/set methods for llvm instruction.
const SVFVar * getValue () const
void setBB (const SVFBasicBlock *bb)
const SVFBasicBlock * getBB () const
void setICFGNode (ICFGNode *node)
ICFGNode * getICFGNode () const
virtual const std::string toString () const
Public Member Functions inherited from SVF::GenericEdge< SVFVar >
 GenericEdge (SVFVar *s, SVFVar *d, GEdgeFlag k)
 Constructor.
virtual ~GenericEdge ()
 Destructor.
NodeID getSrcID () const
 get methods of the components
NodeID getDstID () const
GEdgeKind getEdgeKind () const
GEdgeKind getEdgeKindWithoutMask () const
NodeType * getSrcNode () const
NodeType * getDstNode () 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)
static const Inst2LabelMap * getInst2LabelMap ()
static const Var2LabelMap * getVar2LabelMap ()
static const u64_t * getCallEdgeLabelCounter ()
static const u64_t * getStoreEdgeLabelCounter ()
static const u64_t * getMultiOpndLabelCounter ()

Protected Member Functions

 MultiOpndStmt (ValVar *r, const OPVars &opnds, GEdgeFlag k)
 Constructor, only used by subclasses but not external users.
Protected Member Functions inherited from SVF::SVFStmt
 SVFStmt (GEdgeFlag k)
 Private constructor for reading SVFIR from file without side-effect.
 SVFStmt (SVFVar *s, SVFVar *d, GEdgeFlag k, EdgeID eid, SVFVar *value, ICFGNode *icfgNode, bool real=true)
void setBasicBlock (const SVFBasicBlock *bb)
void setCallEdgeLabelCounter (u64_t counter)
void setStoreEdgeLabelCounter (u64_t counter)
void setMultiOpndLabelCounter (u64_t counter)

Protected Attributes

OPVars opVars

Private Member Functions

 MultiOpndStmt ()
 place holder
 MultiOpndStmt (const MultiOpndStmt &)
 place holder
void operator= (const MultiOpndStmt &)
 place holder
SVFVar * getSrcNode ()
 not allowed, use getOpVar(idx) instead
SVFVar * getDstNode ()
 not allowed, use getRes() instead
NodeID getSrcID ()
 not allowed, use getOpVarID(idx) instead
NodeID getDstID ()
 not allowed, use getResID() instead

Friends

class GraphDBClient

Additional Inherited Members

Static Protected Member Functions inherited from SVF::SVFStmt
static void addInst2Labeled (const ICFGNode *cs, u32_t label)
static void addVar2Labeled (const SVFVar *var, u32_t label)
Static Protected Attributes inherited from SVF::GenericEdge< SVFVar >
static constexpr unsigned char EdgeKindMaskBits
 We use the lower 8 bits to denote edge kind.
static constexpr u64_t EdgeKindMask

Detailed Description

Definition at line 758 of file SVFStatements.h.

Member Typedef Documentation

◆ OPVars

typedef std::vector<ValVar*> SVF::MultiOpndStmt::OPVars

Definition at line 763 of file SVFStatements.h.

Constructor & Destructor Documentation

◆ MultiOpndStmt() [1/3]

SVF::MultiOpndStmt::MultiOpndStmt ( )
private

place holder

◆ MultiOpndStmt() [2/3]

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

place holder

◆ MultiOpndStmt() [3/3]

MultiOpndStmt::MultiOpndStmt ( ValVar * r,
const OPVars & opnds,
GEdgeFlag k )
protected

Constructor, only used by subclasses but not external users.

Definition at line 523 of file SVFStatements.cpp.

524 : SVFStmt(opnds.at(0), r, k), opVars(opnds)
525{
526}
SVFStmt(GEdgeFlag k)
Private constructor for reading SVFIR from file without side-effect.

Member Function Documentation

◆ classof() [1/3]

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

Definition at line 792 of file SVFStatements.h.

793 {
794 return node->getEdgeKind() == Phi || node->getEdgeKind() == Select ||
795 node->getEdgeKind() == BinaryOp || node->getEdgeKind() == Cmp ||
796 node->getEdgeKind() == Call || node->getEdgeKind() == ThreadFork;
797 }

◆ classof() [2/3]

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

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

Definition at line 782 of file SVFStatements.h.

783 {
784 return true;
785 }

◆ classof() [3/3]

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

Definition at line 786 of file SVFStatements.h.

787 {
788 return node->getEdgeKind() == Phi || node->getEdgeKind() == Select ||
789 node->getEdgeKind() == BinaryOp || node->getEdgeKind() == Cmp ||
790 node->getEdgeKind() == Call || node->getEdgeKind() == ThreadFork;
791 }

◆ 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 817 of file SVFStatements.h.

818 {
819 return opVars;
820 }

◆ getOpVar()

const ValVar * 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 803 of file SVFStatements.h.

804 {
805 return opVars.at(pos);
806 }

◆ getOpVarID()

NodeID MultiOpndStmt::getOpVarID ( u32_t pos) const

Definition at line 429 of file SVFStatements.cpp.

430{
431 return getOpVar(pos)->getId();
432}
const ValVar * getOpVar(u32_t pos) const
Operand SVFVars.
NodeID getId() const
Get ID.
Definition SVFValue.h:158

◆ getOpVarNum()

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

Definition at line 813 of file SVFStatements.h.

814 {
815 return opVars.size();
816 }

◆ getRes()

const ValVar * MultiOpndStmt::getRes ( ) const

Result SVFVar.

Definition at line 457 of file SVFStatements.cpp.

458{
460}
NodeType * getDstNode() const
std::enable_if_t<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type > cast(const Y &Val)
Definition Casting.h:360

◆ getResID()

NodeID MultiOpndStmt::getResID ( ) const

Definition at line 434 of file SVFStatements.cpp.

435{
436 return getRes()->getId();
437}
const ValVar * 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 821 of file SVFStatements.h.

822 {
823 return opVars.begin();
824 }

◆ opVerEnd()

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

Definition at line 825 of file SVFStatements.h.

826 {
827 return opVars.end();
828 }

◆ GraphDBClient

friend class GraphDBClient
friend

Definition at line 760 of file SVFStatements.h.

Member Data Documentation

◆ opVars

OPVars SVF::MultiOpndStmt::opVars
protected

Definition at line 775 of file SVFStatements.h.


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