diff options
author | Chris Lattner <sabre@nondot.org> | 2003-11-06 20:29:25 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-11-06 20:29:25 +0000 |
commit | 7985d3664d6abf3096eba62f74f2e7f59b458a51 (patch) | |
tree | 3f6c247578638d01f9b596261b2c437430e8b25d /llvm | |
parent | 38cd27e450f34f89eab5222a3be5d1d4b41a3a95 (diff) | |
download | bcm5719-llvm-7985d3664d6abf3096eba62f74f2e7f59b458a51.tar.gz bcm5719-llvm-7985d3664d6abf3096eba62f74f2e7f59b458a51.zip |
Add new command line option
llvm-svn: 9754
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/tools/llvm-prof/llvm-prof.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/tools/llvm-prof/llvm-prof.cpp b/llvm/tools/llvm-prof/llvm-prof.cpp index 672e0f69226..4492fd67b71 100644 --- a/llvm/tools/llvm-prof/llvm-prof.cpp +++ b/llvm/tools/llvm-prof/llvm-prof.cpp @@ -37,6 +37,9 @@ namespace { 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 @@ int main(int argc, char **argv) { 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... |