[llvm-commits] CVS: llvm/tools/llvm-prof/llvm-prof.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Oct 30 18:27:01 PST 2003
Changes in directory llvm/tools/llvm-prof:
llvm-prof.cpp updated: 1.12 -> 1.13
---
Log message:
Simplify code
---
Diffs of the changes: (+7 -7)
Index: llvm/tools/llvm-prof/llvm-prof.cpp
diff -u llvm/tools/llvm-prof/llvm-prof.cpp:1.12 llvm/tools/llvm-prof/llvm-prof.cpp:1.13
--- llvm/tools/llvm-prof/llvm-prof.cpp:1.12 Thu Oct 30 18:13:26 2003
+++ llvm/tools/llvm-prof/llvm-prof.cpp Thu Oct 30 18:20:09 2003
@@ -174,15 +174,15 @@
std::cout << "\n===" << std::string(73, '-') << "===\n";
std::cout << "Annotated LLVM code for the module:\n\n";
- if (FunctionsToPrint.empty())
- for (Module::iterator I = M->begin(), E = M->end(); I != E; ++I)
- FunctionsToPrint.insert(I);
-
ProfileAnnotator PA(FuncFreqs, BlockFreqs);
- for (std::set<Function*>::iterator I = FunctionsToPrint.begin(),
- E = FunctionsToPrint.end(); I != E; ++I)
- (*I)->print(std::cout, &PA);
+ if (FunctionsToPrint.empty())
+ M->print(std::cout, &PA);
+ else
+ // Print just a subset of the functions...
+ for (std::set<Function*>::iterator I = FunctionsToPrint.begin(),
+ E = FunctionsToPrint.end(); I != E; ++I)
+ (*I)->print(std::cout, &PA);
}
return 0;
More information about the llvm-commits
mailing list