39using namespace SVFUtil;
49 for (
const auto&
item : *callgraph)
87 if (SVFUtil::isa<CallICFGNode>(inst) && tdAPI->
isTDFork(SVFUtil::cast<CallICFGNode>(inst)))
92 if (SVFUtil::isa<FunValVar>(
svfVar))
94 cg->addDirectForkEdge(cs);
99 cg->addThreadForkEdgeSetMap(cs,
nullptr);
112 if (SVFUtil::isa<CallICFGNode>(node) && tdAPI->
isTDJoin(SVFUtil::cast<CallICFGNode>(node)))
114 const CallICFGNode* cs = SVFUtil::cast<CallICFGNode>(node);
CallGraph * buildSVFIRCallGraph(SVFModule *svfModule)
Buidl SVFIR callgraoh.
ThreadCallGraph * buildThreadCallGraph()
Build thread-aware callgraph.
PTACallGraph * buildPTACallGraph()
Buidl PTA callgraoh.
void addCallGraphNode(const SVFFunction *fun)
void addDirectCallGraphEdge(const CallICFGNode *call, const SVFFunction *callerFun, const SVFFunction *calleeFun)
Add direct call edges.
const SVFFunction * getCalledFunction() const
const std::vector< const SVFBasicBlock * > & getBasicBlockList() const
CallGraph * getCallGraph()
static SVFIR * getPAG(bool buildFromFile=false)
Singleton design here to make sure we only have one instance during any analysis.
const FunctionSetType & getFunctionSet() const
const ValVar * getForkedFun(const CallICFGNode *inst) const
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.
bool isNonInstricCallSite(const ICFGNode *inst)
Whether an instruction is a callsite in the application code, excluding llvm intrinsic calls.
llvm::IRBuilder IRBuilder