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< 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, 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 ValVargetOpVar (u32_t pos) const
 Operand SVFVars.
 
const ValVargetRes () 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.
 
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 SVFVargetValue () 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)
 
static const Inst2LabelMapgetInst2LabelMap ()
 
static const Var2LabelMapgetVar2LabelMap ()
 
static const u64_tgetCallEdgeLabelCounter ()
 
static const u64_tgetStoreEdgeLabelCounter ()
 
static const u64_tgetMultiOpndLabelCounter ()
 

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

Member Typedef Documentation

◆ OPVars

Definition at line 827 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 535 of file SVFStatements.cpp.

536 : SVFStmt(opnds.at(0), r, k), opVars(opnds)
537{
538}
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74

Member Function Documentation

◆ classof() [1/3]

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

Definition at line 855 of file SVFStatements.h.

856 {
857 return node->getEdgeKind() == Phi || node->getEdgeKind() == Select ||
858 node->getEdgeKind() == BinaryOp || node->getEdgeKind() == Cmp;
859 }

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

847 {
848 return true;
849 }

◆ classof() [3/3]

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

Definition at line 850 of file SVFStatements.h.

851 {
852 return node->getEdgeKind() == Phi || node->getEdgeKind() == Select ||
853 node->getEdgeKind() == BinaryOp || node->getEdgeKind() == Cmp;
854 }

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

880 {
881 return opVars;
882 }

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

866 {
867 return opVars.at(pos);
868 }

◆ getOpVarID()

NodeID MultiOpndStmt::getOpVarID ( u32_t  pos) const

Definition at line 447 of file SVFStatements.cpp.

448{
449 return getOpVar(pos)->getId();
450}
const ValVar * getOpVar(u32_t pos) const
Operand SVFVars.
NodeID getId() const
Get ID.
Definition SVFValue.h:160

◆ getOpVarNum()

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

Definition at line 875 of file SVFStatements.h.

876 {
877 return opVars.size();
878 }

◆ getRes()

const ValVar * MultiOpndStmt::getRes ( ) const

Result SVFVar.

Definition at line 475 of file SVFStatements.cpp.

476{
478}
NodeType * getDstNode() const

◆ getResID()

NodeID MultiOpndStmt::getResID ( ) const

Definition at line 452 of file SVFStatements.cpp.

453{
454 return getRes()->getId();
455}
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 883 of file SVFStatements.h.

884 {
885 return opVars.begin();
886 }

◆ opVerEnd()

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

Definition at line 887 of file SVFStatements.h.

888 {
889 return opVars.end();
890 }

Friends And Related Symbol Documentation

◆ GraphDBClient

friend class GraphDBClient
friend

Definition at line 824 of file SVFStatements.h.

Member Data Documentation

◆ opVars

OPVars SVF::MultiOpndStmt::opVars
protected

Definition at line 839 of file SVFStatements.h.


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