diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-09 21:12:07 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-09 21:12:07 +0000 |
commit | aa0b468f6d0e4d30d4f31d528d499e4c9a67c4f2 (patch) | |
tree | b0c006082bbc026983e495353411933f150e0872 /lib/Analysis/DataStructure/Printer.cpp | |
parent | dc26d45c710fda254b235852dc830f4b2e4bcb03 (diff) |
Add globals graphs to all three passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4663 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/Printer.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/Printer.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Analysis/DataStructure/Printer.cpp b/lib/Analysis/DataStructure/Printer.cpp index 962a0935e0..bbd9c2d18b 100644 --- a/lib/Analysis/DataStructure/Printer.cpp +++ b/lib/Analysis/DataStructure/Printer.cpp @@ -181,6 +181,16 @@ static void printCollection(const Collection &C, std::ostream &O, } } + DSGraph &GG = C.getGlobalsGraph(); + TotalNumNodes += GG.getGraphSize(); + TotalCallNodes += GG.getFunctionCalls().size(); + if (OnlyPrintMain) { + GG.writeGraphToFile(O, Prefix+"GlobalsGraph"); + } else { + O << "Skipped Writing '" << Prefix << "GlobalsGraph.dot'... [" + << GG.getGraphSize() << "+" << GG.getFunctionCalls().size() << "]\n"; + } + O << "\nGraphs contain [" << TotalNumNodes << "+" << TotalCallNodes << "] nodes total" << std::endl; } |