diff options
author | Teresa Johnson <tejohnson@google.com> | 2012-12-14 15:10:45 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@gcc.gnu.org> | 2012-12-14 15:10:45 +0000 |
commit | ebd3e642dd3c7969f462b65dfd155a91c3972701 (patch) | |
tree | ba74869b241fb7eb7591483120a8f2a65a26338d | |
parent | d720b70f1ae1e6756cf17e7f042a2d3fa7eed977 (diff) | |
download | gcc-ebd3e642dd3c7969f462b65dfd155a91c3972701.zip gcc-ebd3e642dd3c7969f462b65dfd155a91c3972701.tar.gz gcc-ebd3e642dd3c7969f462b65dfd155a91c3972701.tar.bz2 |
re PR gcov-profile/55674 (>20% size increase of lto/pgo binaries since r193747)
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
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lto-cgraph.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index fe4e1e1..0853814 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index 85b1ea4..73a58f0 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -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 |