|
Static Value-Flow Analysis
|
#include <ThreadCallGraph.h>
Classes | |
| struct | CallSiteIdCmp |
Additional Inherited Members | |
Public Attributes inherited from SVF::GenericGraph< NodeTy, EdgeTy > | |
| u32_t | edgeNum |
| total num of node | |
| u32_t | nodeNum |
| total num of edge | |
Protected Member Functions inherited from SVF::CallGraph | |
| void | destroy () |
| Clean up memory. | |
| CallSiteID | addCallSite (const CallICFGNode *cs, const FunObjVar *callee) |
| Add CallSiteID. | |
| CallSiteID | addCallSite (const CallICFGNode *cs, const FunObjVar *callee, const CallSiteID csid, std::pair< const CallICFGNode *, const FunObjVar * > newCS) |
| void | addEdge (CallGraphEdge *edge) |
| Add call graph edge. | |
| void | addDirectCallGraphEdge (CallGraphEdge *cgEdge) |
| add direct call graph edge from database [only used this function when loading cgEdges from db results] | |
| void | addCallGraphNode (CallGraphNode *cgNode) |
| add call graph node from database [only used this function when loading cgNodes from db results] | |
| CallGraphEdge * | hasGraphEdge (CallGraphEdge *cgEdge) const |
| Whether we have already created this call graph edge. | |
Protected Attributes inherited from SVF::CallGraph | |
| FunToCallGraphNodeMap | funToCallGraphNodeMap |
| Call Graph node map. | |
| CallInstToCallGraphEdgesMap | callinstToCallGraphEdgesMap |
| Map a call instruction to its corresponding call edges. | |
| NodeID | callGraphNodeNum |
| u32_t | numOfResolvedIndCallEdge |
| CGEK | kind |
Protected Attributes inherited from SVF::GenericGraph< NodeTy, EdgeTy > | |
| IDToNodeMapTy | IDToNodeMap |
| node map | |
Thread sensitive call graph
Definition at line 141 of file ThreadCallGraph.h.
Definition at line 160 of file ThreadCallGraph.h.
Definition at line 162 of file ThreadCallGraph.h.
Definition at line 164 of file ThreadCallGraph.h.
Definition at line 157 of file ThreadCallGraph.h.
Definition at line 158 of file ThreadCallGraph.h.
Definition at line 159 of file ThreadCallGraph.h.
Definition at line 156 of file ThreadCallGraph.h.
Definition at line 161 of file ThreadCallGraph.h.
Definition at line 163 of file ThreadCallGraph.h.
Constructor.
Constructor
Definition at line 42 of file ThreadCallGraph.cpp.
|
delete |
|
virtual |
Destructor.
Definition at line 49 of file ThreadCallGraph.cpp.
| bool ThreadCallGraph::addDirectForkEdge | ( | const CallICFGNode * | cs | ) |
Add direct/indirect thread fork edges.
Add direct fork edges
Definition at line 158 of file ThreadCallGraph.cpp.
| void ThreadCallGraph::addDirectJoinEdge | ( | const CallICFGNode * | cs, |
| const CallSiteSet & | forkset | ||
| ) |
Add thread join edges.
Add direct fork edges As join edge is a special return which is back to join site(s) rather than its fork site A ThreadJoinEdge is created from the functions where join sites reside in to the start routine function But we don't invoke addEdge() method to add the edge to src and dst, otherwise it makes a scc cycle
Definition at line 214 of file ThreadCallGraph.cpp.
|
inline |
Add fork sites which directly or indirectly create a thread.
Definition at line 323 of file ThreadCallGraph.h.
|
inline |
map call instruction to its PTACallGraphEdge map
Definition at line 373 of file ThreadCallGraph.h.
| bool ThreadCallGraph::addIndirectForkEdge | ( | const CallICFGNode * | cs, |
| const FunObjVar * | calleefun | ||
| ) |
Add indirect fork edge to update call graph
Definition at line 186 of file ThreadCallGraph.cpp.
|
inline |
Definition at line 328 of file ThreadCallGraph.h.
|
inline |
Definition at line 333 of file ThreadCallGraph.h.
|
inline |
map call instruction to its PTACallGraphEdge map
Definition at line 353 of file ThreadCallGraph.h.
|
inline |
map call instruction to its PTACallGraphEdge map
Definition at line 363 of file ThreadCallGraph.h.
Definition at line 180 of file ThreadCallGraph.h.
|
inlinestatic |
|
inline |
Fork sites iterators.
Definition at line 265 of file ThreadCallGraph.h.
|
inline |
Definition at line 269 of file ThreadCallGraph.h.
|
inline |
Definition at line 200 of file ThreadCallGraph.h.
|
inline |
Definition at line 206 of file ThreadCallGraph.h.
|
inline |
Definition at line 220 of file ThreadCallGraph.h.
|
inline |
Definition at line 226 of file ThreadCallGraph.h.
|
inline |
Definition at line 232 of file ThreadCallGraph.h.
|
inline |
Num of fork/join sites.
Definition at line 301 of file ThreadCallGraph.h.
|
inline |
Definition at line 305 of file ThreadCallGraph.h.
|
inline |
Definition at line 309 of file ThreadCallGraph.h.
|
inline |
|
inline |
Get call graph edge via call instruction.
whether this call instruction has a valid call graph edge
Definition at line 195 of file ThreadCallGraph.h.
|
inline |
has thread join edge
Definition at line 383 of file ThreadCallGraph.h.
|
inline |
Get call graph edge via call instruction.
whether this call instruction has a valid call graph edge
Definition at line 216 of file ThreadCallGraph.h.
|
inline |
Whether a callsite is a fork or join or hare_parallel_for
Definition at line 249 of file ThreadCallGraph.h.
|
inline |
Definition at line 253 of file ThreadCallGraph.h.
|
inline |
Definition at line 257 of file ThreadCallGraph.h.
|
inline |
Join sites iterators.
Definition at line 277 of file ThreadCallGraph.h.
|
inline |
Definition at line 281 of file ThreadCallGraph.h.
|
inline |
hare_parallel_for sites iterators
Definition at line 289 of file ThreadCallGraph.h.
|
inline |
Definition at line 293 of file ThreadCallGraph.h.
| void ThreadCallGraph::updateCallGraph | ( | PointerAnalysis * | pta | ) |
Update call graph using pointer results.
Definition at line 84 of file ThreadCallGraph.cpp.
| void ThreadCallGraph::updateJoinEdge | ( | PointerAnalysis * | pta | ) |
Update join edge using pointer analysis results.
Update join edge using pointer analysis results
A join may have no statically-matchable fork site (e.g. the pthread_t alias cannot be resolved by the pre-analysis). Skip such joins rather than aborting – they simply get no join-related def-use edge.
Definition at line 129 of file ThreadCallGraph.cpp.
|
private |
Map a call instruction to its corresponding hare_parallel_for edges.
Definition at line 403 of file ThreadCallGraph.h.
|
private |
Map a call instruction to its corresponding fork edges.
Definition at line 401 of file ThreadCallGraph.h.
|
private |
Map a call instruction to its corresponding join edges.
Definition at line 402 of file ThreadCallGraph.h.
|
private |
all thread fork sites
Definition at line 398 of file ThreadCallGraph.h.
|
private |
all thread fork sites
Definition at line 399 of file ThreadCallGraph.h.
|
private |
all parallel for sites
Definition at line 400 of file ThreadCallGraph.h.
|
private |
Thread API.
Definition at line 397 of file ThreadCallGraph.h.