]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/gimple-pretty-print.c
asan.c (create_cond_insert_point): Maintain profile.
[thirdparty/gcc.git] / gcc / gimple-pretty-print.c
index 0da90740165b1063f994b63288b709f45426f6ae..ba3d6d6898c5aa25fd8acc72a300c05e3e28e1c6 100644 (file)
@@ -82,21 +82,17 @@ debug_gimple_stmt (gimple *gs)
    by xstrdup_for_dump.  */
 
 static const char *
-dump_profile (int frequency, profile_count &count)
+dump_profile (profile_count &count)
 {
-  float minimum = 0.01f;
-
-  gcc_assert (0 <= frequency && frequency <= REG_BR_PROB_BASE);
-  float fvalue = frequency * 100.0f / REG_BR_PROB_BASE;
-  if (fvalue < minimum && frequency > 0)
-    return "[0.01%]";
-
   char *buf;
-  if (count.initialized_p ())
-    buf = xasprintf ("[%.2f%%] [count: %" PRId64 "]", fvalue,
+  if (!count.initialized_p ())
+    return NULL;
+  if (count.ipa_p ())
+    buf = xasprintf ("[count: %" PRId64 "]",
+                    count.to_gcov_type ());
+  else if (count.initialized_p ())
+    buf = xasprintf ("[local count: %" PRId64 "]",
                     count.to_gcov_type ());
-  else
-    buf = xasprintf ("[%.2f%%] [count: INV]", fvalue);
 
   const char *ret = xstrdup_for_dump (buf);
   free (buf);
@@ -2695,8 +2691,7 @@ dump_gimple_bb_header (FILE *outf, basic_block bb, int indent,
        fprintf (outf, "%*sbb_%d:\n", indent, "", bb->index);
       else
        fprintf (outf, "%*s<bb %d> %s:\n",
-                indent, "", bb->index, dump_profile (bb->frequency,
-                                                     bb->count));
+                indent, "", bb->index, dump_profile (bb->count));
     }
 }