|
MemObjToFieldsMap & | getMemToFieldsMap () |
| Return memToFieldsMap.
|
|
NodeOffsetMap & | getGepObjNodeMap () |
| Return GepObjVarMap.
|
|
OrderedNodeSet & | getAllValidPtrs () |
| Return valid pointers.
|
|
void | initialiseCandidatePointers () |
| Initialize candidate pointers.
|
|
virtual | ~SVFIR () |
| Destructor.
|
|
void | setModule (SVFModule *mod) |
| Set/Get LLVM Module.
|
|
SVFModule * | getModule () |
|
void | setICFG (ICFG *i) |
| Set/Get ICFG.
|
|
ICFG * | getICFG () const |
|
void | setCHG (CommonCHGraph *c) |
| Set/Get CHG.
|
|
CommonCHGraph * | getCHG () |
|
void | setCallGraph (CallGraph *c) |
| Set/Get CG.
|
|
CallGraph * | getCallGraph () |
|
SVFStmt::SVFStmtSetTy & | getSVFStmtSet (SVFStmt::PEDGEK kind) |
| Get/set methods to get SVFStmts based on their kinds and ICFGNodes.
|
|
SVFStmt::SVFStmtSetTy & | getPTASVFStmtSet (SVFStmt::PEDGEK kind) |
| Get PTA edges set according to its kind.
|
|
bool | hasSVFStmtList (const ICFGNode *inst) const |
| Whether this instruction has SVFIR Edge.
|
|
bool | hasPTASVFStmtList (const ICFGNode *inst) const |
|
SVFStmtList & | getSVFStmtList (const ICFGNode *inst) |
| Given an instruction, get all its PAGEdges.
|
|
SVFStmtList & | getPTASVFStmtList (const ICFGNode *inst) |
| Given an instruction, get all its PTA PAGEdges.
|
|
void | addToSVFStmtList (ICFGNode *inst, SVFStmt *edge) |
| Add a SVFStmt into instruction map.
|
|
void | addToTypeLocSetsMap (NodeID argId, SVFTypeLocSetsPair &locSets) |
| Add a base SVFType* and all its field location sets to an arg NodeId.
|
|
SVFTypeLocSetsPair & | getTypeLocSetsMap (NodeID argId) |
| Given an arg NodeId, get its base SVFType* and all its field location sets.
|
|
SVFStmtSet & | getGlobalSVFStmtSet () |
| Get global PAGEdges (not in a procedure)
|
|
const CallSiteSet & | getCallSiteSet () const |
| Get all callsites.
|
|
bool | isPhiNode (const SVFVar *node) const |
| Whether this SVFVar is a result operand a of phi node.
|
|
bool | hasFunArgsList (const SVFFunction *func) const |
| Function has arguments list.
|
|
FunToArgsListMap & | getFunArgsMap () |
| Get function arguments list.
|
|
const SVFVarList & | getFunArgsList (const SVFFunction *func) const |
| Get function arguments list.
|
|
bool | hasCallSiteArgsMap (const CallICFGNode *cs) const |
| Callsite has argument list.
|
|
CSToArgsListMap & | getCallSiteArgsMap () |
| Get callsite argument list.
|
|
const SVFVarList & | getCallSiteArgsList (const CallICFGNode *cs) const |
| Get callsite argument list.
|
|
CSToRetMap & | getCallSiteRets () |
| Get callsite return.
|
|
const SVFVar * | getCallSiteRet (const RetICFGNode *cs) const |
| Get callsite return.
|
|
bool | callsiteHasRet (const RetICFGNode *cs) const |
|
FunToRetMap & | getFunRets () |
| Get function return list.
|
|
const SVFVar * | getFunRet (const SVFFunction *func) const |
| Get function return list.
|
|
bool | funHasRet (const SVFFunction *func) const |
|
u32_t | getFieldValNodeNum () const |
| Node and edge statistics.
|
|
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.
|
|
const CallSiteToFunPtrMap & | getIndirectCallsites () const |
| Add/get indirect callsites.
|
|
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.
|
|
SVFStmt * | getIntraPAGEdge (SVFVar *src, SVFVar *dst, SVFStmt::PEDGEK kind) |
|
const MemObj * | getObject (NodeID id) const |
|
const BaseObjVar * | getBaseObject (NodeID id) const |
|
const ValVar * | getBaseValVar (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.
|
|
NodeID | getGepObjVar (NodeID id, const APOffset &ap) |
| Get a field obj SVFIR node according to a mem obj and a given offset.
|
|
NodeID | getFIObjVar (const MemObj *obj) const |
| Get a field-insensitive obj SVFIR node according to a mem obj.
|
|
NodeID | getFIObjVar (NodeID id) const |
|
bool | isBlkPtr (NodeID id) const |
| Get black hole and constant id.
|
|
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.
|
|
const MemObj * | getBaseObj (NodeID id) const |
|
NodeBS & | getAllFieldsObjVars (const MemObj *obj) |
| Get all fields of an object.
|
|
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.
|
|
bool | isValidTopLevelPtr (const SVFVar *node) |
|
void | print () |
| Print SVFIR.
|
|
| IRGraph (bool buildFromFile) |
|
virtual | ~IRGraph () |
|
SymbolTableInfo * | getSymbolInfo () const |
|
bool | isBuiltFromFile () |
| Whether this SVFIR built from a txt file.
|
|
const SVFStmtSet & | getValueEdges (const SVFValue *V) |
| Get all SVFIR Edges that corresponds to an LLVM value.
|
|
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.
|
|
NodeID | getVarargNode (const SVFFunction *func) const |
| getVarargNode - Return the unique node representing the variadic argument of a variadic function.
|
|
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.
|
|
void | dump (std::string name) |
| Dump SVFIR.
|
|
void | view () |
| View graph from the debugger.
|
|
| GenericGraph () |
| Constructor.
|
|
virtual | ~GenericGraph () |
| Destructor.
|
|
void | destroy () |
| Release memory.
|
|
iterator | begin () |
| Iterators.
|
|
const_iterator | begin () const |
|
iterator | end () |
|
const_iterator | end () const |
|
void | addGNode (NodeID id, NodeType *node) |
| Add a Node.
|
|
NodeType * | getGNode (NodeID id) const |
| Get a node.
|
|
bool | hasGNode (NodeID id) const |
| Has a node.
|
|
void | removeGNode (NodeType *node) |
| Delete a node.
|
|
u32_t | getTotalNodeNum () const |
| Get total number of node/edge.
|
|
u32_t | getTotalEdgeNum () const |
|
void | incNodeNum () |
| Increase number of node/edge.
|
|
void | incEdgeNum () |
|
|
| SVFIR (bool buildFromFile) |
| Constructor.
|
|
void | destroy () |
| Clean up memory.
|
|
void | addToStmt2TypeMap (SVFStmt *edge) |
| Map a SVFStatement type to a set of corresponding SVF statements.
|
|
void | addFunArgs (const SVFFunction *fun, const SVFVar *arg) |
| Get/set method for function/callsite arguments and returns.
|
|
void | addFunRet (const SVFFunction *fun, const SVFVar *ret) |
| Add function returns.
|
|
void | addCallSiteArgs (CallICFGNode *callBlockNode, const ValVar *arg) |
| Add callsite arguments.
|
|
void | addCallSiteRets (RetICFGNode *retBlockNode, const SVFVar *arg) |
| Add callsite returns.
|
|
void | addIndirectCallsites (const CallICFGNode *cs, NodeID funPtr) |
| Add indirect callsites.
|
|
NodeID | addValNode (const SVFValue *val, NodeID i, const ICFGNode *icfgNode) |
| add node into SVFIR
|
|
NodeID | addFunValNode (const CallGraphNode *callGraphNode, NodeID i, const ICFGNode *icfgNode) |
|
NodeID | addConstantFPValNode (const SVFValue *curInst, double dval, const NodeID i, const ICFGNode *icfgNode) |
|
NodeID | addConstantIntValNode (const SVFValue *curInst, s64_t sval, u64_t zval, const NodeID i, const ICFGNode *icfgNode) |
|
NodeID | addConstantNullPtrValNode (const SVFValue *curInst, const NodeID i, const ICFGNode *icfgNode) |
|
NodeID | addGlobalValueValNode (const SVFValue *curInst, const NodeID i, const ICFGNode *icfgNode) |
|
NodeID | addConstantDataValNode (const SVFValue *curInst, const NodeID i, const ICFGNode *icfgNode) |
|
NodeID | addObjNode (const SVFValue *val, NodeID i) |
| Add a memory obj node.
|
|
NodeID | addHeapObjNode (const SVFValue *val, const SVFFunction *f, NodeID i) |
|
NodeID | addStackObjNode (const SVFValue *val, const SVFFunction *f, NodeID i) |
|
NodeID | addFunObjNode (const CallGraphNode *callGraphNode, NodeID id) |
|
NodeID | addConstantFPObjNode (const SVFValue *curInst, double dval, const NodeID i) |
|
NodeID | addConstantIntObjNode (const SVFValue *curInst, s64_t sval, u64_t zval, const NodeID i) |
|
NodeID | addConstantNullPtrObjNode (const SVFValue *curInst, const NodeID i) |
|
NodeID | addGlobalValueObjNode (const SVFValue *curInst, const NodeID i) |
|
NodeID | addConstantDataObjNode (const SVFValue *curInst, const NodeID i) |
|
NodeID | addRetNode (const CallGraphNode *callGraphNode, NodeID i) |
| Add a unique return node for a procedure.
|
|
NodeID | addVarargNode (const CallGraphNode *val, NodeID i) |
| Add a unique vararg node for a procedure.
|
|
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.
|
|
NodeID | addGepObjNode (const MemObj *obj, const APOffset &apOffset, const NodeID gepId) |
| Add a field obj node, this method can only invoked by getGepObjVar.
|
|
NodeID | addFIObjNode (const MemObj *obj) |
| Add a field-insensitive node, this method can only invoked by getFIGepObjNode.
|
|
NodeID | addDummyValNode (NodeID i) |
| Add a dummy value/object node according to node ID (llvm value is null)
|
|
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.
|
|
NodeID | addObjNode (const SVFValue *, SVFVar *node, NodeID i) |
| Add a memory obj node.
|
|
NodeID | addRetNode (const CallGraphNode *, SVFVar *node, NodeID i) |
| Add a unique return node for a procedure.
|
|
NodeID | addVarargNode (const SVFFunction *, SVFVar *node, NodeID i) |
| Add a unique vararg node for a procedure.
|
|
void | addGlobalPAGEdge (const SVFStmt *edge) |
| Add global PAGEdges (not in a procedure)
|
|
void | addCallSite (const CallICFGNode *call) |
| Add callsites.
|
|
AddrStmt * | addAddrStmt (NodeID src, NodeID dst) |
| Add an edge into SVFIR.
|
|
CopyStmt * | addCopyStmt (NodeID src, NodeID dst, CopyStmt::CopyKind type) |
| Add Copy edge.
|
|
PhiStmt * | addPhiStmt (NodeID res, NodeID opnd, const ICFGNode *pred) |
| Add phi node information.
|
|
SelectStmt * | addSelectStmt (NodeID res, NodeID op1, NodeID op2, NodeID cond) |
| Add SelectStmt.
|
|
CmpStmt * | addCmpStmt (NodeID op1, NodeID op2, NodeID dst, u32_t predict) |
| Add Copy edge.
|
|
BinaryOPStmt * | addBinaryOPStmt (NodeID op1, NodeID op2, NodeID dst, u32_t opcode) |
| Add Copy edge.
|
|
UnaryOPStmt * | addUnaryOPStmt (NodeID src, NodeID dst, u32_t opcode) |
| Add Unary edge.
|
|
BranchStmt * | addBranchStmt (NodeID br, NodeID cond, const BranchStmt::SuccAndCondPairVec &succs) |
| Add BranchStmt.
|
|
LoadStmt * | addLoadStmt (NodeID src, NodeID dst) |
| Add Load edge.
|
|
StoreStmt * | addStoreStmt (NodeID src, NodeID dst, const ICFGNode *val) |
| Add Store edge.
|
|
CallPE * | addCallPE (NodeID src, NodeID dst, const CallICFGNode *cs, const FunEntryICFGNode *entry) |
| Add Call edge.
|
|
RetPE * | addRetPE (NodeID src, NodeID dst, const CallICFGNode *cs, const FunExitICFGNode *exit) |
| Add Return edge.
|
|
GepStmt * | addGepStmt (NodeID src, NodeID dst, const AccessPath &ap, bool constGep) |
| Add Gep edge.
|
|
GepStmt * | addNormalGepStmt (NodeID src, NodeID dst, const AccessPath &ap) |
| Add Offset(Gep) edge.
|
|
GepStmt * | addVariantGepStmt (NodeID src, NodeID dst, const AccessPath &ap) |
| Add Variant(Gep) edge.
|
|
TDForkPE * | addThreadForkPE (NodeID src, NodeID dst, const CallICFGNode *cs, const FunEntryICFGNode *entry) |
| Add Thread fork edge for parameter passing.
|
|
TDJoinPE * | addThreadJoinPE (NodeID src, NodeID dst, const CallICFGNode *cs, const FunExitICFGNode *exit) |
| Add Thread join edge for parameter passing.
|
|
SVFStmt * | addBlackHoleAddrStmt (NodeID node) |
| Set a pointer points-to black hole (e.g. int2ptr)
|
|
|
u32_t | edgeNum |
| total num of node
|
|
u32_t | nodeNum |
| total num of edge
|
|
NodeID | addNode (SVFVar *node, NodeID i) |
| Add a node into the graph.
|
|
bool | addEdge (SVFVar *src, SVFVar *dst, SVFStmt *edge) |
| Add an edge into the graph.
|
|
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.
|
|
const MemObj * | getMemObj (const SVFValue *val) const |
| get MemObj according to LLVM value
|
|
SVFStmt::KindToSVFStmtMapTy | KindToSVFStmtSetMap |
| SVFIR edge map containing all PAGEdges.
|
|
SVFStmt::KindToSVFStmtMapTy | KindToPTASVFStmtSetMap |
| SVFIR edge map containing only pointer-related edges, i.e., both LHS and RHS are of pointer type.
|
|
bool | fromFile |
| Whether the SVFIR is built according to user specified data from a txt file.
|
|
NodeID | nodeNumAfterPAGBuild |
| initial node number after building SVFIR, excluding later added nodes, e.g., gepobj nodes
|
|
u32_t | totalPTAPAGEdge |
|
ValueToEdgeMap | valueToEdgeMap |
| Map SVFValues (e.g., ICFGNodes) to all corresponding PAGEdges.
|
|
SymbolTableInfo * | symInfo |
|
IDToNodeMapTy | IDToNodeMap |
| node map
|
|
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 44 of file SVFIR.h.