|
Static Value-Flow Analysis
|
#include <MemPartition.h>
Public Member Functions | |
| DistinctMRG (BVDataPTAImpl *p, bool ptrOnly) | |
| ~DistinctMRG () | |
| Public Member Functions inherited from SVF::MRGenerator | |
| MRSet & | getMRSet () |
| const NodeBS & | getRepPointsTo (const NodeBS &cpts) const |
| Get superset cpts set. | |
| const MemRegion * | getMR (const NodeBS &cpts) const |
| Get a memory region according to cpts. | |
| u32_t | getMRNum () const |
| virtual | ~MRGenerator () |
| Destructor. | |
| virtual void | generateMRs () |
| Start generating memory regions. | |
| const FunObjVar * | getFunction (const PAGEdge *pagEdge) const |
| Get the function which SVFIR Edge located. | |
| MRSet & | getFunMRSet (const FunObjVar *fun) |
| Get Memory Region set. | |
| MRSet & | getLoadMRSet (const LoadStmt *load) |
| MRSet & | getStoreMRSet (const StoreStmt *store) |
| bool | hasRefMRSet (const CallICFGNode *cs) |
| bool | hasModMRSet (const CallICFGNode *cs) |
| MRSet & | getCallSiteRefMRSet (const CallICFGNode *cs) |
| MRSet & | getCallSiteModMRSet (const CallICFGNode *cs) |
| bool | hasSVFStmtList (const ICFGNode *icfgNode) |
| Whether this instruction has SVFIR Edge. | |
| SVFStmtList & | getSVFStmtsFromInst (const ICFGNode *node) |
| Given an instruction, get all its the PAGEdge (statement) in sequence. | |
| NodeBS | getModInfoForCall (const CallICFGNode *cs) |
| getModRefInfo APIs | |
| NodeBS | getRefInfoForCall (const CallICFGNode *cs) |
| ModRefInfo | getModRefInfo (const CallICFGNode *cs) |
| ModRefInfo | getModRefInfo (const CallICFGNode *cs, const SVFVar *V) |
| ModRefInfo | getModRefInfo (const CallICFGNode *cs1, const CallICFGNode *cs2) |
Protected Member Functions | |
| virtual void | partitionMRs () |
| Partition regions. | |
| virtual void | getMRsForLoad (MRSet &aliasMRs, const NodeBS &cpts, const FunObjVar *fun) |
| Get memory region at a load. | |
| virtual void | getMRsForCallSiteRef (MRSet &aliasMRs, const NodeBS &cpts, const FunObjVar *fun) |
| Get memory regions to be inserted at a load statement. | |
| Protected Member Functions inherited from SVF::MRGenerator | |
| MRGenerator (BVDataPTAImpl *p, bool ptrOnly) | |
| void | createMR (const FunObjVar *fun, const NodeBS &cpts) |
| Generate a memory region and put in into functions which use it. | |
| void | collectGlobals () |
| Collect all global variables for later escape analysis. | |
| virtual void | collectModRefForLoadStore () |
| Generate regions for loads/stores. | |
| virtual void | collectModRefForCall () |
| Generate regions for calls/rets. | |
| virtual void | updateAliasMRs () |
| Update aliased regions for loads/stores/callsites. | |
| virtual void | sortPointsTo (const NodeBS &cpts) |
| Given a condition pts, insert into cptsToRepCPtsMap for region generation. | |
| virtual bool | isAliasedMR (const NodeBS &cpts, const MemRegion *mr) |
| Whether a region is aliased with a conditional points-to. | |
| virtual void | getAliasMemRegions (MRSet &aliasMRs, const NodeBS &cpts, const FunObjVar *fun) |
| Get all aliased mem regions from function fun according to cpts. | |
| virtual void | modRefAnalysis (CallGraphNode *callGraphNode, WorkList &worklist) |
| Mod-Ref analysis for callsite invoking this callGraphNode. | |
| virtual bool | handleCallsiteModRef (NodeBS &mod, NodeBS &ref, const CallICFGNode *cs, const FunObjVar *fun) |
| Get Mod-Ref of a callee function. | |
| virtual void | refineCallsiteModRef (NodeBS &, NodeBS &, const CallICFGNode *, const FunObjVar *) |
| virtual void | propagateAdditionalModRef (CallGraphNode *, WorkList &) |
| void | addCPtsToStore (NodeBS &cpts, const StoreStmt *st, const FunObjVar *fun) |
| Add cpts to store/load. | |
| void | addCPtsToLoad (NodeBS &cpts, const LoadStmt *ld, const FunObjVar *fun) |
| void | addCPtsToCallSiteRefs (NodeBS &cpts, const CallICFGNode *cs) |
| void | addCPtsToCallSiteMods (NodeBS &cpts, const CallICFGNode *cs) |
| bool | hasCPtsList (const FunObjVar *fun) const |
| PointsToList & | getPointsToList (const FunObjVar *fun) |
| FunToPointsTosMap & | getFunToPointsToList () |
| void | addRefSideEffectOfFunction (const FunObjVar *fun, const NodeBS &refs) |
| Add/Get methods for side-effect of functions and callsites. | |
| void | addModSideEffectOfFunction (const FunObjVar *fun, const NodeBS &mods) |
| Add indirect def an memory object in the function. | |
| bool | addRefSideEffectOfCallSite (const CallICFGNode *cs, const NodeBS &refs) |
| Add indirect uses an memory object in the function. | |
| bool | addModSideEffectOfCallSite (const CallICFGNode *cs, const NodeBS &mods) |
| Add indirect def an memory object in the function. | |
| bool | addUnfilteredModSideEffectOfCallSite (const CallICFGNode *cs, const NodeBS &mods) |
| Add indirect def to a callsite without applying call-argument filtering. | |
| CallGraph * | getCallGraph () const |
| const NodeBS & | getRefSideEffectOfFunction (const FunObjVar *fun) |
| Get indirect refs of a function. | |
| const NodeBS & | getModSideEffectOfFunction (const FunObjVar *fun) |
| Get indirect mods of a function. | |
| const NodeBS & | getRefSideEffectOfCallSite (const CallICFGNode *cs) |
| Get indirect refs of a callsite. | |
| const NodeBS & | getModSideEffectOfCallSite (const CallICFGNode *cs) |
| Get indirect mods of a callsite. | |
| bool | hasRefSideEffectOfCallSite (const CallICFGNode *cs) |
| Has indirect refs of a callsite. | |
| bool | hasModSideEffectOfCallSite (const CallICFGNode *cs) |
| Has indirect mods of a callsite. | |
Private Member Functions | |
| void | createDistinctMR (const FunObjVar *func, const NodeBS &cpts) |
| Create memory regions for each points-to target. | |
Additional Inherited Members | |
| Public Types inherited from SVF::MRGenerator | |
| typedef FIFOWorkList< NodeID > | WorkList |
| typedef OrderedSet< const MemRegion *, MemRegion::equalMemRegion > | MRSet |
| Get typedef from Pointer Analysis. | |
| typedef Map< const PAGEdge *, const FunObjVar * > | PAGEdgeToFunMap |
| typedef OrderedSet< NodeBS, SVFUtil::equalNodeBS > | PointsToList |
| typedef Map< const FunObjVar *, NodeBS > | FunToPointsToMap |
| typedef Map< const FunObjVar *, PointsToList > | FunToPointsTosMap |
| typedef OrderedMap< NodeBS, NodeBS, SVFUtil::equalNodeBS > | PtsToRepPtsSetMap |
| typedef Map< const FunObjVar *, MRSet > | FunToMRsMap |
| Map a function to its region set. | |
| typedef Map< const LoadStmt *, MRSet > | LoadsToMRsMap |
| typedef Map< const StoreStmt *, MRSet > | StoresToMRsMap |
| typedef Map< const CallICFGNode *, MRSet > | CallSiteToMRsMap |
| typedef Map< const LoadStmt *, NodeBS > | LoadsToPointsToMap |
| Map loads/stores/callsites to their cpts set. | |
| typedef Map< const StoreStmt *, NodeBS > | StoresToPointsToMap |
| typedef Map< const CallICFGNode *, NodeBS > | CallSiteToPointsToMap |
| typedef Map< const FunObjVar *, NodeBS > | FunToNodeBSMap |
| Maps Mod-Ref analysis. | |
| typedef Map< const CallICFGNode *, NodeBS > | CallSiteToNodeBSMap |
| Map a callsite to its indirect refs/mods of memory objects. | |
| typedef Map< NodeID, NodeBS > | NodeToPTSSMap |
| typedef SVFIR::SVFStmtList | SVFStmtList |
| SVFIR edge list. | |
| typedef SCCDetection< CallGraph * > | SCC |
| Call Graph SCC. | |
| Protected Attributes inherited from SVF::MRGenerator | |
| MRSet | memRegSet |
| A set of All memory regions. | |
| PtsToRepPtsSetMap | cptsToRepCPtsMap |
| Map a condition pts to its rep conditional pts (super set points-to). | |
Distinct memory region generator.
Definition at line 48 of file MemPartition.h.
|
inline |
Definition at line 51 of file MemPartition.h.
|
inline |
Definition at line 54 of file MemPartition.h.
Create memory regions for each points-to target.
Create memory regions for each points-to target.
Create memory regions for each points-to target.
Definition at line 64 of file MemPartition.cpp.
|
protectedvirtual |
Get memory regions to be inserted at a load statement.
Get memory regions to be inserted at a load statement. Just process as getMRsForLoad().
Reimplemented from SVF::MRGenerator.
Definition at line 115 of file MemPartition.cpp.
|
protectedvirtual |
Get memory region at a load.
Get memory regions to be inserted at a load statement.
| cpts | The conditional points-to set of load statement. |
| fun | The function being analyzed. |
| mrs | Memory region set contains all possible target memory regions. |
Get memory regions for each points-to element in cpts.
Reimplemented from SVF::MRGenerator.
Definition at line 91 of file MemPartition.cpp.
|
protectedvirtual |
Partition regions.
Create distinct memory regions.
Collect all points-to target in a function scope.
Reimplemented from SVF::MRGenerator.
Definition at line 42 of file MemPartition.cpp.