|
| 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 FunObjVar *, SVFVarList > | FunToArgsListMap |
| |
| typedef Map< const CallICFGNode *, SVFVarList > | CSToArgsListMap |
| |
| typedef Map< const RetICFGNode *, const SVFVar * > | CSToRetMap |
| |
| typedef Map< const FunObjVar *, const SVFVar * > | FunToRetMap |
| |
| typedef Map< const FunObjVar *, 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< NodeID, NodeAccessPathMap > | GepValueVarMap |
| |
| typedef std::pair< const SVFType *, std::vector< AccessPath > > | SVFTypeLocSetsPair |
| |
| typedef Map< NodeID, SVFTypeLocSetsPair > | TypeLocSetsMap |
| |
| typedef Map< NodePair, NodeID > | NodePairSetMap |
| |
| enum | SYMTYPE {
NullPtr
, BlkPtr
, BlackHole
, ConstantObj
,
ValSymbol
, ObjSymbol
, RetSymbol
, VarargSymbol
} |
| | Symbol types. More...
|
| |
| typedef OrderedMap< NodeID, ObjTypeInfo * > | IDToTypeInfoMapTy |
| | various maps defined
|
| |
| typedef OrderedMap< const FunObjVar *, NodeID > | FunObjVarToIDMapTy |
| | function to sym id map
|
| |
| typedef Set< const SVFType * > | SVFTypeSet |
| | struct type to struct info map
|
| |
| typedef Set< const SVFStmt * > | SVFStmtSet |
| |
| typedef SVFVar | NodeType |
| |
| typedef SVFStmt | EdgeType |
| |
| typedef OrderedMap< NodeID, NodeType * > | IDToNodeMapTy |
| | NodeID to GenericNode map.
|
| |
| typedef IDToNodeMapTy::iterator | iterator |
| | Node Iterators.
|
| |
| typedef IDToNodeMapTy::const_iterator | const_iterator |
| |
|
| MemObjToFieldsMap & | getMemToFieldsMap () |
| | Return memToFieldsMap.
|
| |
| NodeOffsetMap & | getGepObjNodeMap () |
| | Return GepObjVarMap.
|
| |
| OrderedNodeSet & | getAllValidPtrs () |
| | Return valid pointers.
|
| |
| void | initialiseCandidatePointers () |
| | Initialize candidate pointers.
|
| |
| virtual | ~SVFIR () |
| | Destructor.
|
| |
| void | setICFG (ICFG *i) |
| | Set/Get ICFG.
|
| |
| ICFG * | getICFG () const |
| |
| void | setCHG (CommonCHGraph *c) |
| | Set/Get CHG.
|
| |
| CommonCHGraph * | getCHG () |
| |
| const CallGraph * | getCallGraph () |
| | Get CG.
|
| |
| const FunObjVar * | getFunObjVar (const std::string &name) |
| |
| const std::string & | getModuleIdentifier () const |
| |
| void | setModuleIdentifier (const std::string &moduleIdentifier) |
| |
| 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 FunObjVar *func) const |
| | Function has arguments list.
|
| |
| FunToArgsListMap & | getFunArgsMap () |
| | Get function arguments list.
|
| |
| const SVFVarList & | getFunArgsList (const FunObjVar *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 FunObjVar *func) const |
| | Get function return list.
|
| |
| bool | funHasRet (const FunObjVar *func) const |
| |
| u32_t | getFieldValNodeNum () const |
| | Node and edge statistics.
|
| |
| u32_t | getFieldObjNodeNum () const |
| |
| NodeID | getGepValVar (NodeID 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 BaseObjVar * | getBaseObject (NodeID id) const |
| |
| const ValVar * | getBaseValVar (NodeID id) const |
| |
| NodeID | getGepObjVar (const BaseObjVar *baseObj, 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 BaseObjVar *obj) const |
| | Get a field-insensitive obj SVFIR node according to a mem obj.
|
| |
| NodeID | getFIObjVar (NodeID id) const |
| |
| bool | isBlkObjOrConstantObj (NodeID id) const |
| | Get black hole and constant id.
|
| |
| bool | isConstantObj (NodeID id) const |
| |
| NodeID | getBaseObjVar (NodeID id) const |
| | Base and Offset methods for Value and Object node.
|
| |
| NodeBS & | getAllFieldsObjVars (const BaseObjVar *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 () |
| |
| bool | isBuiltFromFile () |
| | Whether this SVFIR built from a txt file.
|
| |
| NodeID | blkPtrSymID () const |
| |
| NodeID | nullPtrSymID () const |
| |
| NodeID | constantSymID () const |
| |
| NodeID | blackholeSymID () const |
| |
| u32_t | getTotalSymNum () const |
| | Statistics.
|
| |
| u32_t | getMaxStructSize () const |
| |
| IDToTypeInfoMapTy & | idToObjTypeInfoMap () |
| | Get different kinds of syms maps.
|
| |
| const IDToTypeInfoMapTy & | idToObjTypeInfoMap () const |
| |
| FunObjVarToIDMapTy & | retFunObjSyms () |
| |
| FunObjVarToIDMapTy & | varargFunObjSyms () |
| |
| ObjTypeInfo * | getObjTypeInfo (NodeID id) const |
| |
| NodeID | getReturnNode (const FunObjVar *func) const |
| | GetReturnNode - Return the unique node representing the return value of a function.
|
| |
| NodeID | getVarargNode (const FunObjVar *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 |
| |
| u32_t | getValueNodeNum () |
| |
| u32_t | getObjectNodeNum () |
| |
| const SVFTypeSet & | getSVFTypes () const |
| | Constant reader that won't change the state of the symbol table.
|
| |
| const Set< const StInfo * > & | getStInfos () const |
| |
| virtual APOffset | getModulusOffset (const BaseObjVar *baseObj, const APOffset &apOffset) |
| | Given an offset from a Gep Instruction, return it modulus offset by considering memory layout.
|
| |
| const StInfo * | getTypeInfo (const SVFType *T) const |
| | Get struct info.
|
| |
| bool | hasSVFTypeInfo (const SVFType *T) |
| |
| ObjTypeInfo * | createObjTypeInfo (const SVFType *type) |
| | Create an objectInfo based on LLVM type (value is null, and type could be null, representing a dummy object)
|
| |
| const ObjTypeInfo * | createDummyObjTypeInfo (NodeID symId, const SVFType *type) |
| |
| u32_t | getNumOfFlattenElements (const SVFType *T) |
| |
| u32_t | getFlattenedElemIdx (const SVFType *T, u32_t origId) |
| | Flattened element idx of an array or struct by considering stride.
|
| |
| const SVFType * | getFlatternedElemType (const SVFType *baseType, u32_t flatten_idx) |
| | Return the type of a flattened element given a flattened index.
|
| |
| const SVFType * | getOriginalElemType (const SVFType *baseType, u32_t origId) const |
| |
| void | printFlattenFields (const SVFType *type) |
| | Debug method.
|
| |
| 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 | dumpSymTable () |
| |
| void | dump (std::string name) |
| | Dump SVFIR.
|
| |
| void | view () |
| | View graph from the debugger.
|
| |
| void | addTypeInfo (const SVFType *ty) |
| |
| void | addStInfo (StInfo *stInfo) |
| |
| | 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 FunObjVar *fun, const SVFVar *arg) |
| | Get/set method for function/callsite arguments and returns.
|
| |
| void | addFunRet (const FunObjVar *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 (NodeID i, const SVFType *type, const ICFGNode *icfgNode) |
| | add node into SVFIR
|
| |
| NodeID | addFunValNode (NodeID i, const ICFGNode *icfgNode, const FunObjVar *funObjVar, const SVFType *type) |
| |
| NodeID | addArgValNode (NodeID i, u32_t argNo, const ICFGNode *icfgNode, const FunObjVar *callGraphNode, const SVFType *type) |
| |
| NodeID | addConstantFPValNode (const NodeID i, double dval, const ICFGNode *icfgNode, const SVFType *type) |
| |
| NodeID | addConstantIntValNode (NodeID i, const std::pair< s64_t, u64_t > &intValue, const ICFGNode *icfgNode, const SVFType *type) |
| |
| NodeID | addConstantNullPtrValNode (const NodeID i, const ICFGNode *icfgNode, const SVFType *type) |
| |
| NodeID | addGlobalValNode (const NodeID i, const ICFGNode *icfgNode, const SVFType *svfType) |
| |
| NodeID | addConstantAggValNode (const NodeID i, const ICFGNode *icfgNode, const SVFType *svfType) |
| |
| NodeID | addConstantDataValNode (const NodeID i, const ICFGNode *icfgNode, const SVFType *type) |
| |
| NodeID | addObjNode (NodeID i, ObjTypeInfo *ti, const ICFGNode *node) |
| | Add a memory obj node.
|
| |
| NodeID | addHeapObjNode (NodeID i, ObjTypeInfo *ti, const ICFGNode *node) |
| |
| NodeID | addStackObjNode (NodeID i, ObjTypeInfo *ti, const ICFGNode *node) |
| |
| NodeID | addFunObjNode (NodeID id, ObjTypeInfo *ti, const ICFGNode *node) |
| |
| NodeID | addConstantFPObjNode (NodeID i, ObjTypeInfo *ti, double dval, const ICFGNode *node) |
| |
| NodeID | addConstantIntObjNode (NodeID i, ObjTypeInfo *ti, const std::pair< s64_t, u64_t > &intValue, const ICFGNode *node) |
| |
| NodeID | addConstantNullPtrObjNode (const NodeID i, ObjTypeInfo *ti, const ICFGNode *node) |
| |
| NodeID | addGlobalObjNode (const NodeID i, ObjTypeInfo *ti, const ICFGNode *node) |
| |
| NodeID | addConstantAggObjNode (const NodeID i, ObjTypeInfo *ti, const ICFGNode *node) |
| |
| NodeID | addConstantDataObjNode (const NodeID i, ObjTypeInfo *ti, const ICFGNode *node) |
| |
| NodeID | addRetNode (NodeID i, const FunObjVar *callGraphNode, const SVFType *type, const ICFGNode *icn) |
| | Add a unique return node for a procedure.
|
| |
| NodeID | addVarargNode (NodeID i, const FunObjVar *val, const SVFType *type, const ICFGNode *n) |
| | Add a unique vararg node for a procedure.
|
| |
| NodeID | addGepValNode (NodeID curInst, const ValVar *base, const AccessPath &ap, NodeID i, const SVFType *type, const ICFGNode *node) |
| | Add a temp field value node, this method can only invoked by getGepValVar.
|
| |
| NodeID | addGepObjNode (const BaseObjVar *baseObj, const APOffset &apOffset, const NodeID gepId) |
| | Add a field obj node, this method can only invoked by getGepObjVar.
|
| |
| NodeID | addFIObjNode (NodeID i, ObjTypeInfo *ti, const ICFGNode *node) |
| | Add a field-insensitive node, this method can only invoked by getFIGepObjNode.
|
| |
| NodeID | addDummyValNode (NodeID i, const ICFGNode *node) |
| | Add a dummy value/object node according to node ID (llvm value is null)
|
| |
| NodeID | addDummyObjNode (NodeID i, const SVFType *type) |
| |
| NodeID | addBlackholeObjNode () |
| |
| NodeID | addConstantObjNode () |
| |
| NodeID | addBlackholePtrNode () |
| |
| NodeID | addValNode (SVFVar *node) |
| | Add a value (pointer) node.
|
| |
| NodeID | addObjNode (SVFVar *node) |
| | Add a memory obj node.
|
| |
| NodeID | addRetNode (const FunObjVar *, SVFVar *node) |
| | Add a unique return node for a procedure.
|
| |
| NodeID | addVarargNode (const FunObjVar *, SVFVar *node) |
| | 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)
|
| |
|
| const SVFType * | maxStruct |
| | The struct type with the most fields.
|
| |
| u32_t | maxStSize |
| | The number of fields in max_struct.
|
| |
| u32_t | edgeNum |
| | total num of node
|
| |
| u32_t | nodeNum |
| | total num of edge
|
| |
| NodeID | addNode (SVFVar *node) |
| | 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) |
| |
| const std::vector< const SVFType * > & | getFlattenFieldTypes (const SVFStructType *T) |
| | Return the flattened field type for struct type only.
|
| |
| 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 |
| |
| u32_t | valVarNum |
| |
| u32_t | objVarNum |
| |
| IDToNodeMapTy | IDToNodeMap |
| | node map
|
| |
SVF Intermediate representation, representing variables and statements as a Program Assignment Graph (PAG) Variables as nodes and statements as edges.
Definition at line 42 of file SVFIR.h.