Build thread-aware callgraph.
73 for (
const auto&
item: *svfirCallGraph)
77 for (
const ICFGNode* inst : svfbb->getICFGNodeList())
79 if (SVFUtil::isa<CallICFGNode>(inst) && tdAPI->
isTDFork(SVFUtil::cast<CallICFGNode>(inst)))
98 for (
const auto&
item: *svfirCallGraph)
102 for (
const ICFGNode* node : svfbb->getICFGNodeList())
104 if (SVFUtil::isa<CallICFGNode>(node) && tdAPI->
isTDJoin(SVFUtil::cast<CallICFGNode>(node)))
106 const CallICFGNode* cs = SVFUtil::cast<CallICFGNode>(node);
PTACallGraph * getCallGraph()
static SVFIR * getPAG(bool buildFromFile=false)
Singleton design here to make sure we only have one instance during any analysis.
const SVFValue * getValue() const
Get/has methods of the components.
bool isTDFork(const CallICFGNode *inst) const
Return true if this call create a new thread.
bool isTDJoin(const CallICFGNode *inst) const
Return true if this call wait for a worker thread.
static ThreadAPI * getThreadAPI()
Return a static reference.
const SVFVar * getForkedFun(const CallICFGNode *inst) const
bool addDirectForkEdge(const CallICFGNode *cs)
Add direct/indirect thread fork edges.
bool addForksite(const CallICFGNode *cs)
Add fork sites which directly or indirectly create a thread.
bool addJoinsite(const CallICFGNode *cs)
void addThreadForkEdgeSetMap(const CallICFGNode *cs, ThreadForkEdge *edge)
map call instruction to its PTACallGraphEdge map