83{
84
85 CallGraph* graph =
pta->getCallGraph();
88
89 unsigned totalNode = 0;
90 unsigned totalCycle = 0;
91 unsigned nodeInCycle = 0;
92 unsigned maxNodeInCycle = 0;
93 unsigned totalEdge = 0;
94 unsigned edgeInCycle = 0;
95
99 for (; it != eit; ++it)
100 {
101 totalNode++;
103 {
104 sccRepNodeSet.insert(callgraphSCC->
repNode(it->first));
105 nodeInCycle++;
107 if(subNodes.
count() > maxNodeInCycle)
108 maxNodeInCycle = subNodes.
count();
109 }
110
113 for (; edgeIt != edgeEit; ++edgeIt)
114 {
115 CallGraphEdge*edge = *edgeIt;
118 {
120 }
121 }
122 }
123
124 totalCycle = sccRepNodeSet.size();
125
132
141 else
143
144 delete callgraphSCC;
145}
CallInstSet & getIndirectCalls()
CallInstSet & getDirectCalls()
NodeID getSrcID() const
get methods of the components
iterator begin()
Iterators.
IDToNodeMapTy::iterator iterator
GEdgeSetTy::const_iterator const_iterator
SCCDetection< CallGraph * > CallGraphSCC
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
virtual void printStat(std::string str="")
@ Cxt_DDA
context sensitive DDA
@ FieldS_DDA
Field sensitive DDA.
@ CFLFICI_WPA
Flow-, context-, insensitive CFL-reachability-based analysis.
@ FSDATAFLOW_WPA
Traditional Dataflow-based flow sensitive WPA.
@ Steensgaard_WPA
Steensgaard PTA.
@ FSCS_WPA
Flow-, context- sensitive WPA.
@ CFLFSCS_WPA
Flow-, context-, CFL-reachability-based analysis.
@ Andersen_BASE
Base Andersen PTA.