Static Value-Flow Analysis
|
#include <DDAPass.h>
Public Types | |
typedef SCCDetection< SVFG * > | SVFGSCC |
typedef OrderedSet< const SVFGEdge * > | SVFGEdgeSet |
typedef std::vector< PointerAnalysis * > | PTAVector |
Public Member Functions | |
DDAPass () | |
~DDAPass () | |
virtual AliasResult | alias (const SVFValue *V1, const SVFValue *V2) |
Interface expose to users of our pointer analysis, given Value infos. | |
virtual AliasResult | alias (NodeID V1, NodeID V2) |
Interface expose to users of our pointer analysis, given PAGNodes. | |
virtual void | runOnModule (SVFIR *module) |
We start from here. | |
virtual void | selectClient (SVFModule *module) |
Select a client. | |
virtual std::string | getPassName () const |
Pass name. | |
Static Public Attributes | |
static char | ID = 0 |
Pass ID. | |
Private Member Functions | |
void | printQueryPTS () |
Print queries' pts. | |
void | runPointerAnalysis (SVFIR *module, u32_t kind) |
Create pointer analysis according to specified kind and analyze the module. | |
void | initCxtInsensitiveEdges (PointerAnalysis *pta, const SVFG *svfg, const SVFGSCC *svfgSCC, SVFGEdgeSet &insensitveEdges) |
Context insensitive Edge for DDA. | |
bool | edgeInSVFGSCC (const SVFGSCC *svfgSCC, const SVFGEdge *edge) |
Return TRUE if this edge is inside a SVFG SCC, i.e., src node and dst node are in the same SCC on the SVFG. | |
bool | edgeInCallGraphSCC (PointerAnalysis *pta, const SVFGEdge *edge) |
Return TRUE if this edge is inside a SVFG SCC, i.e., src node and dst node are in the same SCC on the SVFG. | |
void | collectCxtInsenEdgeForRecur (PointerAnalysis *pta, const SVFG *svfg, SVFGEdgeSet &insensitveEdges) |
void | collectCxtInsenEdgeForVFCycle (PointerAnalysis *pta, const SVFG *svfg, const SVFGSCC *svfgSCC, SVFGEdgeSet &insensitveEdges) |
Private Attributes | |
std::unique_ptr< PointerAnalysis > | _pta |
pointer analysis to be executed. | |
DDAClient * | _client |
DDA client used. | |
Demand-Driven Pointer Analysis. This class performs various pointer analysis on the given module.
typedef std::vector<PointerAnalysis*> SVF::DDAPass::PTAVector |
|
inline |
Definition at line 56 of file DDAPass.h.
DDAPass::~DDAPass | ( | ) |
Definition at line 47 of file DDAPass.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.
Definition at line 297 of file DDAPass.cpp.
|
virtual |
Interface expose to users of our pointer analysis, given PAGNodes.
Definition at line 281 of file DDAPass.cpp.
|
private |
Mark insensitive edge for function recursions
Definition at line 196 of file DDAPass.cpp.
|
private |
Mark insensitive edge for value-flow cycles
Definition at line 219 of file DDAPass.cpp.
|
private |
Return TRUE if this edge is inside a SVFG SCC, i.e., src node and dst node are in the same SCC on the SVFG.
Whether call graph edge in SVFG SCC
Definition at line 178 of file DDAPass.cpp.
|
inlinevirtual |
|
private |
Context insensitive Edge for DDA.
Initialize context insensitive Edge for DDA
Definition at line 159 of file DDAPass.cpp.
|
private |
Print queries' pts.
Print queries' pts
Definition at line 325 of file DDAPass.cpp.
|
virtual |
We start from here.
initialization for llvm alias analyzer
Definition at line 55 of file DDAPass.cpp.
Create pointer analysis according to specified kind and analyze the module.
Initialize pointer analysis.
initialize
compute points-to
finalize
Definition at line 108 of file DDAPass.cpp.
|
virtual |
Select a client.
select a client to initialize queries
solve function pointer
allow user specify queries
Definition at line 72 of file DDAPass.cpp.
|
private |