Static Value-Flow Analysis
|
#include <CDGBuilder.h>
Public Member Functions | |
CDGBuilder () | |
constructor | |
~CDGBuilder () | |
destructor | |
void | build () |
start here | |
void | buildControlDependence (const SVFModule *svfgModule) |
build control dependence for each function | |
void | buildICFGNodeControlMap () |
build map at icfg node level | |
Private Member Functions | |
void | extractNodesBetweenPdomNodes (const SVFBasicBlock *succ, const SVFBasicBlock *LCA, std::vector< const SVFBasicBlock * > &tgtNodes) |
extract nodes between two nodes in pdom tree | |
void | dfsNodesBetweenPdomNodes (const SVFBasicBlock *cur, const SVFBasicBlock *tgt, std::vector< const SVFBasicBlock * > &path, std::vector< const SVFBasicBlock * > &tgtNodes, SVFLoopAndDomInfo *ld) |
s64_t | getBBSuccessorBranchID (const SVFBasicBlock *BB, const SVFBasicBlock *Succ) |
void | updateMap (const SVFBasicBlock *pred, const SVFBasicBlock *bb, s32_t pos) |
update map | |
Static Private Member Functions | |
static void | extractBBS (const SVFFunction *func, Map< const SVFBasicBlock *, std::vector< const SVFBasicBlock * > > &res) |
extract basic block edges to be processed | |
Private Attributes | |
CDG * | _controlDG |
Map< const SVFBasicBlock *, Map< const SVFBasicBlock *, Set< s32_t > > > | _svfcontrolMap |
map a basicblock to its controlling BBs (position, set of BBs) | |
Map< const SVFBasicBlock *, Map< const SVFBasicBlock *, Set< s32_t > > > | _svfdependentOnMap |
map a basicblock to its dependent on BBs (position, set of BBs) | |
Map< const ICFGNode *, Map< const ICFGNode *, Set< s32_t > > > | _nodeControlMap |
map an ICFG node to its controlling ICFG nodes (position, set of Nodes) | |
Map< const ICFGNode *, Map< const ICFGNode *, Set< s32_t > > > | _nodeDependentOnMap |
map an ICFG node to its dependent on ICFG nodes (position, set of Nodes) | |
Definition at line 38 of file CDGBuilder.h.
|
inline |
constructor
Definition at line 43 of file CDGBuilder.h.
|
inline |
void CDGBuilder::build | ( | ) |
start here
Start here
Definition at line 77 of file CDGBuilder.cpp.
build control dependence for each function
Build control dependence for each function
(1) construct CFG for each function (2) extract basic block edges (pred->succ) on the CFG to be processed succ does not post-dominates pred (!postDT->dominates(succ, pred)) (3) extract nodes from succ to the least common ancestor LCA of pred and succ including LCA if LCA is pred, excluding LCA if LCA is not pred
svfgModule |
Definition at line 124 of file CDGBuilder.cpp.
void CDGBuilder::buildICFGNodeControlMap | ( | ) |
build map at icfg node level
Build map at ICFG node level
Definition at line 188 of file CDGBuilder.cpp.
|
private |
Definition at line 35 of file CDGBuilder.cpp.
|
staticprivate |
extract basic block edges to be processed
(2) extract basic block edges on the CFG (pred->succ) to be processed succ does not post-dominates pred (!postDT->dominates(succ, pred))
func | |
res |
Definition at line 171 of file CDGBuilder.cpp.
|
private |
extract nodes between two nodes in pdom tree
(3) extract nodes from succ to the least common ancestor LCA of pred and succ including LCA if LCA is pred, excluding LCA if LCA is not pred
succ | |
LCA | |
tgtNodes |
Definition at line 65 of file CDGBuilder.cpp.
|
private |
Definition at line 87 of file CDGBuilder.cpp.
|
inlineprivate |
update map
Definition at line 90 of file CDGBuilder.h.
|
private |
Definition at line 98 of file CDGBuilder.h.
map an ICFG node to its controlling ICFG nodes (position, set of Nodes)
Definition at line 101 of file CDGBuilder.h.
|
private |
map an ICFG node to its dependent on ICFG nodes (position, set of Nodes)
Definition at line 102 of file CDGBuilder.h.
|
private |
map a basicblock to its controlling BBs (position, set of BBs)
Definition at line 99 of file CDGBuilder.h.
|
private |
map a basicblock to its dependent on BBs (position, set of BBs)
Definition at line 100 of file CDGBuilder.h.