re PR lto/45375 ([meta-bug] Issues with building Mozilla (i.e. Firefox) with LTO)
authorJan Hubicka <jh@suse.cz>
Mon, 10 Jan 2011 23:37:11 +0000 (00:37 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Mon, 10 Jan 2011 23:37:11 +0000 (23:37 +0000)
PR lto/45375
* profile.c (read_profile_edge_counts): Ignore profile inconistency
when correcting profile.

From-SVN: r168643

gcc/ChangeLog
gcc/profile.c

index 14d5066fdf03ccc9c07f16510821cc2d3ca1d1b7..2c5b123a4bbcdb8288dfd1078dc90bfabdf9153d 100644 (file)
@@ -1,3 +1,9 @@
+2011-01-10  Jan Hubicka  <jh@suse.cz>
+
+       PR lto/45375
+       * profile.c (read_profile_edge_counts): Ignore profile inconistency
+       when correcting profile.
+
 2011-01-10  Jan Hubicka  <jh@suse.cz>
 
        PR lto/46083
index bde8b4677f9bef79477f9bb015e74aa19e7e6b6d..2334101ba8c030b177eba5e9d8bbe055ff8db0fd 100644 (file)
@@ -409,8 +409,17 @@ read_profile_edge_counts (gcov_type *exec_counts)
                e->count = exec_counts[exec_counts_pos++];
                if (e->count > profile_info->sum_max)
                  {
-                   error ("corrupted profile info: edge from %i to %i exceeds maximal count",
-                          bb->index, e->dest->index);
+                   if (flag_profile_correction)
+                     {
+                       static bool informed = 0;
+                       if (!informed)
+                         inform (input_location,
+                                 "corrupted profile info: edge count exceeds maximal count");
+                       informed = 1;
+                     }
+                   else
+                     error ("corrupted profile info: edge from %i to %i exceeds maximal count",
+                            bb->index, e->dest->index);
                  }
              }
            else