If only have function profile, don't print out "not executed" for all of the blocks :)
authorChris Lattner <sabre@nondot.org>
Thu, 30 Oct 2003 23:44:28 +0000 (23:44 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 30 Oct 2003 23:44:28 +0000 (23:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9622 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-prof/llvm-prof.cpp

index 5f114474b57c505dd1e3f49d446c198c42c7ed07..5911918b161b4d99c151406d399deaa8b7d85be1 100644 (file)
@@ -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