82 u32_t maxRegionSize = 0;
83 u32_t totalRegionPtsNum = 0;
85 MRGenerator::MRSet::const_iterator it = mrSet.begin();
86 MRGenerator::MRSet::const_iterator eit = mrSet.end();
87 for (; it != eit; it++)
91 if (regionSize > maxRegionSize)
92 maxRegionSize = regionSize;
93 totalRegionPtsNum += regionSize;
249 SVFG::SVFGNodeIDToNodeMapTy::iterator it =
graph->
begin();
250 SVFG::SVFGNodeIDToNodeMapTy::iterator eit =
graph->
end();
251 for (; it != eit; ++it)
254 if (SVFUtil::isa<FormalINSVFGNode>(it->second))
256 else if (SVFUtil::isa<FormalOUTSVFGNode>(it->second))
258 else if (SVFUtil::isa<FormalParmSVFGNode>(it->second))
260 else if (SVFUtil::isa<FormalRetSVFGNode>(it->second))
262 else if (SVFUtil::isa<ActualINSVFGNode>(it->second))
264 else if (SVFUtil::isa<ActualOUTSVFGNode>(it->second))
266 else if (SVFUtil::isa<ActualParmSVFGNode>(it->second))
268 else if (SVFUtil::isa<ActualRetSVFGNode>(it->second))
270 else if (SVFUtil::isa<AddrSVFGNode>(it->second))
272 else if (SVFUtil::isa<CopySVFGNode>(it->second))
274 else if (SVFUtil::isa<GepSVFGNode>(it->second))
276 else if (SVFUtil::isa<LoadSVFGNode>(it->second))
278 else if (SVFUtil::isa<StoreSVFGNode>(it->second))
280 else if (SVFUtil::isa<PHISVFGNode>(it->second))
282 else if (SVFUtil::isa<MSSAPHISVFGNode>(it->second))
295 if (!nodeHasIndInEdge.empty())
298 if (!nodeHasIndOutEdge.empty())
312 u32_t indInEdges = 0;
313 SVFGEdge::SVFGEdgeSetTy::const_iterator edgeIt = inEdges.begin();
314 SVFGEdge::SVFGEdgeSetTy::const_iterator edgeEit = inEdges.end();
315 for (; edgeIt != edgeEit; ++edgeIt)
320 nodeHasIndInEdge.insert(node->
getId());
323 const NodeBS& cpts = edge->getPointsTo();
328 if (SVFUtil::isa<CallDirSVFGEdge>(*edgeIt))
330 else if (SVFUtil::isa<CallIndSVFGEdge>(*edgeIt))
332 else if (SVFUtil::isa<RetDirSVFGEdge>(*edgeIt))
334 else if (SVFUtil::isa<RetIndSVFGEdge>(*edgeIt))
352 u32_t indOutEdges = 0;
353 edgeIt = outEdges.begin();
354 edgeEit = outEdges.end();
355 for (; edgeIt != edgeEit; ++edgeIt)
357 if ((*edgeIt)->isIndirectVFGEdge())
360 nodeHasIndOutEdge.insert(node->
getId());
376 unsigned totalNode = 0;
377 unsigned totalCycle = 0;
379 unsigned maxNodeInCycle = 0;
380 unsigned totalEdge = 0;
381 unsigned edgeInCycle = 0;
383 unsigned totalDirectEdge = 0;
384 unsigned directEdgeInCycle = 0;
385 unsigned totalIndirectEdge = 0;
386 unsigned indirectEdgeInCycle = 0;
387 unsigned totalCallEdge = 0;
388 unsigned callEdgeInCycle = 0;
389 unsigned insensitiveCallEdge = 0;
390 unsigned totalRetEdge = 0;
391 unsigned retEdgeInCycle = 0;
392 unsigned insensitiveRetEdge = 0;
398 SVFG::SVFGNodeIDToNodeMapTy::iterator it =
graph->
begin();
399 SVFG::SVFGNodeIDToNodeMapTy::iterator eit =
graph->
end();
400 for (; it != eit; ++it)
406 sccRepNodeSet.insert(svfgSCC->
repNode(it->first));
408 if(subNodes.
count() > maxNodeInCycle)
409 maxNodeInCycle = subNodes.
count();
412 SVFGEdge::SVFGEdgeSetTy::const_iterator edgeIt = it->second->InEdgeBegin();
413 SVFGEdge::SVFGEdgeSetTy::const_iterator edgeEit = it->second->InEdgeEnd();
414 for (; edgeIt != edgeEit; ++edgeIt)
437 indirectEdgeInCycle++;
447 if(insensitiveCalRetEdges.find(edge)!=insensitiveCalRetEdges.end())
449 insensitiveCallEdge++;
460 if(insensitiveCalRetEdges.find(edge)!=insensitiveCalRetEdges.end())
462 insensitiveRetEdge++;
469 totalCycle = sccRepNodeSet.size();
NodeID getSrcID() const
get methods of the components
iterator begin()
Iterators.
const GEdgeSetTy & getOutEdges() const
const GEdgeSetTy & getInEdges() const
OrderedSet< const MemRegion *, MemRegion::equalMemRegion > MRSet
Get typedef from Pointer Analysis.
u32_t getRegionSize() const
Return memory object number inside a region.
static const char * TimeOfInsertingPHI
Time for inserting phis.
static const char * NumOfRetMu
Number of function return mu.
static const char * NumOfLoadMu
Number of load mu.
static const char * NumOfStoreHasChi
Number of stores which have chi.
static const char * TimeOfCreateMUCHI
Time for generating mu/chi for load/store/calls.
static const char * NumOfMSSAPhi
Number of mssa phi.
static const char * NumOfBBHasMSSAPhi
Number of basic blocks which have mssa phi.
static const char * NumOfAveragePtsInRegion
Number of average points-to set in region.
static const char * TimeOfGeneratingMemRegions
Time for allocating regions.
static const char * NumOfCSMu
Number of call site mu.
static const char * TotalTimeOfConstructMemSSA
Total time for constructing memory SSA.
static const char * NumOfStoreChi
Number of store chi.
static const char * TimeOfSSARenaming
Time for SSA rename.
virtual void performStat() override
static const char * NumOfCSChi
Number of call site chi.
static const char * NumOfMemRegions
Number of memory regions.
static const char * NumOfFunHasRetMu
Number of functions which have return mu.
static const char * NumOfMaxRegion
Number of max points-to set in region.
static const char * NumOfLoadHasMu
Number of loads which have mu.
virtual void printStat(std::string str="") override
static const char * NumOfEntryChi
Number of function entry chi.
static const char * NumOfCSHasChi
Number of call sites which have chi.
static const char * NumOfFunHasEntryChi
Number of functions which have entry chi.
static const char * NumOfCSHasMu
Number of call sites which have mu.
CallSiteToMUSetMap & getCallSiteToMuSetMap()
u32_t getFunEntryChiNum() const
u32_t getCallSiteChiNum() const
static double timeOfGeneratingMemRegions
Statistics.
static double timeOfInsertingPHI
Time for inserting phis.
FunToReturnMuSetMap & getFunToRetMuSetMap()
static double timeOfCreateMUCHI
Time for generating mu/chi for load/store/calls.
u32_t getFunRetMuNum() const
LoadToMUSetMap & getLoadToMUSetMap()
CallSiteToCHISetMap & getCallSiteToChiSetMap()
BBToPhiSetMap & getBBToPhiSetMap()
StoreToChiSetMap & getStoreToChiSetMap()
static double timeOfSSARenaming
Time for SSA rename.
u32_t getBBPhiNum() const
u32_t getCallSiteMuNum() const
u32_t getStoreChiNum() const
u32_t getLoadMuNum() const
Stat methods.
MRGenerator * getMRGenerator()
Return MRGenerator.
FunToEntryChiSetMap & getFunToEntryChiSetMap()
NodeID repNode(NodeID n) const
get the rep node if not found return itself
bool isInCycle(NodeID n) const
whether the node is in a cycle
const NodeBS & subNodes(NodeID n) const
get all subnodes in one scc, if size is empty insert itself into the set
NodeID getId() const
Get ID.
virtual void performStat() override
int totalIndEdgeLabels
Total number of l –o--> lp.
double connectDirSVFGEdgeTimeStart
int numOfActualOut
number of actual out svfg nodes.
int avgOutDegree
average out degrees of SVFG nodes.
SCCDetection< SVFG * > SVFGSCC
int totalOutEdge
Total number of outgoing SVFG edges.
double connectIndSVFGEdgeTimeStart
virtual void printStat(std::string str="") override
u32_t maxIndInDegree
max indirect in degrees of SVFG nodes.
double addAddrTakenNodeTimeEnd
double connectIndSVFGEdgeTimeEnd
int avgIndInDegree
average indirect in degrees of SVFG nodes.
NodeID nodeInCycle(SVFGSCC *scc, NodeID id) const
int avgInDegree
average in degrees of SVFG nodes.
int numOfStore
number of store svfg nodes.
int numOfActualIn
number of actual in svfg nodes.
u32_t maxInDegree
max in degrees of SVFG nodes.
void calculateNodeDegrees(SVFGNode *node, NodeSet &nodeHasIndInEdge, NodeSet &nodeHasIndOutEdge)
int avgWeight
average weight.
u32_t maxOutDegree
max out degrees of SVFG nodes.
int avgIndOutDegree
average indirect out degrees of SVFG nodes.
int totalInEdge
Total number of incoming SVFG edges.
int numOfLoad
number of load svfg nodes.
virtual void performSCCStat(SVFGEdgeSet insensitiveCalRetEdges)
double addTopLevelNodeTimeEnd
int totalIndInEdge
Total number of indirect SVFG edges.
NodeID getSCCRep(SVFGSCC *scc, NodeID id) const
int numOfMSSAPhi
number of mssa phi svfg nodes.
double addAddrTakenNodeTimeStart
int numOfFormalOut
number of formal out svfg nodes.
int numOfNodes
number of svfg nodes.
int numOfFormalIn
number of formal in svfg nodes.
double connectDirSVFGEdgeTimeEnd
u32_t maxIndOutDegree
max indirect out degrees of SVFG nodes.
double addTopLevelNodeTimeStart
OrderedSet< const SVFGEdge * > SVFGEdgeSet
virtual void printStat(std::string str="")
bool isRetVFGEdge() const
bool isCallVFGEdge() const
VFGEdgeSetTy SVFGEdgeSetTy
bool isDirectVFGEdge() const
Get methods of the components.
bool isIndirectVFGEdge() const