[llvm-commits] CVS: llvm/tools/llvm-prof/llvm-prof.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Nov 6 14:30:08 PST 2003
Changes in directory llvm/tools/llvm-prof:
llvm-prof.cpp updated: 1.14 -> 1.15
---
Log message:
Add new command line option
---
Diffs of the changes: (+5 -2)
Index: llvm/tools/llvm-prof/llvm-prof.cpp
diff -u llvm/tools/llvm-prof/llvm-prof.cpp:1.14 llvm/tools/llvm-prof/llvm-prof.cpp:1.15
--- llvm/tools/llvm-prof/llvm-prof.cpp:1.14 Thu Oct 30 18:34:05 2003
+++ llvm/tools/llvm-prof/llvm-prof.cpp Thu Nov 6 14:29:25 2003
@@ -37,6 +37,9 @@
cl::desc("Print LLVM code with frequency annotations"));
cl::alias PrintAnnotated2("A", cl::desc("Alias for --annotated-llvm"),
cl::aliasopt(PrintAnnotatedLLVM));
+ cl::opt<bool>
+ PrintAllCode("print-all-code",
+ cl::desc("Print annotated code for the entire program"));
}
// PairSecondSort - A sorting predicate to sort by the second element of a pair.
@@ -171,13 +174,13 @@
BlockFreqs.insert(Counts.begin(), Counts.end());
}
- if (PrintAnnotatedLLVM) {
+ if (PrintAnnotatedLLVM || PrintAllCode) {
std::cout << "\n===" << std::string(73, '-') << "===\n";
std::cout << "Annotated LLVM code for the module:\n\n";
ProfileAnnotator PA(FuncFreqs, BlockFreqs);
- if (FunctionsToPrint.empty())
+ if (FunctionsToPrint.empty() || PrintAllCode)
M->print(std::cout, &PA);
else
// Print just a subset of the functions...
More information about the llvm-commits
mailing list