|
virtual | ~SVFG () |
| Destructor.
|
|
SVFGStat * | getStat () const |
| Return statistics.
|
|
void | clearMSSA () |
| Clear MSSA.
|
|
MemSSA * | getMSSA () const |
| Get SVFG memory SSA.
|
|
PointerAnalysis * | getPTA () const |
| Get Pointer Analysis.
|
|
SVFGNode * | getSVFGNode (NodeID id) const |
| Get a SVFG node.
|
|
bool | hasSVFGNode (NodeID id) const |
| Whether has the SVFGNode.
|
|
void | getInterVFEdgesForIndirectCallSite (const CallICFGNode *cs, const SVFFunction *callee, SVFGEdgeSetTy &edges) |
| Get all inter value flow edges of a indirect call site.
|
|
void | dump (const std::string &file, bool simple=false) |
| Dump graph into dot file.
|
|
virtual void | connectCallerAndCallee (const CallICFGNode *cs, const SVFFunction *callee, SVFGEdgeSetTy &edges) |
| Connect SVFG nodes between caller and callee for indirect call site.
|
|
const SVFGNode * | getDefSVFGNode (const PAGNode *pagNode) const |
| Given a pagNode, return its definition site.
|
|
bool | hasDefSVFGNode (const PAGNode *pagNode) const |
| Given a pagNode, return whether it has definition site.
|
|
void | performStat () |
| Perform statistics.
|
|
bool | hasActualINSVFGNodes (const CallICFGNode *cs) const |
| Has a SVFGNode.
|
|
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.
|
|
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.
|
|
const CallICFGNode * | isCallSiteRetSVFGNode (const SVFGNode *node) const |
| Whether a node is callsite return SVFGNode.
|
|
void | removeSVFGEdge (SVFGEdge *edge) |
| Remove a SVFG edge.
|
|
void | removeSVFGNode (SVFGNode *node) |
| Remove a SVFGNode.
|
|
bool | addSVFGEdge (SVFGEdge *edge) |
| Add SVFG edge.
|
|
u32_t | getSVFGNodeNum () const |
| Return total SVFG node number.
|
|
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.
|
|
virtual | ~VFG () |
| Destructor.
|
|
VFGK | getKind () const |
| Get VFG kind.
|
|
bool | isPtrOnlySVFG () const |
| Return true if this VFG only contains pointer related SVFGNodes for pointer analysis.
|
|
SVFIR * | getPAG () const |
| Return SVFIR.
|
|
PTACallGraph * | getCallGraph () const |
| Return PTACallGraph.
|
|
VFGNode * | getVFGNode (NodeID id) const |
| Get a VFG node.
|
|
bool | hasVFGNode (NodeID id) const |
| Whether has the VFGNode.
|
|
GlobalVFGNodeSet & | getGlobalVFGNodes () |
| Return global stores.
|
|
VFGEdge * | getIntraVFGEdge (const VFGNode *src, const VFGNode *dst, VFGEdge::VFGEdgeK kind) |
| Get a SVFG edge according to src and dst.
|
|
void | dump (const std::string &file, bool simple=false) |
| Dump graph into dot file.
|
|
void | view () |
| Dump graph into dot file.
|
|
void | updateCallGraph (PointerAnalysis *pta) |
| Update VFG based on pointer analysis results.
|
|
CallSiteID | getCallSiteID (const CallICFGNode *cs, const SVFFunction *func) const |
| Get callsite given a callsiteID.
|
|
const CallICFGNode * | getCallSite (CallSiteID id) const |
|
const VFGNode * | getDefVFGNode (const PAGNode *pagNode) const |
| Given a pagNode, return its definition site.
|
|
const PAGNode * | getLHSTopLevPtr (const VFGNode *node) const |
|
StmtVFGNode * | getStmtVFGNode (const PAGEdge *pagEdge) const |
| Get an VFGNode.
|
|
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.
|
|
bool | hasBlackHoleConstObjAddrAsDef (const PAGNode *pagNode) const |
| Whether a PAGNode has a blackhole or const object as its definition.
|
|
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.
|
|
void | removeVFGNode (VFGNode *node) |
| Remove a VFGNode.
|
|
VFGEdge * | hasIntraVFGEdge (VFGNode *src, VFGNode *dst, VFGEdge::VFGEdgeK kind) |
| Whether we has a SVFG edge.
|
|
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.
|
|
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.
|
|
virtual | ~GenericGraph () |
| Destructor.
|
|
void | destroy () |
| Release memory.
|
|
iterator | begin () |
| Iterators.
|
|
iterator | end () |
|
const_iterator | begin () const |
|
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 () |
|
|
void | destroy () |
| Clean up memory.
|
|
| SVFG (std::unique_ptr< MemSSA > mssa, VFGK k) |
| Constructor.
|
|
virtual void | buildSVFG () |
| Start building SVFG.
|
|
SVFGEdge * | addIntraIndirectVFEdge (NodeID srcId, NodeID dstId, const NodeBS &cpts) |
| Add indirect def-use edges of a memory region between two statements,.
|
|
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.
|
|
SVFGEdge * | addInterIndirectVFRetEdge (const FormalOUTSVFGNode *src, const ActualOUTSVFGNode *dst, CallSiteID csId) |
| Add inter VF edge from function exit mu to callsite chi.
|
|
virtual void | connectAInAndFIn (const ActualINSVFGNode *actualIn, const FormalINSVFGNode *formalIn, CallSiteID csId, SVFGEdgeSetTy &edges) |
| Connect SVFG nodes between caller and callee for indirect call site.
|
|
virtual void | connectFOutAndAOut (const FormalOUTSVFGNode *formalOut, const ActualOUTSVFGNode *actualOut, CallSiteID csId, SVFGEdgeSetTy &edges) |
| Connect formal-out and actual-out.
|
|
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.
|
|
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)
|
|
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)
|
|
NodeID | getDef (const MRVer *mvar) const |
|
void | addSVFGNodesForAddrTakenVars () |
| Create SVFG nodes for address-taken variables.
|
|
void | connectIndirectSVFGEdges () |
| Connect direct SVFG edges between two SVFG nodes (value-flow of top address-taken variables)
|
|
void | connectFromGlobalToProgEntry () |
| Connect indirect SVFG edges from global initializers (store) to main function entry.
|
|
virtual void | addSVFGNode (SVFGNode *node, ICFGNode *icfgNode) |
| Add SVFG node.
|
|
void | addFormalINSVFGNode (const FunEntryICFGNode *funEntry, const MRVer *resVer, const NodeID nodeId) |
| Add memory Function entry chi SVFG node.
|
|
void | addFormalOUTSVFGNode (const FunExitICFGNode *funExit, const MRVer *ver, const NodeID nodeId) |
| Add memory Function return mu SVFG node.
|
|
void | addActualINSVFGNode (const CallICFGNode *callsite, const MRVer *ver, const NodeID nodeId) |
| Add memory callsite mu SVFG node.
|
|
void | addActualOUTSVFGNode (const CallICFGNode *callsite, const MRVer *resVer, const NodeID nodeId) |
| Add memory callsite chi SVFG node.
|
|
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.
|
|
bool | hasFuncEntryChi (const SVFFunction *func) const |
| Has function for EntryCHI/RetMU/CallCHI/CallMU.
|
|
bool | hasFuncRetMu (const SVFFunction *func) const |
|
bool | hasCallSiteChi (const CallICFGNode *cs) const |
|
bool | hasCallSiteMu (const CallICFGNode *cs) const |
|
void | destroy () |
| Clean up memory.
|
|
void | checkIntraEdgeParents (const VFGNode *srcNode, const VFGNode *dstNode) |
| sanitize Intra edges, verify that both nodes belong to the same function.
|
|
VFGEdge * | addInterEdgeFromAPToFP (ActualParmVFGNode *src, FormalParmVFGNode *dst, CallSiteID csId) |
| Add inter VF edge from actual to formal parameters.
|
|
VFGEdge * | addInterEdgeFromFRToAR (FormalRetVFGNode *src, ActualRetVFGNode *dst, CallSiteID csId) |
| Add inter VF edge from callee return to callsite receive parameter.
|
|
VFGEdge * | addInterEdgeFromAPToFP (NodeID src, NodeID dst, CallSiteID csId) |
| Add inter VF edge from actual to formal parameters.
|
|
VFGEdge * | addInterEdgeFromFRToAR (NodeID src, NodeID dst, CallSiteID csId) |
| Add inter VF edge from callee return to callsite receive parameter.
|
|
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.
|
|
virtual void | connectFRetAndARet (const PAGNode *funReturn, const PAGNode *csReturn, CallSiteID csId, VFGEdgeSetTy &edges) |
| Connect formal-ret and actual ret.
|
|
void | setDef (const PAGNode *pagNode, const VFGNode *node) |
| Given a PAGNode, set/get its def VFG node (definition of top level pointers)
|
|
NodeID | getDef (const PAGNode *pagNode) const |
|
bool | hasDef (const PAGNode *pagNode) const |
|
void | addVFGNodes () |
| Create VFG nodes.
|
|
virtual SVFStmt::SVFStmtSetTy & | getPAGEdgeSet (SVFStmt::PEDGEK kind) |
| Get PAGEdge set.
|
|
virtual bool | isInterestedPAGNode (const SVFVar *node) const |
|
void | connectDirectVFGEdges () |
| Create edges between VFG nodes within a function.
|
|
void | addVFGInterEdges (const CallICFGNode *cs, const SVFFunction *callee) |
| Create edges between VFG nodes across functions.
|
|
bool | isPhiCopyEdge (const PAGEdge *copy) const |
|
virtual void | addVFGNode (VFGNode *vfgNode, ICFGNode *icfgNode) |
| Add a VFG node.
|
|
void | addStmtVFGNode (StmtVFGNode *node, const PAGEdge *pagEdge) |
| Add a VFG node for program statement.
|
|
void | addNullPtrVFGNode (const PAGNode *pagNode) |
|
void | addAddrVFGNode (const AddrStmt *addr) |
| Add an Address VFG node.
|
|
void | addCopyVFGNode (const CopyStmt *copy) |
| Add a Copy VFG node.
|
|
void | addGepVFGNode (const GepStmt *gep) |
| Add a Gep VFG node.
|
|
void | addLoadVFGNode (const LoadStmt *load) |
| Add a Load VFG node.
|
|
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.
|
|
void | addFormalRetVFGNode (const PAGNode *uniqueFunRet, const SVFFunction *fun, RetPESet &retPEs) |
|
void | addActualRetVFGNode (const PAGNode *ret, const CallICFGNode *cs) |
| Add a callsite Receive VFG node.
|
|
void | addIntraPHIVFGNode (const MultiOpndStmt *edge) |
| Add an llvm PHI VFG node.
|
|
void | addCmpVFGNode (const CmpStmt *edge) |
| Add a Compare VFG node.
|
|
void | addBinaryOPVFGNode (const BinaryOPStmt *edge) |
| Add a BinaryOperator VFG node.
|
|
void | addUnaryOPVFGNode (const UnaryOPStmt *edge) |
| Add a UnaryOperator VFG node.
|
|
void | addBranchVFGNode (const BranchStmt *edge) |
| Add a BranchVFGNode.
|
|
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.