]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* cfg.c (dump_flow_info): Print results of
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 23 May 2002 17:46:46 +0000 (17:46 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 23 May 2002 17:46:46 +0000 (17:46 +0000)
maybe_hot/probably_never_executed predicates.
* toplev.c (open_dump_file): Print function frequency.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53796 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cfg.c
gcc/toplev.c

index f3ed28a0c2f25fa9210b602988f569029d76ec3f..fb3802dd0cf93ef63a1115394666055915e9c518 100644 (file)
@@ -1,3 +1,9 @@
+Thu May 23 19:43:41 CEST 2002  Jan Hubicka  <jh@suse.cz>
+
+       * cfg.c (dump_flow_info): Print results of
+       maybe_hot/probably_never_executed predicates.
+       * toplev.c (open_dump_file): Print function frequency.
+
 2002-05-23  David S. Miller  <davem@redhat.com>
 
        * cse.c (approx_reg_cost_1, approx_reg_cost): Recode to not use
index 4b066011b0c3d4952309727beeed7500e732913e..e4291259a8144d6bca770765c2bd65be62aa24cf 100644 (file)
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -552,7 +552,12 @@ dump_flow_info (file)
               bb->prev_bb->index, bb->next_bb->index);
       fprintf (file, "loop_depth %d, count ", bb->loop_depth);
       fprintf (file, HOST_WIDEST_INT_PRINT_DEC, bb->count);
-      fprintf (file, ", freq %i.\n", bb->frequency);
+      fprintf (file, ", freq %i", bb->frequency);
+      if (maybe_hot_bb_p (bb))
+       fprintf (file, ", maybe hot");
+      if (probably_never_executed_bb_p (bb))
+       fprintf (file, ", probably never executed");
+      fprintf (file, ".\n", bb->frequency);
 
       fprintf (file, "Predecessors: ");
       for (e = bb->pred; e; e = e->pred_next)
index bb6a4486d83e0c2caf0bcd76270c90909cc45c1a..9c470025c37496ccb0be1f3bc098693429abac84 100644 (file)
@@ -1787,8 +1787,13 @@ open_dump_file (index, decl)
   free (dump_name);
 
   if (decl)
-    fprintf (rtl_dump_file, "\n;; Function %s\n\n",
-            (*lang_hooks.decl_printable_name) (decl, 2));
+    fprintf (rtl_dump_file, "\n;; Function %s%s\n\n",
+            (*lang_hooks.decl_printable_name) (decl, 2),
+            cfun->function_frequency == FUNCTION_FREQUENCY_HOT
+            ? " (hot)"
+            : cfun->function_frequency == FUNCTION_FREQUENCY_UNLIKELY_EXECUTED
+            ? " (unlikely executed)"
+            : "");
 
   timevar_pop (TV_DUMP);
   return 1;