summaryrefslogtreecommitdiff
path: root/tools/llvm-prof
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-10-30 23:44:28 +0000
committerChris Lattner <sabre@nondot.org>2003-10-30 23:44:28 +0000
commit367373053b4c50cf84ec54d2300ddab14c60063e (patch)
tree3677ba3cee76ba3c186894af1244fb06c986f9ce /tools/llvm-prof
parent5e717646d70084709ebfac4ef4cf68bb81bbad49 (diff)
downloadllvm-367373053b4c50cf84ec54d2300ddab14c60063e.tar.gz
llvm-367373053b4c50cf84ec54d2300ddab14c60063e.tar.bz2
llvm-367373053b4c50cf84ec54d2300ddab14c60063e.tar.xz
If only have function profile, don't print out "not executed" for all of the blocks :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9622 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-prof')
-rw-r--r--tools/llvm-prof/llvm-prof.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/llvm-prof/llvm-prof.cpp b/tools/llvm-prof/llvm-prof.cpp
index 5f114474b5..5911918b16 100644
--- a/tools/llvm-prof/llvm-prof.cpp
+++ b/tools/llvm-prof/llvm-prof.cpp
@@ -64,6 +64,7 @@ namespace {
<< " times.\n;;;\n";
}
virtual void emitBasicBlockAnnot(const BasicBlock *BB, std::ostream &OS) {
+ if (BlockFreqs.empty()) return;
if (unsigned Count = BlockFreqs[BB])
OS << ";;; Executed " << Count << " times.\n";
else