43using namespace SVFUtil;
84 if (
it->first->isVirtualCall())
147 outs() <<
"============more precise callsite =================\n";
148 outs() << (
nIter->second)->toString() <<
"\n";
149 outs() << (
nIter->second)->getSourceLoc() <<
"\n";
151 outs() <<
"------ander pts or vtable num---(" <<
anderPts.count() <<
")--\n";
152 outs() <<
"------DDA vfn num---(" <<
ander_vfns.size() <<
")--\n";
154 outs() <<
"------DDA pts or vtable num---(" <<
ddaPts.count() <<
")--\n";
155 outs() <<
"------DDA vfn num---(" <<
dda_vfns.size() <<
")--\n";
157 outs() <<
"-------------------------\n";
159 outs() <<
"=================================================\n";
162 outs() <<
"=================================================\n";
171 outs() <<
"=================================================\n";
180 for (SVFStmt::SVFStmtSetTy::iterator
iter =
loads.begin(),
eiter =
197 for (SVFStmt::SVFStmtSetTy::iterator
iter =
geps.begin(),
eiter =
220 outs() <<
"\n=================================================\n";
221 outs() <<
"Alias Query for (" <<
node1->getValue()->toString() <<
",";
222 outs() <<
node2->getValue()->toString() <<
") \n";
223 outs() <<
"[NodeID:" <<
node1->getId() <<
", NodeID:" <<
node2->getId() <<
" " <<
result <<
"]\n";
224 outs() <<
"=================================================\n";
#define DBOUT(TYPE, X)
LLVM debug macros, define type of your DBUG model of each pass.
virtual OrderedNodeSet & collectCandidateQueries(SVFIR *pag)
Only collect function pointers as query candidates.
virtual void performStat(PointerAnalysis *pta)
static AndersenWaveDiff * createAndersenWaveDiff(SVFIR *_pag)
Create an singleton instance directly instead of invoking llvm pass manager.
virtual const PointsTo & getPts(NodeID id)
Operation of points-to set.
void setPAG(SVFIR *g)
Set SVFIR graph.
virtual void answerQueries(PointerAnalysis *pta)
void setCurrentQueryPtr(NodeID ptr)
Set the pointer being queried.
SVFIR * pag
SVFIR graph used by current DDA analysis.
void addCandidate(NodeID id)
OrderedNodeSet candidateQueries
store all candidate pointers to be queried
virtual OrderedNodeSet & collectCandidateQueries(SVFIR *p)
Collect candidate pointers for query.
VTablePtrToCallSiteMap vtableToCallSiteMap
virtual OrderedNodeSet & collectCandidateQueries(SVFIR *p)
Only collect function pointers as query candidates.
virtual void performStat(PointerAnalysis *pta)
NodeType * getGNode(NodeID id) const
Get a node.
const FunctionSet & getIndCSCallees(const CallICFGNode *cs) const
CallEdgeMap & getIndCallMap()
Get callees from an indirect callsite.
Set< const SVFFunction * > FunctionSet
bool hasIndCSCallees(const CallICFGNode *cs) const
void setMemUsageBefore(u32_t vmrss, u32_t vmsize)
void setMemUsageAfter(u32_t vmrss, u32_t vmsize)
void getVFnsFromPts(const CallICFGNode *cs, const PointsTo &target, VFunSet &vfns)
virtual const PointsTo & getPts(NodeID ptr)=0
Get points-to targets of a pointer. It needs to be implemented in child class.
virtual void computeDDAPts(NodeID)
Compute points-to results on-demand, overridden by derived classes.
PTACallGraph * getCallGraph() const
Return call graph.
PTAStat * getStat() const
Get PTA stat.
virtual AliasResult alias(const SVFValue *V1, const SVFValue *V2)=0
Interface exposed to users of our pointer analysis, given Value infos.
NodeID getId() const
Get ID.
SVFStmt::SVFStmtSetTy & getSVFStmtSet(SVFStmt::PEDGEK kind)
Get/set methods to get SVFStmts based on their kinds and ICFGNodes.
bool isValidTopLevelPtr(const SVFVar *node)
const CallSiteToFunPtrMap & getIndirectCallsites() const
Add/get indirect callsites.
GenericNode< SVFVar, SVFStmt >::GEdgeSetTy SVFStmtSetTy
bool getMemoryUsageKB(u32_t *vmrss_kb, u32_t *vmsize_kb)
Get memory usage from system file. Return TRUE if succeed.
std::ostream & outs()
Overwrite llvm::outs()
OrderedSet< NodeID > OrderedNodeSet
llvm::IRBuilder IRBuilder