|
typedef Set< const CallICFGNode * > | CallSiteSet |
|
typedef OrderedMap< const CallICFGNode *, NodeID > | CallSiteToFunPtrMap |
|
typedef Map< NodeID, CallSiteSet > | FunPtrToCallSitesMap |
|
typedef Map< NodeID, NodeBS > | MemObjToFieldsMap |
|
typedef std::vector< const SVFStmt * > | SVFStmtList |
|
typedef std::vector< const SVFVar * > | SVFVarList |
|
typedef Map< const SVFVar *, PhiStmt * > | PHINodeMap |
|
typedef Map< const SVFFunction *, SVFVarList > | FunToArgsListMap |
|
typedef Map< const CallICFGNode *, SVFVarList > | CSToArgsListMap |
|
typedef Map< const RetICFGNode *, const SVFVar * > | CSToRetMap |
|
typedef Map< const SVFFunction *, const SVFVar * > | FunToRetMap |
|
typedef Map< const SVFFunction *, SVFStmtSet > | FunToPAGEdgeSetMap |
|
typedef Map< const ICFGNode *, SVFStmtList > | ICFGNode2SVFStmtsMap |
|
typedef Map< NodeID, NodeID > | NodeToNodeMap |
|
typedef std::pair< NodeID, APOffset > | NodeOffset |
|
typedef std::pair< NodeID, AccessPath > | NodeAccessPath |
|
typedef Map< NodeOffset, NodeID > | NodeOffsetMap |
|
typedef Map< NodeAccessPath, NodeID > | NodeAccessPathMap |
|
typedef Map< const SVFValue *, NodeAccessPathMap > | GepValueVarMap |
|
typedef std::pair< const SVFType *, std::vector< AccessPath > > | SVFTypeLocSetsPair |
|
typedef Map< NodeID, SVFTypeLocSetsPair > | TypeLocSetsMap |
|
typedef Map< NodePair, NodeID > | NodePairSetMap |
|
typedef Set< const SVFStmt * > | SVFStmtSet |
|
typedef Map< const SVFValue *, SVFStmtSet > | ValueToEdgeMap |
|
typedef SVFVar | NodeType |
|
typedef SVFStmt | EdgeType |
|
typedef OrderedMap< NodeID, NodeType * > | IDToNodeMapTy |
| NodeID to GenericNode map. More...
|
|
typedef IDToNodeMapTy::iterator | iterator |
| Node Iterators. More...
|
|
typedef IDToNodeMapTy::const_iterator | const_iterator |
|
|
MemObjToFieldsMap & | getMemToFieldsMap () |
| Return memToFieldsMap. More...
|
|
NodeOffsetMap & | getGepObjNodeMap () |
| Return GepObjVarMap. More...
|
|
OrderedNodeSet & | getAllValidPtrs () |
| Return valid pointers. More...
|
|
void | initialiseCandidatePointers () |
| Initialize candidate pointers. More...
|
|
virtual | ~SVFIR () |
| Destructor. More...
|
|
void | setModule (SVFModule *mod) |
| Set/Get LLVM Module. More...
|
|
SVFModule * | getModule () |
|
void | setICFG (ICFG *i) |
| Set/Get ICFG. More...
|
|
ICFG * | getICFG () const |
|
void | setCHG (CommonCHGraph *c) |
| Set/Get CHG. More...
|
|
CommonCHGraph * | getCHG () |
|
void | setCallGraph (PTACallGraph *c) |
| Set/Get CG. More...
|
|
PTACallGraph * | getCallGraph () |
|
SVFStmt::SVFStmtSetTy & | getSVFStmtSet (SVFStmt::PEDGEK kind) |
| Get/set methods to get SVFStmts based on their kinds and ICFGNodes. More...
|
|
SVFStmt::SVFStmtSetTy & | getPTASVFStmtSet (SVFStmt::PEDGEK kind) |
| Get PTA edges set according to its kind. More...
|
|
bool | hasSVFStmtList (const ICFGNode *inst) const |
| Whether this instruction has SVFIR Edge. More...
|
|
bool | hasPTASVFStmtList (const ICFGNode *inst) const |
|
SVFStmtList & | getSVFStmtList (const ICFGNode *inst) |
| Given an instruction, get all its PAGEdges. More...
|
|
SVFStmtList & | getPTASVFStmtList (const ICFGNode *inst) |
| Given an instruction, get all its PTA PAGEdges. More...
|
|
void | addToSVFStmtList (ICFGNode *inst, SVFStmt *edge) |
| Add a SVFStmt into instruction map. More...
|
|
void | addToTypeLocSetsMap (NodeID argId, SVFTypeLocSetsPair &locSets) |
| Add a base SVFType* and all its field location sets to an arg NodeId. More...
|
|
SVFTypeLocSetsPair & | getTypeLocSetsMap (NodeID argId) |
| Given an arg NodeId, get its base SVFType* and all its field location sets. More...
|
|
SVFStmtSet & | getGlobalSVFStmtSet () |
| Get global PAGEdges (not in a procedure) More...
|
|
const CallSiteSet & | getCallSiteSet () const |
| Get all callsites. More...
|
|
bool | isPhiNode (const SVFVar *node) const |
| Whether this SVFVar is a result operand a of phi node. More...
|
|
bool | hasFunArgsList (const SVFFunction *func) const |
| Function has arguments list. More...
|
|
FunToArgsListMap & | getFunArgsMap () |
| Get function arguments list. More...
|
|
const SVFVarList & | getFunArgsList (const SVFFunction *func) const |
| Get function arguments list. More...
|
|
bool | hasCallSiteArgsMap (const CallICFGNode *cs) const |
| Callsite has argument list. More...
|
|
CSToArgsListMap & | getCallSiteArgsMap () |
| Get callsite argument list. More...
|
|
const SVFVarList & | getCallSiteArgsList (const CallICFGNode *cs) const |
| Get callsite argument list. More...
|
|
CSToRetMap & | getCallSiteRets () |
| Get callsite return. More...
|
|
const SVFVar * | getCallSiteRet (const RetICFGNode *cs) const |
| Get callsite return. More...
|
|
bool | callsiteHasRet (const RetICFGNode *cs) const |
|
FunToRetMap & | getFunRets () |
| Get function return list. More...
|
|
const SVFVar * | getFunRet (const SVFFunction *func) const |
| Get function return list. More...
|
|
bool | funHasRet (const SVFFunction *func) const |
|
u32_t | getFieldValNodeNum () const |
| Node and edge statistics. More...
|
|
u32_t | getFieldObjNodeNum () const |
|
NodeID | getGepValVar (const SVFValue *curInst, NodeID base, const AccessPath &ap) const |
| Due to constraint expression, curInst is used to distinguish different instructions (e.g., memorycpy) when creating GepValVar. More...
|
|
const CallSiteToFunPtrMap & | getIndirectCallsites () const |
| Add/get indirect callsites. More...
|
|
NodeID | getFunPtr (const CallICFGNode *cs) const |
|
const CallSiteSet & | getIndCallSites (NodeID funPtr) const |
|
bool | isIndirectCallSites (const CallICFGNode *cs) const |
|
bool | isFunPtr (NodeID id) const |
|
SVFStmt * | getIntraPAGEdge (NodeID src, NodeID dst, SVFStmt::PEDGEK kind) |
| Get an edge according to src, dst and kind. More...
|
|
SVFStmt * | getIntraPAGEdge (SVFVar *src, SVFVar *dst, SVFStmt::PEDGEK kind) |
|
const MemObj * | getObject (NodeID id) const |
|
const MemObj * | getObject (const ObjVar *node) const |
|
NodeID | getGepObjVar (const MemObj *obj, const APOffset &ap) |
| Get a field SVFIR Object node according to base mem obj and offset. More...
|
|
NodeID | getGepObjVar (NodeID id, const APOffset &ap) |
| Get a field obj SVFIR node according to a mem obj and a given offset. More...
|
|
NodeID | getFIObjVar (const MemObj *obj) const |
| Get a field-insensitive obj SVFIR node according to a mem obj. More...
|
|
NodeID | getFIObjVar (NodeID id) const |
|
bool | isBlkPtr (NodeID id) const |
| Get black hole and constant id. More...
|
|
bool | isNullPtr (NodeID id) const |
|
bool | isBlkObjOrConstantObj (NodeID id) const |
|
bool | isBlkObj (NodeID id) const |
|
bool | isConstantObj (NodeID id) const |
|
NodeID | getBaseObjVar (NodeID id) const |
| Base and Offset methods for Value and Object node. More...
|
|
const MemObj * | getBaseObj (NodeID id) const |
|
NodeBS & | getAllFieldsObjVars (const MemObj *obj) |
| Get all fields of an object. More...
|
|
NodeBS & | getAllFieldsObjVars (NodeID id) |
|
NodeBS | getFieldsAfterCollapse (NodeID id) |
|
NodeID | addDummyValNode () |
|
NodeID | addDummyObjNode (const SVFType *type) |
|
bool | isValidPointer (NodeID nodeId) const |
| Whether a node is a valid pointer. More...
|
|
bool | isValidTopLevelPtr (const SVFVar *node) |
|
void | print () |
| Print SVFIR. More...
|
|
| IRGraph (bool buildFromFile) |
|
virtual | ~IRGraph () |
|
SymbolTableInfo * | getSymbolInfo () const |
|
bool | isBuiltFromFile () |
| Whether this SVFIR built from a txt file. More...
|
|
const SVFStmtSet & | getValueEdges (const SVFValue *V) |
| Get all SVFIR Edges that corresponds to an LLVM value. More...
|
|
NodeID | getValueNode (const SVFValue *V) |
|
bool | hasValueNode (const SVFValue *V) |
|
NodeID | getObjectNode (const SVFValue *V) |
|
NodeID | getReturnNode (const SVFFunction *func) const |
| GetReturnNode - Return the unique node representing the return value of a function. More...
|
|
NodeID | getVarargNode (const SVFFunction *func) const |
| getVarargNode - Return the unique node representing the variadic argument of a variadic function. More...
|
|
NodeID | getBlackHoleNode () const |
|
NodeID | getConstantNode () const |
|
NodeID | getBlkPtr () const |
|
NodeID | getNullPtr () const |
|
const MemObj * | getBlackHoleObj () const |
|
const MemObj * | getConstantObj () const |
|
u32_t | getValueNodeNum () const |
|
u32_t | getObjectNodeNum () const |
|
u32_t | getNodeNumAfterPAGBuild () const |
|
void | setNodeNumAfterPAGBuild (u32_t num) |
|
u32_t | getPAGNodeNum () const |
|
u32_t | getPAGEdgeNum () const |
|
u32_t | getPTAPAGEdgeNum () const |
|
std::string | getGraphName () const |
| Return graph name. More...
|
|
void | dump (std::string name) |
| Dump SVFIR. More...
|
|
void | view () |
| View graph from the debugger. More...
|
|
| GenericGraph () |
| Constructor. More...
|
|
virtual | ~GenericGraph () |
| Destructor. More...
|
|
void | destroy () |
| Release memory. More...
|
|
iterator | begin () |
| Iterators. More...
|
|
const_iterator | begin () const |
|
iterator | end () |
|
const_iterator | end () const |
|
void | addGNode (NodeID id, NodeType *node) |
| Add a Node. More...
|
|
NodeType * | getGNode (NodeID id) const |
| Get a node. More...
|
|
bool | hasGNode (NodeID id) const |
| Has a node. More...
|
|
void | removeGNode (NodeType *node) |
| Delete a node. More...
|
|
u32_t | getTotalNodeNum () const |
| Get total number of node/edge. More...
|
|
u32_t | getTotalEdgeNum () const |
|
void | incNodeNum () |
| Increase number of node/edge. More...
|
|
void | incEdgeNum () |
|
|
| SVFIR (bool buildFromFile) |
| Constructor. More...
|
|
void | destroy () |
| Clean up memory. More...
|
|
void | addToStmt2TypeMap (SVFStmt *edge) |
| Map a SVFStatement type to a set of corresponding SVF statements. More...
|
|
void | addFunArgs (const SVFFunction *fun, const SVFVar *arg) |
| Get/set method for function/callsite arguments and returns. More...
|
|
void | addFunRet (const SVFFunction *fun, const SVFVar *ret) |
| Add function returns. More...
|
|
void | addCallSiteArgs (CallICFGNode *callBlockNode, const SVFVar *arg) |
| Add callsite arguments. More...
|
|
void | addCallSiteRets (RetICFGNode *retBlockNode, const SVFVar *arg) |
| Add callsite returns. More...
|
|
void | addIndirectCallsites (const CallICFGNode *cs, NodeID funPtr) |
| Add indirect callsites. More...
|
|
NodeID | addValNode (const SVFValue *val, NodeID i, const SVFBaseNode *gNode) |
| add node into SVFIR More...
|
|
NodeID | addObjNode (const SVFValue *val, NodeID i) |
| Add a memory obj node. More...
|
|
NodeID | addRetNode (const SVFFunction *val, NodeID i) |
| Add a unique return node for a procedure. More...
|
|
NodeID | addVarargNode (const SVFFunction *val, NodeID i) |
| Add a unique vararg node for a procedure. More...
|
|
NodeID | addGepValNode (const SVFValue *curInst, const SVFValue *val, const AccessPath &ap, NodeID i, const SVFType *type) |
| Add a temp field value node, this method can only invoked by getGepValVar. More...
|
|
NodeID | addGepObjNode (const MemObj *obj, const APOffset &apOffset, const NodeID gepId) |
| Add a field obj node, this method can only invoked by getGepObjVar. More...
|
|
NodeID | addFIObjNode (const MemObj *obj) |
| Add a field-insensitive node, this method can only invoked by getFIGepObjNode. More...
|
|
NodeID | addDummyValNode (NodeID i) |
| Add a dummy value/object node according to node ID (llvm value is null) More...
|
|
NodeID | addDummyObjNode (NodeID i, const SVFType *type) |
|
const MemObj * | addDummyMemObj (NodeID i, const SVFType *type) |
|
NodeID | addBlackholeObjNode () |
|
NodeID | addConstantObjNode () |
|
NodeID | addBlackholePtrNode () |
|
NodeID | addValNode (const SVFValue *, SVFVar *node, NodeID i) |
| Add a value (pointer) node. More...
|
|
NodeID | addObjNode (const SVFValue *, SVFVar *node, NodeID i) |
| Add a memory obj node. More...
|
|
NodeID | addRetNode (const SVFFunction *, SVFVar *node, NodeID i) |
| Add a unique return node for a procedure. More...
|
|
NodeID | addVarargNode (const SVFFunction *, SVFVar *node, NodeID i) |
| Add a unique vararg node for a procedure. More...
|
|
void | addGlobalPAGEdge (const SVFStmt *edge) |
| Add global PAGEdges (not in a procedure) More...
|
|
void | addCallSite (const CallICFGNode *call) |
| Add callsites. More...
|
|
AddrStmt * | addAddrStmt (NodeID src, NodeID dst) |
| Add an edge into SVFIR. More...
|
|
CopyStmt * | addCopyStmt (NodeID src, NodeID dst, CopyStmt::CopyKind type) |
| Add Copy edge. More...
|
|
PhiStmt * | addPhiStmt (NodeID res, NodeID opnd, const ICFGNode *pred) |
| Add phi node information. More...
|
|
SelectStmt * | addSelectStmt (NodeID res, NodeID op1, NodeID op2, NodeID cond) |
| Add SelectStmt. More...
|
|
CmpStmt * | addCmpStmt (NodeID op1, NodeID op2, NodeID dst, u32_t predict) |
| Add Copy edge. More...
|
|
BinaryOPStmt * | addBinaryOPStmt (NodeID op1, NodeID op2, NodeID dst, u32_t opcode) |
| Add Copy edge. More...
|
|
UnaryOPStmt * | addUnaryOPStmt (NodeID src, NodeID dst, u32_t opcode) |
| Add Unary edge. More...
|
|
BranchStmt * | addBranchStmt (NodeID br, NodeID cond, const BranchStmt::SuccAndCondPairVec &succs) |
| Add BranchStmt. More...
|
|
LoadStmt * | addLoadStmt (NodeID src, NodeID dst) |
| Add Load edge. More...
|
|
StoreStmt * | addStoreStmt (NodeID src, NodeID dst, const ICFGNode *val) |
| Add Store edge. More...
|
|
CallPE * | addCallPE (NodeID src, NodeID dst, const CallICFGNode *cs, const FunEntryICFGNode *entry) |
| Add Call edge. More...
|
|
RetPE * | addRetPE (NodeID src, NodeID dst, const CallICFGNode *cs, const FunExitICFGNode *exit) |
| Add Return edge. More...
|
|
GepStmt * | addGepStmt (NodeID src, NodeID dst, const AccessPath &ap, bool constGep) |
| Add Gep edge. More...
|
|
GepStmt * | addNormalGepStmt (NodeID src, NodeID dst, const AccessPath &ap) |
| Add Offset(Gep) edge. More...
|
|
GepStmt * | addVariantGepStmt (NodeID src, NodeID dst, const AccessPath &ap) |
| Add Variant(Gep) edge. More...
|
|
TDForkPE * | addThreadForkPE (NodeID src, NodeID dst, const CallICFGNode *cs, const FunEntryICFGNode *entry) |
| Add Thread fork edge for parameter passing. More...
|
|
TDJoinPE * | addThreadJoinPE (NodeID src, NodeID dst, const CallICFGNode *cs, const FunExitICFGNode *exit) |
| Add Thread join edge for parameter passing. More...
|
|
SVFStmt * | addBlackHoleAddrStmt (NodeID node) |
| Set a pointer points-to black hole (e.g. int2ptr) More...
|
|
|
u32_t | edgeNum |
| total num of node More...
|
|
u32_t | nodeNum |
| total num of edge More...
|
|
NodeID | addNode (SVFVar *node, NodeID i) |
| Add a node into the graph. More...
|
|
bool | addEdge (SVFVar *src, SVFVar *dst, SVFStmt *edge) |
| Add an edge into the graph. More...
|
|
SVFStmt * | hasNonlabeledEdge (SVFVar *src, SVFVar *dst, SVFStmt::PEDGEK kind) |
|
SVFStmt * | hasLabeledEdge (SVFVar *src, SVFVar *dst, SVFStmt::PEDGEK kind, const ICFGNode *cs) |
|
SVFStmt * | hasLabeledEdge (SVFVar *src, SVFVar *op1, SVFStmt::PEDGEK kind, const SVFVar *op2) |
|
void | mapValueToEdge (const SVFValue *V, SVFStmt *edge) |
| Map a value to a set of edges. More...
|
|
const MemObj * | getMemObj (const SVFValue *val) const |
| get MemObj according to LLVM value More...
|
|
SVFStmt::KindToSVFStmtMapTy | KindToSVFStmtSetMap |
| SVFIR edge map containing all PAGEdges. More...
|
|
SVFStmt::KindToSVFStmtMapTy | KindToPTASVFStmtSetMap |
| SVFIR edge map containing only pointer-related edges, i.e., both LHS and RHS are of pointer type. More...
|
|
bool | fromFile |
| Whether the SVFIR is built according to user specified data from a txt file. More...
|
|
NodeID | nodeNumAfterPAGBuild |
| initial node number after building SVFIR, excluding later added nodes, e.g., gepobj nodes More...
|
|
u32_t | totalPTAPAGEdge |
|
ValueToEdgeMap | valueToEdgeMap |
| Map SVFValues (e.g., ICFGNodes) to all corresponding PAGEdges. More...
|
|
SymbolTableInfo * | symInfo |
|
IDToNodeMapTy | IDToNodeMap |
| node map More...
|
|
SVF Intermediate representation, representing variables and statements as a Program Assignment Graph (PAG) Variables as nodes and statements as edges. SymID and NodeID are equal here (same numbering).
Definition at line 43 of file SVFIR.h.