getNodes() is gone, use node_begin/end instead

Rename stats from dsnode -> dsa
Add a new stat


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11167 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2004-02-07 23:58:05 +00:00
parent a84c681637
commit e92e76446e
3 changed files with 18 additions and 15 deletions
+8 -6
View File
@@ -30,8 +30,8 @@ using namespace llvm;
namespace {
cl::opt<bool> OnlyPrintMain("only-print-main-ds", cl::ReallyHidden);
cl::opt<bool> DontPrintAnything("dont-print-ds", cl::ReallyHidden);
Statistic<> MaxGraphSize ("dsnode", "Maximum graph size");
Statistic<> NumFoldedNodes ("dsnode", "Number of folded nodes (in final graph)");
Statistic<> MaxGraphSize ("dsa", "Maximum graph size");
Statistic<> NumFoldedNodes ("dsa", "Number of folded nodes (in final graph)");
}
void DSNode::dump() const { print(std::cerr, 0); }
@@ -249,10 +249,12 @@ static void printCollection(const Collection &C, std::ostream &O,
<< Gr.getGraphSize() << "+" << NumCalls << "]\n";
}
if (MaxGraphSize < Gr.getNodes().size())
MaxGraphSize = Gr.getNodes().size();
for (unsigned i = 0, e = Gr.getNodes().size(); i != e; ++i)
if (Gr.getNodes()[i]->isNodeCompletelyFolded())
unsigned GraphSize = std::distance(Gr.node_begin(), Gr.node_end());
if (MaxGraphSize < GraphSize) MaxGraphSize = GraphSize;
for (DSGraph::node_iterator NI = Gr.node_begin(), E = Gr.node_end();
NI != E; ++NI)
if ((*NI)->isNodeCompletelyFolded())
++NumFoldedNodes;
}