PR lto/45375
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Jan 2011 23:37:11 +0000 (23:37 +0000)
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 10 Jan 2011 23:37:11 +0000 (23:37 +0000)
* profile.c (read_profile_edge_counts): Ignore profile inconistency
when correcting profile.

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

gcc/ChangeLog
gcc/profile.c

index 14d5066..2c5b123 100644 (file)
@@ -1,5 +1,11 @@
 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
        * lto-streamer-out.c (pack_ts_function_decl_value_fields): Store
        DECL_FINI_PRIORITY.
index bde8b46..2334101 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