38using namespace SVFUtil;
66 for (PTACallGraph::FunctionSet::const_iterator
func_iter =
78 if(SVFUtil::dyn_cast<FunValVar>(
forkedval)==
nullptr)
118 assert(!
forkset.empty() &&
"Can't find a forksite for this join!!");
141 edge->addDirectCallSite(cs);
166 edge->addInDirectCallSite(cs);
202 edge->addDirectCallSite(cs);
#define DBOUT(TYPE, X)
LLVM debug macros, define type of your DBUG model of each pass.
const SVFFunction * getFunction() const
Get function of this call node.
const SVFFunction * getCaller() const
Return callsite.
NodeType * getGNode(NodeID id) const
Get a node.
void addEdge(PTACallGraphEdge *edge)
Add call graph edge.
void addIndirectCallGraphEdge(const CallICFGNode *cs, const SVFFunction *callerFun, const SVFFunction *calleeFun)
Add indirect call edges.
Set< const SVFFunction * > FunctionSet
PTACallGraphEdge * hasGraphEdge(PTACallGraphNode *src, PTACallGraphNode *dst, PTACallGraphEdge::CEDGEK kind, CallSiteID csId) const
Whether we have already created this call graph edge.
CallSiteID addCallSite(const CallICFGNode *cs, const SVFFunction *callee)
Add CallSiteID.
PTACallGraphNode * getCallGraphNode(NodeID id) const
Get call graph node.
virtual const PointsTo & getPts(NodeID ptr)=0
Get points-to targets of a pointer. It needs to be implemented in child class.
CallEdgeMap & getIndCallMap()
Get callees from an indirect callsite.
virtual AliasResult alias(const SVFValue *V1, const SVFValue *V2)=0
Interface exposed to users of our pointer analysis, given Value infos.
NodeBS toNodeBS() const
Returns this points-to set as a NodeBS.
const CallGraphNode * getCallGraphNode() const
const MemObj * getObject(NodeID id) const
const ValVar * getForkedFun(const CallICFGNode *inst) const
const ValVar * getForkedThread(const CallICFGNode *inst) const
Return arguments/attributes of pthread_create / hare_parallel_for.
const SVFVar * getJoinedThread(const CallICFGNode *inst) const
Return arguments/attributes of pthread_join.
CallSiteSet::const_iterator forksitesEnd() const
bool addIndirectForkEdge(const CallICFGNode *cs, const SVFFunction *callee)
bool addDirectForkEdge(const CallICFGNode *cs)
Add direct/indirect thread fork edges.
CallSiteSet::const_iterator forksitesBegin() const
Fork sites iterators.
void updateJoinEdge(PointerAnalysis *pta)
Update join edge using pointer analysis results.
CallSiteSet::const_iterator joinsitesEnd() const
bool hasThreadJoinEdge(const CallICFGNode *cs) const
Get call graph edge via call instruction.
void addThreadJoinEdgeSetMap(const CallICFGNode *cs, ThreadJoinEdge *edge)
map call instruction to its PTACallGraphEdge map
void addDirectJoinEdge(const CallICFGNode *cs, const CallSiteSet &forksite)
Add thread join edges.
CallSiteSet::const_iterator joinsitesBegin() const
Join sites iterators.
void addThreadForkEdgeSetMap(const CallICFGNode *cs, ThreadForkEdge *edge)
map call instruction to its PTACallGraphEdge map
void updateCallGraph(PointerAnalysis *pta)
Update call graph using pointer results.
ThreadCallGraph(const CallGraph &cg)
Constructor.
ThreadAPI * tdAPI
Thread API.
std::string pasMsg(const std::string &msg)
Print each pass/phase message by converting a string into blue string output.
std::ostream & outs()
Overwrite llvm::outs()
llvm::IRBuilder IRBuilder