37 using namespace SVFUtil;
59 PointerAnalysis::CallEdgeMap::const_iterator iter = pta->
getIndCallMap().begin();
60 PointerAnalysis::CallEdgeMap::const_iterator eiter = pta->
getIndCallMap().end();
61 for (; iter != eiter; iter++)
65 for (PTACallGraph::FunctionSet::const_iterator func_iter =
66 functions.begin(); func_iter != functions.end(); func_iter++)
77 if(SVFUtil::dyn_cast<SVFFunction>(forkedval->
getValue())==
nullptr)
117 assert(!forkset.empty() &&
"Can't find a forksite for this join!!");
130 assert(forkee &&
"callee does not exist");
185 for (CallSiteSet::const_iterator it = forkset.begin(), eit = forkset.end(); it != eit; ++it)
189 assert(threadRoutineFun &&
"thread routine function does not exist");
195 assert(cs->
getCaller() == joinFunNode->
getFunction() &&
"callee instruction not inside caller??");
#define DBOUT(TYPE, X)
LLVM debug macros, define type of your DBUG model of each pass.
const SVFFunction * getCaller() const
Return callsite.
NodeType * getGNode(NodeID id) const
Get a node.
const SVFValue * getValue() const
Get the reference value to this object.
bool isFunction() const
object attributes methods
void addDirectCallSite(const CallICFGNode *call)
Add direct and indirect callsite.
void addInDirectCallSite(const CallICFGNode *call)
const SVFFunction * getFunction() const
Get function of this call node.
void addEdge(PTACallGraphEdge *edge)
Add call graph edge.
void addIndirectCallGraphEdge(const CallICFGNode *cs, const SVFFunction *callerFun, const SVFFunction *calleeFun)
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/Get CallSiteID.
PTACallGraphNode * getCallGraphNode(NodeID id) const
Get call graph node.
CallEdgeMap & getIndCallMap()
Get callees from an indirect callsite.
virtual const PointsTo & getPts(NodeID ptr)=0
Get points-to targets of a pointer. It needs to be implemented in child class.
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.
NodeID getId() const
Get ID.
const SVFFunction * getDefFunForMultipleModule() const
const MemObj * getObject(NodeID id) const
const SVFValue * getValue() const
Get/has methods of the components.
const SVFVar * getForkedFun(const CallICFGNode *inst) const
const SVFVar * getJoinedThread(const CallICFGNode *inst) const
Return arguments/attributes of pthread_join.
const SVFVar * getForkedThread(const CallICFGNode *inst) const
Return arguments/attributes of pthread_create / hare_parallel_for.
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.
ThreadCallGraph(const PTACallGraph &cg)
Constructor.
void addThreadForkEdgeSetMap(const CallICFGNode *cs, ThreadForkEdge *edge)
map call instruction to its PTACallGraphEdge map
void updateCallGraph(PointerAnalysis *pta)
Update call graph using pointer results.
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()