summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-04 22:00:12 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-12-04 22:00:12 +0000
commit555491e24f4600b5e8baa1e54562b84c25ca2da3 (patch)
treed569fd073d1e7730591579ceaca5c7d83ebd6ea5
parentc470c5a9c593390d0bf3f4a6004c136b99120545 (diff)
downloadgcc-555491e24f4600b5e8baa1e54562b84c25ca2da3.tar.gz
* Makefile.in (LTO_STREAMER_H): Add GCOV_IO_H.
* lto-cgraph.c (merge_profile_summaries): Fix thinko. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167459 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/Makefile.in3
-rw-r--r--gcc/lto-cgraph.c14
3 files changed, 13 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d697ad1b104..f56b07015f0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
2010-12-03 Jan Hubicka <jh@suse.cz>
+ * Makefile.in (LTO_STREAMER_H): Add GCOV_IO_H.
+ * lto-cgraph.c (merge_profile_summaries): Fix thinko.
+
+2010-12-03 Jan Hubicka <jh@suse.cz>
+
PR tree-optimization/46760
* cgraph.c (cgraph_create_node): Initialize count_materialization_scale.
* cgraph.h (struct cgraph_node): Add count_materialization_scale.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 231500b2394..949262b58c3 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -975,7 +975,8 @@ IRA_INT_H = ira.h ira-int.h $(CFGLOOP_H) alloc-pool.h
DBGCNT_H = dbgcnt.h dbgcnt.def
EBITMAP_H = ebitmap.h sbitmap.h
LTO_STREAMER_H = lto-streamer.h $(LINKER_PLUGIN_API_H) $(TARGET_H) \
- $(CGRAPH_H) $(VEC_H) vecprim.h $(TREE_H) $(GIMPLE_H)
+ $(CGRAPH_H) $(VEC_H) vecprim.h $(TREE_H) $(GIMPLE_H) \
+ $(GCOV_IO_H)
TREE_VECTORIZER_H = tree-vectorizer.h $(TREE_DATA_REF_H)
IPA_PROP_H = ipa-prop.h $(TREE_H) $(VEC_H) $(CGRAPH_H) $(GIMPLE_H)
GSTAB_H = gstab.h stab.def
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index 140a926909a..76597a000ee 100644
--- a/gcc/lto-cgraph.c
+++ b/gcc/lto-cgraph.c
@@ -1504,16 +1504,14 @@ merge_profile_summaries (struct lto_file_decl_data **file_data_vec)
During LTRANS we already have values of count_materialization_scale
computed, so just update them. */
for (node = cgraph_nodes; node; node = node->next)
- if (node->local.lto_file_data->profile_info.run_max)
+ if (node->local.lto_file_data->profile_info.runs)
{
int scale;
- if (node->local.lto_file_data->profile_info.runs)
- scale =
- ((node->count_materialization_scale * max_runs
- + node->local.lto_file_data->profile_info.run_max / 2)
- / node->local.lto_file_data->profile_info.run_max);
- else
- scale = node->count_materialization_scale;
+
+ scale =
+ ((node->count_materialization_scale * max_runs
+ + node->local.lto_file_data->profile_info.runs / 2)
+ / node->local.lto_file_data->profile_info.runs);
node->count_materialization_scale = scale;
if (scale < 0)
fatal_error ("Profile information in %s corrupted",