aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure/Printer.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-11-07 02:18:46 +0000
committerChris Lattner <sabre@nondot.org>2002-11-07 02:18:46 +0000
commit1421233dc13c9bab8da8a631967b1527b225cfdf (patch)
tree9428e931ffbfa7fdcbfecfaf3ae91affbfa035cd /lib/Analysis/DataStructure/Printer.cpp
parent81af5c4d89681e3fa4901b2485862e97dc1daeb1 (diff)
Compute total number of nodes and # call nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/Printer.cpp')
-rw-r--r--lib/Analysis/DataStructure/Printer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Analysis/DataStructure/Printer.cpp b/lib/Analysis/DataStructure/Printer.cpp
index f5c1ec49cf..edee17212d 100644
--- a/lib/Analysis/DataStructure/Printer.cpp
+++ b/lib/Analysis/DataStructure/Printer.cpp
@@ -167,9 +167,12 @@ static void printCollection(const Collection &C, std::ostream &O,
return;
}
+ unsigned TotalNumNodes = 0, TotalCallNodes = 0;
for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I)
if (!I->isExternal()) {
DSGraph &Gr = C.getDSGraph((Function&)*I);
+ TotalNumNodes += Gr.getGraphSize();
+ TotalCallNodes += Gr.getFunctionCalls().size();
if (I->getName() == "main" || !OnlyPrintMain)
Gr.writeGraphToFile(O, Prefix+I->getName());
else {
@@ -177,6 +180,9 @@ static void printCollection(const Collection &C, std::ostream &O,
<< Gr.getGraphSize() << "+" << Gr.getFunctionCalls().size() << "]\n";
}
}
+
+ O << "\nGraphs contain [" << TotalNumNodes << "+" << TotalCallNodes
+ << "] nodes total\n";
}