|
typedef VFGNodeIDToNodeMapTy | SVFGNodeIDToNodeMapTy |
|
typedef Map< const PAGNode *, NodeID > | PAGNodeToDefMapTy |
|
typedef Map< const MRVer *, NodeID > | MSSAVarToDefMapTy |
|
typedef NodeBS | ActualINSVFGNodeSet |
|
typedef NodeBS | ActualOUTSVFGNodeSet |
|
typedef NodeBS | FormalINSVFGNodeSet |
|
typedef NodeBS | FormalOUTSVFGNodeSet |
|
typedef Map< const CallICFGNode *, ActualINSVFGNodeSet > | CallSiteToActualINsMapTy |
|
typedef Map< const CallICFGNode *, ActualOUTSVFGNodeSet > | CallSiteToActualOUTsMapTy |
|
typedef Map< const SVFFunction *, FormalINSVFGNodeSet > | FunctionToFormalINsMapTy |
|
typedef Map< const SVFFunction *, FormalOUTSVFGNodeSet > | FunctionToFormalOUTsMapTy |
|
typedef MemSSA::MUSet | MUSet |
|
typedef MemSSA::CHISet | CHISet |
|
typedef MemSSA::PHISet | PHISet |
|
typedef MemSSA::MU | MU |
|
typedef MemSSA::CHI | CHI |
|
typedef MemSSA::LOADMU | LOADMU |
|
typedef MemSSA::STORECHI | STORECHI |
|
typedef MemSSA::RETMU | RETMU |
|
typedef MemSSA::ENTRYCHI | ENTRYCHI |
|
typedef MemSSA::CALLCHI | CALLCHI |
|
typedef MemSSA::CALLMU | CALLMU |
|
enum | VFGK { FULLSVFG
, PTRONLYSVFG
, FULLSVFG_OPT
, PTRONLYSVFG_OPT
} |
| VFG kind. More...
|
|
typedef OrderedMap< NodeID, VFGNode * > | VFGNodeIDToNodeMapTy |
|
typedef Set< VFGNode * > | VFGNodeSet |
|
typedef Map< const PAGNode *, NodeID > | PAGNodeToDefMapTy |
|
typedef Map< std::pair< NodeID, const CallICFGNode * >, ActualParmVFGNode * > | PAGNodeToActualParmMapTy |
|
typedef Map< const PAGNode *, ActualRetVFGNode * > | PAGNodeToActualRetMapTy |
|
typedef Map< const PAGNode *, FormalParmVFGNode * > | PAGNodeToFormalParmMapTy |
|
typedef Map< const PAGNode *, FormalRetVFGNode * > | PAGNodeToFormalRetMapTy |
|
typedef Map< const PAGEdge *, StmtVFGNode * > | PAGEdgeToStmtVFGNodeMapTy |
|
typedef Map< const PAGNode *, IntraPHIVFGNode * > | PAGNodeToPHIVFGNodeMapTy |
|
typedef Map< const PAGNode *, BinaryOPVFGNode * > | PAGNodeToBinaryOPVFGNodeMapTy |
|
typedef Map< const PAGNode *, UnaryOPVFGNode * > | PAGNodeToUnaryOPVFGNodeMapTy |
|
typedef Map< const PAGNode *, BranchVFGNode * > | PAGNodeToBranchVFGNodeMapTy |
|
typedef Map< const PAGNode *, CmpVFGNode * > | PAGNodeToCmpVFGNodeMapTy |
|
typedef Map< const SVFFunction *, VFGNodeSet > | FunToVFGNodesMapTy |
|
typedef FormalParmVFGNode::CallPESet | CallPESet |
|
typedef FormalRetVFGNode::RetPESet | RetPESet |
|
typedef VFGEdge::VFGEdgeSetTy | VFGEdgeSetTy |
|
typedef VFGEdge::SVFGEdgeSetTy | SVFGEdgeSetTy |
|
typedef VFGEdge::VFGEdgeSetTy::iterator | VFGNodeIter |
|
typedef VFGNodeIDToNodeMapTy::iterator | iterator |
|
typedef VFGNodeIDToNodeMapTy::const_iterator | const_iterator |
|
typedef SVFIR::SVFStmtSet | SVFStmtSet |
|
typedef Set< const VFGNode * > | GlobalVFGNodeSet |
|
typedef Set< const PAGNode * > | PAGNodeSet |
|
typedef NodeTy | NodeType |
|
typedef EdgeTy | EdgeType |
|
typedef OrderedMap< NodeID, NodeType * > | IDToNodeMapTy |
| NodeID to GenericNode map. More...
|
|
typedef IDToNodeMapTy::iterator | iterator |
| Node Iterators. More...
|
|
typedef IDToNodeMapTy::const_iterator | const_iterator |
|
|
virtual | ~SVFG () |
| Destructor. More...
|
|
SVFGStat * | getStat () const |
| Return statistics. More...
|
|
void | clearMSSA () |
| Clear MSSA. More...
|
|
MemSSA * | getMSSA () const |
| Get SVFG memory SSA. More...
|
|
PointerAnalysis * | getPTA () const |
| Get Pointer Analysis. More...
|
|
SVFGNode * | getSVFGNode (NodeID id) const |
| Get a SVFG node. More...
|
|
bool | hasSVFGNode (NodeID id) const |
| Whether has the SVFGNode. More...
|
|
void | getInterVFEdgesForIndirectCallSite (const CallICFGNode *cs, const SVFFunction *callee, SVFGEdgeSetTy &edges) |
| Get all inter value flow edges of a indirect call site. More...
|
|
void | dump (const std::string &file, bool simple=false) |
| Dump graph into dot file. More...
|
|
virtual void | connectCallerAndCallee (const CallICFGNode *cs, const SVFFunction *callee, SVFGEdgeSetTy &edges) |
| Connect SVFG nodes between caller and callee for indirect call site. More...
|
|
const SVFGNode * | getDefSVFGNode (const PAGNode *pagNode) const |
| Given a pagNode, return its definition site. More...
|
|
bool | hasDefSVFGNode (const PAGNode *pagNode) const |
| Given a pagNode, return whether it has definition site. More...
|
|
void | performStat () |
| Perform statistics. More...
|
|
bool | hasActualINSVFGNodes (const CallICFGNode *cs) const |
| Has a SVFGNode. More...
|
|
bool | hasActualOUTSVFGNodes (const CallICFGNode *cs) const |
|
bool | hasFormalINSVFGNodes (const SVFFunction *fun) const |
|
bool | hasFormalOUTSVFGNodes (const SVFFunction *fun) const |
|
ActualINSVFGNodeSet & | getActualINSVFGNodes (const CallICFGNode *cs) |
| Get SVFGNode set. More...
|
|
ActualOUTSVFGNodeSet & | getActualOUTSVFGNodes (const CallICFGNode *cs) |
|
FormalINSVFGNodeSet & | getFormalINSVFGNodes (const SVFFunction *fun) |
|
FormalOUTSVFGNodeSet & | getFormalOUTSVFGNodes (const SVFFunction *fun) |
|
const SVFFunction * | isFunEntrySVFGNode (const SVFGNode *node) const |
| Whether a node is function entry SVFGNode. More...
|
|
const CallICFGNode * | isCallSiteRetSVFGNode (const SVFGNode *node) const |
| Whether a node is callsite return SVFGNode. More...
|
|
void | removeSVFGEdge (SVFGEdge *edge) |
| Remove a SVFG edge. More...
|
|
void | removeSVFGNode (SVFGNode *node) |
| Remove a SVFGNode. More...
|
|
bool | addSVFGEdge (SVFGEdge *edge) |
| Add SVFG edge. More...
|
|
u32_t | getSVFGNodeNum () const |
| Return total SVFG node number. More...
|
|
const DummyVersionPropSVFGNode * | addDummyVersionPropSVFGNode (const NodeID object, const NodeID version) |
|
virtual void | writeToFile (const std::string &filename) |
|
virtual void | readFile (const std::string &filename) |
|
virtual MRVer * | getMRVERFromString (const std::string &input) |
|
| VFG (PTACallGraph *callgraph, VFGK k=FULLSVFG) |
| Constructor. More...
|
|
virtual | ~VFG () |
| Destructor. More...
|
|
VFGK | getKind () const |
| Get VFG kind. More...
|
|
bool | isPtrOnlySVFG () const |
| Return true if this VFG only contains pointer related SVFGNodes for pointer analysis. More...
|
|
SVFIR * | getPAG () const |
| Return SVFIR. More...
|
|
PTACallGraph * | getCallGraph () const |
| Return PTACallGraph. More...
|
|
VFGNode * | getVFGNode (NodeID id) const |
| Get a VFG node. More...
|
|
bool | hasVFGNode (NodeID id) const |
| Whether has the VFGNode. More...
|
|
GlobalVFGNodeSet & | getGlobalVFGNodes () |
| Return global stores. More...
|
|
VFGEdge * | getIntraVFGEdge (const VFGNode *src, const VFGNode *dst, VFGEdge::VFGEdgeK kind) |
| Get a SVFG edge according to src and dst. More...
|
|
void | dump (const std::string &file, bool simple=false) |
| Dump graph into dot file. More...
|
|
void | view () |
| Dump graph into dot file. More...
|
|
void | updateCallGraph (PointerAnalysis *pta) |
| Update VFG based on pointer analysis results. More...
|
|
CallSiteID | getCallSiteID (const CallICFGNode *cs, const SVFFunction *func) const |
| Get callsite given a callsiteID. More...
|
|
const CallICFGNode * | getCallSite (CallSiteID id) const |
|
const VFGNode * | getDefVFGNode (const PAGNode *pagNode) const |
| Given a pagNode, return its definition site. More...
|
|
const PAGNode * | getLHSTopLevPtr (const VFGNode *node) const |
|
StmtVFGNode * | getStmtVFGNode (const PAGEdge *pagEdge) const |
| Get an VFGNode. More...
|
|
IntraPHIVFGNode * | getIntraPHIVFGNode (const PAGNode *pagNode) const |
|
BinaryOPVFGNode * | getBinaryOPVFGNode (const PAGNode *pagNode) const |
|
UnaryOPVFGNode * | getUnaryOPVFGNode (const PAGNode *pagNode) const |
|
BranchVFGNode * | getBranchVFGNode (const PAGNode *pagNode) const |
|
CmpVFGNode * | getCmpVFGNode (const PAGNode *pagNode) const |
|
ActualParmVFGNode * | getActualParmVFGNode (const PAGNode *aparm, const CallICFGNode *cs) const |
|
ActualRetVFGNode * | getActualRetVFGNode (const PAGNode *aret) const |
|
FormalParmVFGNode * | getFormalParmVFGNode (const PAGNode *fparm) const |
|
FormalRetVFGNode * | getFormalRetVFGNode (const PAGNode *fret) const |
|
const SVFFunction * | isFunEntryVFGNode (const VFGNode *node) const |
| Whether a node is function entry VFGNode. More...
|
|
bool | hasBlackHoleConstObjAddrAsDef (const PAGNode *pagNode) const |
| Whether a PAGNode has a blackhole or const object as its definition. More...
|
|
VFGEdge * | addIntraDirectVFEdge (NodeID srcId, NodeID dstId) |
|
VFGEdge * | addCallEdge (NodeID srcId, NodeID dstId, CallSiteID csId) |
|
VFGEdge * | addRetEdge (NodeID srcId, NodeID dstId, CallSiteID csId) |
|
void | removeVFGEdge (VFGEdge *edge) |
| Remove a SVFG edge. More...
|
|
void | removeVFGNode (VFGNode *node) |
| Remove a VFGNode. More...
|
|
VFGEdge * | hasIntraVFGEdge (VFGNode *src, VFGNode *dst, VFGEdge::VFGEdgeK kind) |
| Whether we has a SVFG edge. More...
|
|
VFGEdge * | hasInterVFGEdge (VFGNode *src, VFGNode *dst, VFGEdge::VFGEdgeK kind, CallSiteID csId) |
|
VFGEdge * | hasThreadVFGEdge (VFGNode *src, VFGNode *dst, VFGEdge::VFGEdgeK kind) |
|
bool | addVFGEdge (VFGEdge *edge) |
| Add VFG edge. More...
|
|
VFGNodeSet & | getVFGNodes (const SVFFunction *fun) |
|
bool | hasVFGNodes (const SVFFunction *fun) const |
|
bool | VFGNodes (const SVFFunction *fun) const |
|
VFGNodeSet::const_iterator | getVFGNodeBegin (const SVFFunction *fun) const |
|
VFGNodeSet::const_iterator | getVFGNodeEnd (const SVFFunction *fun) const |
|
| GenericGraph () |
| Constructor. More...
|
|
virtual | ~GenericGraph () |
| Destructor. More...
|
|
void | destroy () |
| Release memory. More...
|
|
iterator | begin () |
| Iterators. More...
|
|
iterator | end () |
|
const_iterator | begin () const |
|
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 () |
|
|
void | destroy () |
| Clean up memory. More...
|
|
| SVFG (std::unique_ptr< MemSSA > mssa, VFGK k) |
| Constructor. More...
|
|
virtual void | buildSVFG () |
| Start building SVFG. More...
|
|
SVFGEdge * | addIntraIndirectVFEdge (NodeID srcId, NodeID dstId, const NodeBS &cpts) |
| Add indirect def-use edges of a memory region between two statements,. More...
|
|
SVFGEdge * | addCallIndirectVFEdge (NodeID srcId, NodeID dstId, const NodeBS &cpts, CallSiteID csId) |
|
SVFGEdge * | addRetIndirectVFEdge (NodeID srcId, NodeID dstId, const NodeBS &cpts, CallSiteID csId) |
|
SVFGEdge * | addThreadMHPIndirectVFEdge (NodeID srcId, NodeID dstId, const NodeBS &cpts) |
|
SVFGEdge * | addInterIndirectVFCallEdge (const ActualINSVFGNode *src, const FormalINSVFGNode *dst, CallSiteID csId) |
| Add inter VF edge from callsite mu to function entry chi. More...
|
|
SVFGEdge * | addInterIndirectVFRetEdge (const FormalOUTSVFGNode *src, const ActualOUTSVFGNode *dst, CallSiteID csId) |
| Add inter VF edge from function exit mu to callsite chi. More...
|
|
virtual void | connectAInAndFIn (const ActualINSVFGNode *actualIn, const FormalINSVFGNode *formalIn, CallSiteID csId, SVFGEdgeSetTy &edges) |
| Connect SVFG nodes between caller and callee for indirect call site. More...
|
|
virtual void | connectFOutAndAOut (const FormalOUTSVFGNode *formalOut, const ActualOUTSVFGNode *actualOut, CallSiteID csId, SVFGEdgeSetTy &edges) |
| Connect formal-out and actual-out. More...
|
|
virtual void | getInterVFEdgeAtIndCSFromAPToFP (const PAGNode *cs_arg, const PAGNode *fun_arg, const CallICFGNode *, CallSiteID csId, SVFGEdgeSetTy &edges) |
| Get inter value flow edges between indirect call site and callee. More...
|
|
virtual void | getInterVFEdgeAtIndCSFromFRToAR (const PAGNode *fun_ret, const PAGNode *cs_ret, CallSiteID csId, SVFGEdgeSetTy &edges) |
|
virtual void | getInterVFEdgeAtIndCSFromAInToFIn (ActualINSVFGNode *actualIn, const SVFFunction *callee, SVFGEdgeSetTy &edges) |
|
virtual void | getInterVFEdgeAtIndCSFromFOutToAOut (ActualOUTSVFGNode *actualOut, const SVFFunction *callee, SVFGEdgeSetTy &edges) |
|
void | setDef (const PAGNode *pagNode, const SVFGNode *node) |
| Given a PAGNode, set/get its def SVFG node (definition of top level pointers) More...
|
|
NodeID | getDef (const PAGNode *pagNode) const |
|
bool | hasDef (const PAGNode *pagNode) const |
|
void | setDef (const MRVer *mvar, const SVFGNode *node) |
| Given a MSSADef, set/get its def SVFG node (definition of address-taken variables) More...
|
|
NodeID | getDef (const MRVer *mvar) const |
|
void | addSVFGNodesForAddrTakenVars () |
| Create SVFG nodes for address-taken variables. More...
|
|
void | connectIndirectSVFGEdges () |
| Connect direct SVFG edges between two SVFG nodes (value-flow of top address-taken variables) More...
|
|
void | connectFromGlobalToProgEntry () |
| Connect indirect SVFG edges from global initializers (store) to main function entry. More...
|
|
virtual void | addSVFGNode (SVFGNode *node, ICFGNode *icfgNode) |
| Add SVFG node. More...
|
|
void | addFormalINSVFGNode (const FunEntryICFGNode *funEntry, const MRVer *resVer, const NodeID nodeId) |
| Add memory Function entry chi SVFG node. More...
|
|
void | addFormalOUTSVFGNode (const FunExitICFGNode *funExit, const MRVer *ver, const NodeID nodeId) |
| Add memory Function return mu SVFG node. More...
|
|
void | addActualINSVFGNode (const CallICFGNode *callsite, const MRVer *ver, const NodeID nodeId) |
| Add memory callsite mu SVFG node. More...
|
|
void | addActualOUTSVFGNode (const CallICFGNode *callsite, const MRVer *resVer, const NodeID nodeId) |
| Add memory callsite chi SVFG node. More...
|
|
void | addIntraMSSAPHISVFGNode (ICFGNode *BlockICFGNode, const Map< u32_t, const MRVer * >::const_iterator opVerBegin, const Map< u32_t, const MRVer * >::const_iterator opVerEnd, const MRVer *resVer, const NodeID nodeId) |
| Add memory SSA PHI SVFG node. More...
|
|
bool | hasFuncEntryChi (const SVFFunction *func) const |
| Has function for EntryCHI/RetMU/CallCHI/CallMU. More...
|
|
bool | hasFuncRetMu (const SVFFunction *func) const |
|
bool | hasCallSiteChi (const CallICFGNode *cs) const |
|
bool | hasCallSiteMu (const CallICFGNode *cs) const |
|
void | destroy () |
| Clean up memory. More...
|
|
void | checkIntraEdgeParents (const VFGNode *srcNode, const VFGNode *dstNode) |
| sanitize Intra edges, verify that both nodes belong to the same function. More...
|
|
VFGEdge * | addInterEdgeFromAPToFP (ActualParmVFGNode *src, FormalParmVFGNode *dst, CallSiteID csId) |
| Add inter VF edge from actual to formal parameters. More...
|
|
VFGEdge * | addInterEdgeFromFRToAR (FormalRetVFGNode *src, ActualRetVFGNode *dst, CallSiteID csId) |
| Add inter VF edge from callee return to callsite receive parameter. More...
|
|
VFGEdge * | addInterEdgeFromAPToFP (NodeID src, NodeID dst, CallSiteID csId) |
| Add inter VF edge from actual to formal parameters. More...
|
|
VFGEdge * | addInterEdgeFromFRToAR (NodeID src, NodeID dst, CallSiteID csId) |
| Add inter VF edge from callee return to callsite receive parameter. More...
|
|
virtual void | connectAParamAndFParam (const PAGNode *csArg, const PAGNode *funArg, const CallICFGNode *cbn, CallSiteID csId, VFGEdgeSetTy &edges) |
| Connect VFG nodes between caller and callee for indirect call site. More...
|
|
virtual void | connectFRetAndARet (const PAGNode *funReturn, const PAGNode *csReturn, CallSiteID csId, VFGEdgeSetTy &edges) |
| Connect formal-ret and actual ret. More...
|
|
void | setDef (const PAGNode *pagNode, const VFGNode *node) |
| Given a PAGNode, set/get its def VFG node (definition of top level pointers) More...
|
|
NodeID | getDef (const PAGNode *pagNode) const |
|
bool | hasDef (const PAGNode *pagNode) const |
|
void | addVFGNodes () |
| Create VFG nodes. More...
|
|
virtual SVFStmt::SVFStmtSetTy & | getPAGEdgeSet (SVFStmt::PEDGEK kind) |
| Get PAGEdge set. More...
|
|
virtual bool | isInterestedPAGNode (const SVFVar *node) const |
|
void | connectDirectVFGEdges () |
| Create edges between VFG nodes within a function. More...
|
|
void | addVFGInterEdges (const CallICFGNode *cs, const SVFFunction *callee) |
| Create edges between VFG nodes across functions. More...
|
|
bool | isPhiCopyEdge (const PAGEdge *copy) const |
|
virtual void | addVFGNode (VFGNode *vfgNode, ICFGNode *icfgNode) |
| Add a VFG node. More...
|
|
void | addStmtVFGNode (StmtVFGNode *node, const PAGEdge *pagEdge) |
| Add a VFG node for program statement. More...
|
|
void | addNullPtrVFGNode (const PAGNode *pagNode) |
|
void | addAddrVFGNode (const AddrStmt *addr) |
| Add an Address VFG node. More...
|
|
void | addCopyVFGNode (const CopyStmt *copy) |
| Add a Copy VFG node. More...
|
|
void | addGepVFGNode (const GepStmt *gep) |
| Add a Gep VFG node. More...
|
|
void | addLoadVFGNode (const LoadStmt *load) |
| Add a Load VFG node. More...
|
|
void | addStoreVFGNode (const StoreStmt *store) |
|
void | addActualParmVFGNode (const PAGNode *aparm, const CallICFGNode *cs) |
|
void | addFormalParmVFGNode (const PAGNode *fparm, const SVFFunction *fun, CallPESet &callPEs) |
| Add a formal parameter VFG node. More...
|
|
void | addFormalRetVFGNode (const PAGNode *uniqueFunRet, const SVFFunction *fun, RetPESet &retPEs) |
|
void | addActualRetVFGNode (const PAGNode *ret, const CallICFGNode *cs) |
| Add a callsite Receive VFG node. More...
|
|
void | addIntraPHIVFGNode (const MultiOpndStmt *edge) |
| Add an llvm PHI VFG node. More...
|
|
void | addCmpVFGNode (const CmpStmt *edge) |
| Add a Compare VFG node. More...
|
|
void | addBinaryOPVFGNode (const BinaryOPStmt *edge) |
| Add a BinaryOperator VFG node. More...
|
|
void | addUnaryOPVFGNode (const UnaryOPStmt *edge) |
| Add a UnaryOperator VFG node. More...
|
|
void | addBranchVFGNode (const BranchStmt *edge) |
| Add a BranchVFGNode. More...
|
|
Sparse value flow graph Each node stands for a definition, each edge stands for value flow relations
Definition at line 65 of file SVFG.h.