never print zero executions blocks
authorChris Lattner <sabre@nondot.org>
Fri, 31 Oct 2003 00:34:05 +0000 (00:34 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 31 Oct 2003 00:34:05 +0000 (00:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9626 91177308-0d34-0410-b5e6-96231b3b80d8

tools/llvm-prof/llvm-prof.cpp

index 80eb36bd63d80df72def9bf2ea806bbde588e796..672e0f6922648208c20e698e2ec9aa60a4227b98 100644 (file)
@@ -159,6 +159,7 @@ int main(int argc, char **argv) {
     unsigned BlocksToPrint = Counts.size();
     if (BlocksToPrint > 20) BlocksToPrint = 20;
     for (unsigned i = 0; i != BlocksToPrint; ++i) {
+      if (Counts[i].second == 0) break;
       Function *F = Counts[i].first->getParent();
       printf("%3d. %5.2f%% %5u/%llu\t%s() - %s\n", i+1,
              Counts[i].second/(double)TotalExecutions*100,