37#include <llvm/Support/ManagedStatic.h>
48 return pta->
alias(
v1->getId(),
v2->getId());
83 while (!worklist.
empty())
87 vNode->OutEdgeEnd(); it !=
eit; ++it)
91 if (visited.find(
succNode) == visited.end())
117 while (!worklist.
empty())
121 vNode->OutEdgeEnd(); it !=
eit; ++it)
125 if (visited.find(
succNode) == visited.end())
149 argc,
argv,
"Whole Program Points-to Analysis",
"[options] <input-bitcode...>"
170 VFG* vfg =
new VFG(callgraph);
179 for (
const auto& it : *svfg)
193 if (
node2->getValue())
203 for (
const auto& it : *icfg)
217#if LLVM_VERSION_MAJOR < 21
218 llvm::llvm_shutdown();
static std::vector< std::string > parseOptions(int argc, char *argv[], std::string description, std::string callFormat)
static AndersenWaveDiff * createAndersenWaveDiff(SVFIR *_pag)
Create an singleton instance directly instead of invoking llvm pass manager.
static void releaseAndersenWaveDiff()
bool push(const Data &data)
NodeType * getGNode(NodeID id) const
Get a node.
const GEdgeSetTy & getOutEdges() const
ICFGEdge::ICFGEdgeSetTy::const_iterator const_iterator
static LLVMModuleSet * getLLVMModuleSet()
static void releaseLLVMModuleSet()
static void preProcessBCs(std::vector< std::string > &moduleNameVec)
static void buildSVFModule(Module &mod)
void dumpModulesToFile(const std::string &suffix)
static const Option< bool > PTSPrint
virtual const PointsTo & getPts(NodeID ptr)=0
Get points-to targets of a pointer. It needs to be implemented in child class.
CallGraph * getCallGraph() const
Return call graph.
virtual AliasResult alias(const SVFVar *V1, const SVFVar *V2)=0
Interface exposed to users of our pointer analysis, given Value infos.
bool hasDefSVFGNode(const ValVar *valVar) const
Given a valVar, return whether it has definition site.
const SVFGNode * getDefSVFGNode(const ValVar *valVar) const
Given a valVar, return its definition site.
static void releaseSVFIR()
virtual const std::string toString() const
Get string representation.
virtual const SVFVar * getValue() const
Return the corresponding LLVM value, if possible, nullptr otherwise.
VFGEdge::VFGEdgeSetTy::const_iterator const_iterator
llvm::IRBuilder IRBuilder
std::unordered_set< Key, Hash, KeyEqual, Allocator > Set
void traverseOnICFG(ICFG *icfg, const ICFGNode *iNode)
int main(int argc, char **argv)
std::string printPts(PointerAnalysis *pta, const SVFVar *svfval)
SVF::AliasResult aliasQuery(PointerAnalysis *pta, const SVFVar *v1, const SVFVar *v2)
void dummyVisit(const VFGNode *node)
void traverseOnVFG(const SVFG *vfg, const ValVar *svfval)