55 typedef std::vector<const SVFFunction*>
FunVec;
CallICFGNode * getCallICFGNode(const SVFInstruction *inst)
void interferenceAnalysis()
Thread interferenceAnalysis.
virtual bool mayHappenInParallel(const SVFInstruction *i1, const SVFInstruction *i2) const
Interface to query whether two function may happen-in-parallel.
bool addSpawneeFun(const SVFFunction *fun)
const FunSet & getFollowers() const
std::vector< const SVFFunction * > FunVec
void initFromThreadAPI(SVFModule *module)
Initialize spawner and spawnee sets with threadAPI.
CallInstSet::const_iterator spawnSitesBegin() const
Spawn sites iterators.
FunSet::const_iterator spawnersEnd(const SVFFunction *fun) const
const FunSet & getMHPFunctions() const
virtual ~PCG()
Destructor.
FunSet::const_iterator spawnersBegin(const SVFFunction *fun) const
Iterators for thread properties of a procedure.
FunSet::const_iterator spawneesBegin(const SVFFunction *fun) const
PCG(PointerAnalysis *an)
Constructor.
bool addFollowerFun(const SVFFunction *fun)
bool isSpawnerFun(const SVFFunction *fun) const
Add/Get methods for thread properties of a procedure.
const FunSet & getSpawnees() const
FIFOWorkList< const SVFBasicBlock * > BBWorkList
virtual bool analyze()
We start the pass here.
bool addSpawnerFun(const SVFFunction *fun)
bool addSpawnsite(const SVFInstruction *callInst)
Add/search spawn sites which directly or indirectly create a thread.
const FunSet & getSpawners() const
Get spawners/spawnees/followers.
bool isFollowerFun(const SVFFunction *fun) const
FunSet::const_iterator followersBegin(const SVFFunction *fun) const
bool isSpawnsite(const SVFInstruction *callInst)
CallInstSet spawnCallSites
Callsites direct or Indirect call a function which spawn a thread.
CallInstSet::const_iterator spawnSitesEnd() const
CallICFGNode * getCallICFGNode(const SVFInstruction *inst)
FIFOWorkList< const SVFFunction * > FunWorkList
bool isSpawneeFun(const SVFFunction *fun) const
Set< const SVFFunction * > FunSet
FunSet::const_iterator spawneesEnd(const SVFFunction *fun) const
void printResults()
Print analysis results.
Set< const SVFInstruction * > CallInstSet
FunSet::const_iterator followersEnd(const SVFFunction *fun) const
void inferFromCallGraph()
Infer spawner spawnee and followers sets by traversing on callGraph.
bool mayHappenInParallelBetweenFunctions(const SVFFunction *fun1, const SVFFunction *fun2) const
PTACallGraph * getPTACallGraph() const
Return call graph.
SVFModule * getModule() const
Module.
ICFG * getICFG() const
Get ICFG.
bool isDeclaration() const
static ThreadAPI * getThreadAPI()
Return a static reference.
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set