re PR gcov-profile/55674 (>20% size increase of lto/pgo binaries since r193747)
authorTeresa Johnson <tejohnson@google.com>
Fri, 14 Dec 2012 15:10:45 +0000 (15:10 +0000)
committerTeresa Johnson <tejohnson@gcc.gnu.org>
Fri, 14 Dec 2012 15:10:45 +0000 (15:10 +0000)
2012-12-14  Teresa Johnson  <tejohnson@google.com>

        PR gcov-profile/55674
* lto-cgraph.c (merge_profile_summaries): Set min correctly the
        first time we merge into a histogram entry.

From-SVN: r194502

gcc/ChangeLog
gcc/lto-cgraph.c

index fe4e1e165823e10bdc35c85a717aa546cdda559e..08538144c65629f2f61586066667b3f12bf84744 100644 (file)
@@ -1,3 +1,9 @@
+2012-12-14  Teresa Johnson  <tejohnson@google.com>
+
+        PR gcov-profile/55674
+       * lto-cgraph.c (merge_profile_summaries): Set min correctly the
+        first time we merge into a histogram entry.
+
 2012-12-14  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/55684
index 85b1ea4a5f3b5d3f375cb95cac7f8bdf86cda760..73a58f03206b11f1bb1563c657b39c59424f7a0a 100644 (file)
@@ -1368,7 +1368,9 @@ merge_profile_summaries (struct lto_file_decl_data **file_data_vec)
          so we need to account for a non-zero histogram entry at new_ix.  */
       unsigned new_ix = gcov_histo_index (scaled_min);
       lto_gcov_summary.histogram[new_ix].min_value
-          = MIN (lto_gcov_summary.histogram[new_ix].min_value, scaled_min);
+          = (lto_gcov_summary.histogram[new_ix].num_counters
+             ? MIN (lto_gcov_summary.histogram[new_ix].min_value, scaled_min)
+             : scaled_min);
       /* Some of the scaled counter values would ostensibly need to be placed
          into different (larger) histogram buckets, but we keep things simple
          here and place the scaled cumulative counter value in the bucket