Static Value-Flow Analysis
|
#include <SVFVariables.h>
Public Types | |
typedef GNodeK | PNODEK |
typedef s64_t | GEdgeKind |
Public Types inherited from SVF::GenericNode< NodeTy, EdgeTy > | |
typedef NodeTy | NodeType |
typedef EdgeTy | EdgeType |
typedef OrderedSet< EdgeType *, typename EdgeType::equalGEdge > | GEdgeSetTy |
Edge kind. More... | |
typedef GEdgeSetTy::iterator | iterator |
typedef GEdgeSetTy::const_iterator | const_iterator |
Public Types inherited from SVF::SVFBaseNode | |
enum | GNodeK { IntraBlock , GlobalBlock , FunEntryBlock , FunExitBlock , FunCallBlock , FunRetBlock , ValNode , GepValNode , RetNode , VarargNode , DummyValNode , ObjNode , GepObjNode , FIObjNode , DummyObjNode , Cmp , BinaryOp , UnaryOp , Branch , DummyVProp , NPtr , FRet , ARet , AParm , FParm , Addr , Copy , Gep , Store , Load , TPhi , TIntraPhi , TInterPhi , FPIN , FPOUT , APIN , APOUT , MPhi , MIntraPhi , MInterPhi , CallNodeKd , CDNodeKd , CFLNodeKd , CHNodeKd , ConstraintNodeKd , TCTNodeKd , DCHNodeKd , OtherKd } |
Public Member Functions | |
SVFVar (const SVFValue *val, NodeID i, PNODEK k) | |
Constructor. More... | |
virtual | ~SVFVar () |
Destructor. More... | |
const SVFValue * | getValue () const |
Get/has methods of the components. More... | |
virtual const SVFType * | getType () const |
Return type of the value. More... | |
bool | hasValue () const |
virtual bool | isPointer () const |
Whether it is a pointer. More... | |
bool | isConstDataOrAggDataButNotNullPtr () const |
bool | isIsolatedNode () const |
Whether this is an isolated node on the SVFIR graph. More... | |
virtual const std::string | getValueName () const =0 |
Get name of the LLVM value. More... | |
virtual const SVFFunction * | getFunction () const |
Return the function that this SVFVar resides in. Return nullptr if it is a global or constantexpr node. More... | |
SVFStmt::SVFStmtSetTy & | getIncomingEdges (SVFStmt::PEDGEK kind) |
Get incoming SVFIR statements (edges) More... | |
SVFStmt::SVFStmtSetTy & | getOutgoingEdges (SVFStmt::PEDGEK kind) |
Get outgoing SVFIR statements (edges) More... | |
bool | hasIncomingEdges (SVFStmt::PEDGEK kind) const |
Has incoming SVFIR statements (edges) More... | |
bool | hasOutgoingEdges (SVFStmt::PEDGEK kind) const |
Has outgoing SVFIR statements (edges) More... | |
SVFStmt::SVFStmtSetTy::iterator | getIncomingEdgesBegin (SVFStmt::PEDGEK kind) const |
Get incoming SVFStmt iterator. More... | |
SVFStmt::SVFStmtSetTy::iterator | getIncomingEdgesEnd (SVFStmt::PEDGEK kind) const |
Get incoming SVFStmt iterator. More... | |
SVFStmt::SVFStmtSetTy::iterator | getOutgoingEdgesBegin (SVFStmt::PEDGEK kind) const |
Get outgoing SVFStmt iterator. More... | |
SVFStmt::SVFStmtSetTy::iterator | getOutgoingEdgesEnd (SVFStmt::PEDGEK kind) const |
Get outgoing SVFStmt iterator. More... | |
virtual const std::string | toString () const |
void | dump () const |
Dump to console for debugging. More... | |
Public Member Functions inherited from SVF::GenericNode< NodeTy, EdgeTy > | |
GenericNode (NodeID i, GNodeK k) | |
Constructor. More... | |
virtual | ~GenericNode () |
Destructor. More... | |
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 necessary. 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) |
EdgeType * | hasIncomingEdge (EdgeType *edge) const |
Find incoming and outgoing edges. More... | |
EdgeType * | hasOutgoingEdge (EdgeType *edge) const |
const GEdgeSetTy & | getOutEdges () const |
const GEdgeSetTy & | getInEdges () const |
u32_t | removeIncomingEdge (EdgeType *edge) |
u32_t | removeOutgoingEdge (EdgeType *edge) |
Public Member Functions inherited from SVF::SVFBaseNode | |
SVFBaseNode (NodeID i, GNodeK k, SVFType *ty=nullptr) | |
NodeID | getId () const |
Get ID. More... | |
GNodeK | getNodeKind () const |
Get node kind. More... | |
virtual void | setSourceLoc (const std::string &sourceCodeInfo) |
virtual const std::string | getSourceLoc () const |
const std::string | valueOnlyToString () const |
Static Public Member Functions | |
static bool | classof (const SVFVar *) |
static bool | classof (const GenericPAGNodeTy *node) |
static bool | classof (const SVFBaseNode *node) |
Static Public Member Functions inherited from SVF::GenericNode< NodeTy, EdgeTy > | |
static bool | classof (const GenericNode< NodeTy, EdgeTy > *) |
static bool | classof (const SVFBaseNode *) |
Protected Member Functions | |
SVFVar (NodeID i, PNODEK k) | |
whether it is a pointer (top-level or address-taken) More... | |
Protected Attributes | |
const SVFValue * | value |
value of this SVFIR node More... | |
SVFStmt::KindToSVFStmtMapTy | InEdgeKindToSetMap |
SVFStmt::KindToSVFStmtMapTy | OutEdgeKindToSetMap |
bool | isPtr |
Protected Attributes inherited from SVF::SVFBaseNode | |
NodeID | id |
Node ID. More... | |
GNodeK | nodeKind |
Node kind. More... | |
const SVFType * | type |
SVF type. More... | |
std::string | sourceLoc |
Source code information of this value. More... | |
Private Member Functions | |
void | addInEdge (SVFStmt *inEdge) |
add methods of the components More... | |
void | addOutEdge (SVFStmt *outEdge) |
bool | hasIncomingVariantGepEdge () const |
Has incoming VariantGepEdges. More... | |
Friends | |
class | SVFIRWriter |
class | SVFIRReader |
class | IRGraph |
class | SVFIR |
class | VFG |
OutStream & | operator<< (OutStream &o, const SVFVar &node) |
Overloading operator << for dumping SVFVar value. More... | |
Additional Inherited Members | |
Static Protected Member Functions inherited from SVF::SVFBaseNode | |
static bool | isICFGNodeKinds (GNodeK n) |
Helper functions to check node kinds. More... | |
static bool | isInterICFGNodeKind (GNodeK n) |
static bool | isSVFVarKind (GNodeK n) |
static bool | isValVarKinds (GNodeK n) |
static bool | isObjVarKinds (GNodeK n) |
static bool | isVFGNodeKinds (GNodeK n) |
static bool | isArgumentVFGNodeKinds (GNodeK n) |
static bool | isStmtVFGNodeKinds (GNodeK n) |
static bool | isPHIVFGNodeKinds (GNodeK n) |
static bool | isMRSVFGNodeKinds (GNodeK n) |
static bool | isMSSAPHISVFGNodeKinds (GNodeK n) |
Definition at line 45 of file SVFVariables.h.
typedef s64_t SVF::SVFVar::GEdgeKind |
Definition at line 64 of file SVFVariables.h.
typedef GNodeK SVF::SVFVar::PNODEK |
Nine kinds of SVFIR variables ValNode: llvm pointer value ObjNode: memory object RetNode: unique return node Vararg: unique node for vararg parameter GepValNode: temporary gep value node for field sensitivity GepValNode: temporary gep obj node for field sensitivity FIObjNode: for field insensitive analysis DummyValNode and DummyObjNode: for non-llvm-value node
Definition at line 63 of file SVFVariables.h.
whether it is a pointer (top-level or address-taken)
Constructor to create an empty object (for deserialization)
Definition at line 73 of file SVFVariables.h.
|
inlinevirtual |
|
inlineprivate |
add methods of the components
Definition at line 216 of file SVFVariables.h.
|
inlineprivate |
Definition at line 223 of file SVFVariables.h.
|
inlinestatic |
Definition at line 203 of file SVFVariables.h.
|
inlinestatic |
Definition at line 208 of file SVFVariables.h.
|
inlinestatic |
Definition at line 198 of file SVFVariables.h.
void SVFVar::dump | ( | ) | const |
|
inlinevirtual |
Return the function that this SVFVar resides in. Return nullptr if it is a global or constantexpr node.
Definition at line 122 of file SVFVariables.h.
|
inline |
Get incoming SVFIR statements (edges)
Definition at line 137 of file SVFVariables.h.
|
inline |
|
inline |
|
inline |
Get outgoing SVFIR statements (edges)
Definition at line 142 of file SVFVariables.h.
|
inline |
|
inline |
|
inlinevirtual |
Return type of the value.
Reimplemented from SVF::SVFBaseNode.
Reimplemented in SVF::GepObjVar, SVF::GepValVar, and SVF::ObjVar.
Definition at line 96 of file SVFVariables.h.
|
inline |
Get/has methods of the components.
Definition at line 83 of file SVFVariables.h.
|
pure virtual |
Get name of the LLVM value.
Implemented in SVF::DummyObjVar, SVF::DummyValVar, SVF::VarArgPN, SVF::RetPN, SVF::FIObjVar, SVF::GepObjVar, SVF::GepValVar, SVF::ObjVar, and SVF::ValVar.
|
inline |
|
inlineprivate |
|
inline |
|
inline |
Definition at line 101 of file SVFVariables.h.
bool SVFVar::isConstDataOrAggDataButNotNullPtr | ( | ) | const |
Whether it is constant data, i.e., "0", "1.001", "str" or llvm's metadata, i.e., metadata !4087
Definition at line 207 of file SVFVariables.cpp.
bool SVFVar::isIsolatedNode | ( | ) | const |
Whether this is an isolated node on the SVFIR graph.
Definition at line 82 of file SVFVariables.cpp.
|
inlinevirtual |
Whether it is a pointer.
Definition at line 106 of file SVFVariables.h.
|
virtual |
Reimplemented in SVF::DummyObjVar, SVF::DummyValVar, SVF::VarArgPN, SVF::RetPN, SVF::FIObjVar, SVF::GepObjVar, SVF::GepValVar, SVF::ObjVar, and SVF::ValVar.
Definition at line 95 of file SVFVariables.cpp.
|
friend |
Definition at line 49 of file SVFVariables.h.
Overloading operator << for dumping SVFVar value.
Definition at line 253 of file SVFVariables.h.
|
friend |
Definition at line 50 of file SVFVariables.h.
|
friend |
Definition at line 48 of file SVFVariables.h.
|
friend |
Definition at line 47 of file SVFVariables.h.
|
friend |
Definition at line 51 of file SVFVariables.h.
|
protected |
Definition at line 68 of file SVFVariables.h.
|
protected |
Definition at line 70 of file SVFVariables.h.
|
protected |
Definition at line 69 of file SVFVariables.h.
|
protected |
value of this SVFIR node
Definition at line 67 of file SVFVariables.h.