This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix LTO binary size increases (PR gcov-profile/55674) (issue6946049)
- From: tejohnson at google dot com (Teresa Johnson)
- To: reply at codereview dot appspotmail dot com,hubicka at ucw dot cz,markus at trippelsdorf dot de,gcc-patches at gcc dot gnu dot org
- Date: Thu, 13 Dec 2012 22:42:41 -0800 (PST)
- Subject: [PATCH] Fix LTO binary size increases (PR gcov-profile/55674) (issue6946049)
2012-12-13 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.
Index: lto-cgraph.c
===================================================================
--- lto-cgraph.c (revision 194496)
+++ lto-cgraph.c (working copy)
@@ -1368,7 +1368,9 @@ merge_profile_summaries (struct lto_file_decl_data
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
--
This patch is available for review at http://codereview.appspot.com/6946049