Static Value-Flow Analysis
|
#include <WPAPass.h>
Public Types | |
enum | AliasCheckRule { Conservative , Veto , Precise } |
Public Member Functions | |
WPAPass () | |
Constructor needs TargetLibraryInfo to be passed to the AliasAnalysis. | |
virtual | ~WPAPass () |
Destructor. | |
virtual AliasResult | alias (const SVFValue *V1, const SVFValue *V2) |
Interface expose to users of our pointer analysis, given Value infos. | |
virtual const PointsTo & | getPts (const SVFValue *value) |
Retrieve points-to set information. | |
virtual const PointsTo & | getPts (NodeID var) |
virtual void | PrintAliasPairs (PointerAnalysis *pta) |
Print all alias pairs. | |
virtual ModRefInfo | getModRefInfo (const CallICFGNode *callInst) |
Interface of mod-ref analysis to determine whether a CallSite instruction can mod or ref any memory location. | |
virtual ModRefInfo | getModRefInfo (const CallICFGNode *callInst, const SVFValue *V) |
Interface of mod-ref analysis to determine whether a CallSite instruction can mod or ref a specific memory location, given Location infos. | |
virtual ModRefInfo | getModRefInfo (const CallICFGNode *callInst1, const CallICFGNode *callInst2) |
Interface of mod-ref analysis between two CallSite instructions. | |
virtual void | runOnModule (SVFIR *svfModule) |
Run pointer analysis on SVFModule. | |
virtual std::string | getPassName () const |
PTA name. | |
Static Public Attributes | |
static char | ID = 0 |
Pass ID. | |
Private Types | |
typedef std::vector< PointerAnalysis * > | PTAVector |
Private Member Functions | |
void | runPointerAnalysis (SVFIR *pag, u32_t kind) |
Create pointer analysis according to specified kind and analyze the module. | |
Private Attributes | |
PTAVector | ptaVector |
all pointer analysis to be executed. | |
PointerAnalysis * | _pta |
pointer analysis to be executed. | |
SVFG * | _svfg |
svfg generated through -ander pointer analysis | |
Whole program pointer analysis. This class performs various pointer analysis on the given module.
|
private |
Enumerator | |
---|---|
Conservative | return MayAlias if any pta says alias |
Veto | return NoAlias if any pta says no alias |
Precise | return alias result by the most precise pta |
Definition at line 62 of file WPAPass.h.
|
inline |
|
virtual |
Destructor.
Destructor
Definition at line 54 of file WPAPass.cpp.
|
virtual |
Interface expose to users of our pointer analysis, given Value infos.
Return alias results based on our points-to/alias analysis TODO: Need to handle PartialAlias and MustAlias here.
TODO: When this method is invoked during compiler optimizations, the IR used for pointer analysis may been changed, so some Values may not find corresponding SVFIR node. In this case, we only check alias between two Values if they both have SVFIR nodes. Otherwise, MayAlias will be returned.
Veto is used by default
Return NoAlias if any PTA gives NoAlias result
Return MayAlias if any PTA gives MayAlias result
Definition at line 174 of file WPAPass.cpp.
|
virtual |
Interface of mod-ref analysis to determine whether a CallSite instruction can mod or ref any memory location.
Return mod-ref result of a Callsite
Definition at line 221 of file WPAPass.cpp.
|
virtual |
Interface of mod-ref analysis to determine whether a CallSite instruction can mod or ref a specific memory location, given Location infos.
Interface of mod-ref analysis to determine whether a CallSite instruction can mod or ref a specific memory location, given Value infos
Return mod-ref results of a Callsite to a specific memory location
Definition at line 230 of file WPAPass.cpp.
|
virtual |
Interface of mod-ref analysis between two CallSite instructions.
Return mod-ref result between two CallInsts
Definition at line 239 of file WPAPass.cpp.
|
inlinevirtual |
Retrieve points-to set information.
Definition at line 157 of file WPAPass.cpp.
Definition at line 164 of file WPAPass.cpp.
|
virtual |
Print all alias pairs.
Definition at line 133 of file WPAPass.cpp.
|
virtual |
Run pointer analysis on SVFModule.
We start from here
Definition at line 69 of file WPAPass.cpp.
Create pointer analysis according to specified kind and analyze the module.
Create pointer analysis according to a specified kind and then analyze the module.
Initialize pointer analysis.
support mod-ref queries only for -ander
Definition at line 83 of file WPAPass.cpp.
|
private |
|
private |
|
private |