36using namespace SVFUtil;
86 assert(SVFUtil::isa<FlowSensitive>(
fspta) &&
"not an flow-sensitive pta pass!! what else??");
109 if(SVFUtil::isa<ObjVar>(
pagNode))
113 if (nodeSet.insert(
baseId).second)
115 if (
memObj->isFieldInsensitive())
126 unsigned numOfCopy = 0;
127 unsigned numOfStore = 0;
133 if (SVFUtil::isa<CopySVFGNode>(
svfgNode))
135 else if (SVFUtil::isa<StoreSVFGNode>(
svfgNode))
296 if (!SVFUtil::isa<DummyValVar>(
pagNode) && !SVFUtil::isa<DummyObjVar>(
pagNode))
299 if(
pagNode->getValue()->ptrInUncalledFunction() ==
false)
303 <<
") PtrName:" <<
pagNode->getValue()->getName();
366 DFInOutMap::const_iterator
it = data.begin();
367 DFInOutMap::const_iterator
eit = data.end();
373 if (SVFUtil::isa<FormalINSVFGNode>(node))
375 else if (SVFUtil::isa<FormalOUTSVFGNode>(node))
377 else if (SVFUtil::isa<ActualINSVFGNode>(node))
379 else if (SVFUtil::isa<ActualOUTSVFGNode>(node))
381 else if (SVFUtil::isa<LoadSVFGNode>(node))
383 else if (SVFUtil::isa<StoreSVFGNode>(node))
385 else if (SVFUtil::isa<MSSAPHISVFGNode>(node))
388 assert(
false &&
"unexpected node have IN/OUT set");
398 if (
ptsIt->second.empty())
409 if (SVFUtil::isa<FormalINSVFGNode>(node))
411 else if (SVFUtil::isa<FormalOUTSVFGNode>(node))
413 else if (SVFUtil::isa<ActualINSVFGNode>(node))
415 else if (SVFUtil::isa<ActualOUTSVFGNode>(node))
417 else if (SVFUtil::isa<LoadSVFGNode>(node))
419 else if (SVFUtil::isa<StoreSVFGNode>(node))
421 else if (SVFUtil::isa<MSSAPHISVFGNode>(node))
424 assert(
false &&
"unexpected node have IN/OUT set");
462 NodeID p = store->getPAGDstNodeID();
482 if (
const StoreSVFGNode* store = SVFUtil::dyn_cast<StoreSVFGNode>(node))
virtual const PointsTo & getPts(NodeID id)
Operation of points-to set.
const PointsTo & getPts(NodeID id) override
PTDataTy * getPTDataTy() const
Get points-to data structure.
void calculateAddrVarPts(NodeID pointer, const SVFGNode *node)
u32_t _NumOfActualInSVFGNodesHaveInOut[2]
virtual void performStat()
double _AvgPtsSize
average points-to set size.
double _AvgAddrTakenVarPtsSize
average points-to set size of addr-taken variables.
u32_t _PotentialNumOfVarHaveINOUTPts[2]
u32_t _NumOfVarHaveINOUTPtsInFormalOut[2]
FlowSensitive::PtsMap PtsMap
u32_t _NumOfFormalOutSVFGNodesHaveInOut[2]
u32_t _NumOfVarHaveEmptyINOUTPts[2]
u32_t _NumOfVarHaveINOUTPtsInStore[2]
u32_t _NumOfFormalInSVFGNodesHaveInOut[2]
double _AvgTopLvlPtsSize
average points-to set size in top-level pointers.
u32_t _NumOfActualOutSVFGNodesHaveInOut[2]
u32_t _NumOfVarHaveINOUTPtsInActualIn[2]
FlowSensitive::DFInOutMap DFInOutMap
u32_t _NumOfMSSAPhiSVFGNodesHaveInOut[2]
u32_t _MaxPtsSize
sizes of points-to set
u32_t _MaxAddrTakenVarPts
max points-to set size of addr-taken variables.
void statAddrVarPtsSize()
void statInOutPtsSize(const DFInOutMap &data, ENUM_INOUT inOrOut)
u32_t _TotalPtsSize
total points-to set size.
u32_t _NumOfVarHaveINOUTPtsInMSSAPhi[2]
u32_t _NumOfSVFGNodesHaveInOut[2]
number of SVFG nodes which have IN/OUT set.
u32_t _NumOfVarHaveINOUTPtsInLoad[2]
u32_t _MaxInOutPtsSize[2]
max points-to set size in IN/OUT set.
u32_t _NumOfVarHaveINOUTPts[2]
number of pag nodes which have points-to set in IN/OUT set.
u32_t _NumOfLoadSVFGNodesHaveInOut[2]
u32_t _NumOfVarHaveINOUTPtsInActualOut[2]
u32_t _NumOfVarHaveINOUTPtsInFormalIn[2]
u32_t _NumOfStoreSVFGNodesHaveInOut[2]
u32_t _NumOfAddrTakeVar
number of occurrences of addr-taken variables in load/store.
u32_t _MaxTopLvlPtsSize
max points-to set size in top-level pointers.
double _AvgInOutPtsSize[2]
average points-to set size in IN set.
u32_t numOfProcessedLoad
Number of processed Phi node.
u32_t numOfProcessedCopy
Number of processed Addr node.
double gepTime
time of handling gep edges
double indirectPropaTime
time of points-to propagation of top-level pointers
double addrTime
time of handling address edges
const DFInOutMap & getDFOutputMap() const
double solveTime
time of solve.
const DFInOutMap & getDFInputMap() const
u32_t numOfProcessedStore
Number of processed Load node.
const PointsTo & getDFOutPtsSet(const SVFGNode *stmt, const NodeID node)
double storeTime
time of store edges
double copyTime
time of handling copy edges
u32_t numOfProcessedGep
Number of processed Copy node.
u32_t maxSCCSize
Number of processed mssa node.
double loadTime
time of load edges
u32_t numOfProcessedActualParam
Number of processed Store node.
u32_t numOfProcessedPhi
Number of processed Gep node.
double propagationTime
time of points-to propagation.
u32_t numOfProcessedFormalRet
Number of processed actual param node.
double directPropaTime
time of points-to propagation of address-taken objects
double processTime
time of processNode.
u32_t numOfProcessedAddr
Statistics.
double phiTime
time of phi nodes.
double sccTime
time of SCC detection.
double updateTime
time of strong/weak updates.
u32_t numOfProcessedMSSANode
Number of processed formal ret node.
double updateCallGraphTime
time of updating call graph
iterator begin()
Iterators.
IDToNodeMapTy::const_iterator const_iterator
IDToNodeMapTy::iterator iterator
Node Iterators.
u32_t getValueNodeNum() const
u32_t getObjectNodeNum() const
SymID getId() const
Get the memory object id.
void performStat() override
bool containBlackHoleNode(const PointsTo &pts)
Determine whether a points-to contains a black hole or constant node.
u32_t getNumOfResolvedIndCallEdge() const
Return number of resolved indirect call edges.
bool containConstantNode(const PointsTo &pts)
u32_t count() const
Returns number of elements.
SVFGNode * getSVFGNode(NodeID id) const
Get a SVFG node.
u32_t getFieldObjNodeNum() const
bool isValidTopLevelPtr(const SVFVar *node)
const MemObj * getBaseObj(NodeID id) const
u32_t getFieldValNodeNum() const
Node and edge statistics.
virtual void printStat(std::string str="")
GenericNode< SVFVar, SVFStmt >::GEdgeSetTy SVFStmtSetTy
SVFStmt::SVFStmtSetTy & getIncomingEdges(SVFStmt::PEDGEK kind)
Get incoming SVFIR statements (edges)
u32_t numOfIteration
num of iterations during constraint solving
void writeWrnMsg(const std::string &msg)
Writes a message run through wrnMsg.
llvm::IRBuilder IRBuilder