[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/Printer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Wed Nov 6 19:56:03 PST 2002
Changes in directory llvm/lib/Analysis/DataStructure:
Printer.cpp updated: 1.33 -> 1.34
---
Log message:
When the -only-print-main-ds option is specified, still print out graph size
statistics for skipped functions
---
Diffs of the changes:
Index: llvm/lib/Analysis/DataStructure/Printer.cpp
diff -u llvm/lib/Analysis/DataStructure/Printer.cpp:1.33 llvm/lib/Analysis/DataStructure/Printer.cpp:1.34
--- llvm/lib/Analysis/DataStructure/Printer.cpp:1.33 Wed Nov 6 00:20:09 2002
+++ llvm/lib/Analysis/DataStructure/Printer.cpp Wed Nov 6 19:54:44 2002
@@ -168,8 +168,15 @@
}
for (Module::const_iterator I = M->begin(), E = M->end(); I != E; ++I)
- if (!I->isExternal() && (I->getName() == "main" || !OnlyPrintMain))
- C.getDSGraph((Function&)*I).writeGraphToFile(O, Prefix+I->getName());
+ if (!I->isExternal()) {
+ DSGraph &Gr = C.getDSGraph((Function&)*I);
+ if (I->getName() == "main" || !OnlyPrintMain)
+ Gr.writeGraphToFile(O, Prefix+I->getName());
+ else {
+ O << "Skipped Writing '" << Prefix+I->getName() << ".dot'... ["
+ << Gr.getGraphSize() << "+" << Gr.getFunctionCalls().size() << "]\n";
+ }
+ }
}
More information about the llvm-commits
mailing list