-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create callgraph #1580
Create callgraph #1580
Conversation
# Conflicts: # svf/lib/Graphs/ThreadCallGraph.cpp
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1580 +/- ##
==========================================
- Coverage 63.00% 62.94% -0.07%
==========================================
Files 244 246 +2
Lines 27274 27342 +68
Branches 4519 4520 +1
==========================================
+ Hits 17185 17211 +26
- Misses 10089 10131 +42
|
svf/include/Graphs/CallGraph.h
Outdated
typedef Set<const CallICFGNode*> CallInstSet; | ||
enum CEDGEK | ||
{ | ||
CallRetEdge,TDForkEdge,TDJoinEdge,HareParForEdge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only callretedge
svf/include/Graphs/CallGraph.h
Outdated
{ | ||
return csId; | ||
} | ||
inline CallInstSet& getDirectCalls() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed.
|
||
/// Add direct callsite | ||
//@{ | ||
void addDirectCallSite(const CallICFGNode* call); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be made protected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
callgraphedge's addDirectCallSite is used in CallGraph, so it cannot be protected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is only used in 'CallGraph', it can be made as private.
svf/include/Graphs/CallGraph.h
Outdated
|
||
/// Add/Get CallSiteID | ||
//@{ | ||
inline CallSiteID addCallSite(const CallICFGNode* cs, const SVFFunction* callee) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be made protected
typedef GenericEdge<PTACallGraphNode> GenericCallGraphEdgeTy; | ||
class PTACallGraphEdge : public GenericCallGraphEdgeTy | ||
typedef GenericEdge<PTACallGraphNode> GenericPTACallGraphEdgeTy; | ||
class PTACallGraphEdge : public GenericPTACallGraphEdgeTy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make necessary changes similar to CallGraphEdge
typedef GenericGraph<PTACallGraphNode, PTACallGraphEdge> GenericCallGraphTy; | ||
class PTACallGraph : public GenericCallGraphTy | ||
typedef GenericGraph<PTACallGraphNode, PTACallGraphEdge> GenericPTACallGraphTy; | ||
class PTACallGraph : public GenericPTACallGraphTy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make necessary changes similar to CallGraph
svf/include/Graphs/CallGraph.h
Outdated
|
||
private: | ||
/// Call site information | ||
static CallSiteToIdMap csToIdMap; ///< Map a pair of call instruction and callee to a callsite ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need csToIdMap, idToCSMap and totalCallSiteNum in CallGraph?
--- master.txt 2024-11-05 15:14:46 PTACallGraph Stats (Andersen analysis)****** Memory SSA Statistics****** PTACallGraph Stats (Flow-sensitive analysis)****** Persistent Points-To Cache Statistics: flow-sensitive analysis bitvector |
add callgraph class