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. More... | |
const MemRegion * | getMR (const NodeBS &cpts) const |
Get a memory region according to cpts. More... | |
u32_t | getMRNum () const |
virtual | ~MRGenerator () |
Destructor. More... | |
virtual void | generateMRs () |
Start generating memory regions. More... | |
const SVFFunction * | getFunction (const PAGEdge *pagEdge) const |
Get the function which SVFIR Edge located. More... | |
MRSet & | getFunMRSet (const SVFFunction *fun) |
Get Memory Region set. More... | |
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. More... | |
SVFStmtList & | getPAGEdgesFromInst (const ICFGNode *node) |
Given an instruction, get all its the PAGEdge (statement) in sequence. More... | |
NodeBS | getModInfoForCall (const CallICFGNode *cs) |
getModRefInfo APIs More... | |
NodeBS | getRefInfoForCall (const CallICFGNode *cs) |
ModRefInfo | getModRefInfo (const CallICFGNode *cs) |
ModRefInfo | getModRefInfo (const CallICFGNode *cs, const SVFValue *V) |
ModRefInfo | getModRefInfo (const CallICFGNode *cs1, const CallICFGNode *cs2) |
Protected Member Functions | |
virtual void | partitionMRs () |
Partition regions. More... | |
virtual void | getMRsForLoad (MRSet &aliasMRs, const NodeBS &cpts, const SVFFunction *fun) |
Get memory region at a load. More... | |
virtual void | getMRsForCallSiteRef (MRSet &aliasMRs, const NodeBS &cpts, const SVFFunction *fun) |
Get memory regions to be inserted at a load statement. More... | |
Protected Member Functions inherited from SVF::MRGenerator | |
MRGenerator (BVDataPTAImpl *p, bool ptrOnly) | |
void | createMR (const SVFFunction *fun, const NodeBS &cpts) |
Generate a memory region and put in into functions which use it. More... | |
void | collectGlobals () |
Collect all global variables for later escape analysis. More... | |
virtual void | collectModRefForLoadStore () |
Generate regions for loads/stores. More... | |
virtual void | collectModRefForCall () |
Generate regions for calls/rets. More... | |
virtual void | updateAliasMRs () |
Update aliased regions for loads/stores/callsites. More... | |
virtual void | sortPointsTo (const NodeBS &cpts) |
Given a condition pts, insert into cptsToRepCPtsMap for region generation. More... | |
virtual bool | isAliasedMR (const NodeBS &cpts, const MemRegion *mr) |
Whether a region is aliased with a conditional points-to. More... | |
virtual void | getAliasMemRegions (MRSet &aliasMRs, const NodeBS &cpts, const SVFFunction *fun) |
Get all aliased mem regions from function fun according to cpts. More... | |
virtual void | modRefAnalysis (PTACallGraphNode *callGraphNode, WorkList &worklist) |
Mod-Ref analysis for callsite invoking this callGraphNode. More... | |
virtual bool | handleCallsiteModRef (NodeBS &mod, NodeBS &ref, const CallICFGNode *cs, const SVFFunction *fun) |
Get Mod-Ref of a callee function. More... | |
void | addCPtsToStore (NodeBS &cpts, const StoreStmt *st, const SVFFunction *fun) |
Add cpts to store/load. More... | |
void | addCPtsToLoad (NodeBS &cpts, const LoadStmt *ld, const SVFFunction *fun) |
void | addCPtsToCallSiteRefs (NodeBS &cpts, const CallICFGNode *cs) |
void | addCPtsToCallSiteMods (NodeBS &cpts, const CallICFGNode *cs) |
bool | hasCPtsList (const SVFFunction *fun) const |
PointsToList & | getPointsToList (const SVFFunction *fun) |
FunToPointsTosMap & | getFunToPointsToList () |
void | addRefSideEffectOfFunction (const SVFFunction *fun, const NodeBS &refs) |
Add/Get methods for side-effect of functions and callsites. More... | |
void | addModSideEffectOfFunction (const SVFFunction *fun, const NodeBS &mods) |
Add indirect def an memory object in the function. More... | |
bool | addRefSideEffectOfCallSite (const CallICFGNode *cs, const NodeBS &refs) |
Add indirect uses an memory object in the function. More... | |
bool | addModSideEffectOfCallSite (const CallICFGNode *cs, const NodeBS &mods) |
Add indirect def an memory object in the function. More... | |
const NodeBS & | getRefSideEffectOfFunction (const SVFFunction *fun) |
Get indirect refs of a function. More... | |
const NodeBS & | getModSideEffectOfFunction (const SVFFunction *fun) |
Get indirect mods of a function. More... | |
const NodeBS & | getRefSideEffectOfCallSite (const CallICFGNode *cs) |
Get indirect refs of a callsite. More... | |
const NodeBS & | getModSideEffectOfCallSite (const CallICFGNode *cs) |
Get indirect mods of a callsite. More... | |
bool | hasRefSideEffectOfCallSite (const CallICFGNode *cs) |
Has indirect refs of a callsite. More... | |
bool | hasModSideEffectOfCallSite (const CallICFGNode *cs) |
Has indirect mods of a callsite. More... | |
Private Member Functions | |
void | createDistinctMR (const SVFFunction *func, const NodeBS &cpts) |
Create memory regions for each points-to target. More... | |
Distinct memory region generator.
Definition at line 47 of file MemPartition.h.
|
inline |
Definition at line 50 of file MemPartition.h.
|
inline |
Definition at line 53 of file MemPartition.h.
|
private |
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.