diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2017-05-08 00:21:05 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2017-05-07 22:21:05 +0000 |
commit | 5a8d501f0d1001ba6ddd5d0281e44280bc601677 (patch) | |
tree | 9d6d61555951280c39630b7cebef03115728ea8d /gcc | |
parent | d4a5c4ebc77ba62f22a360c78a03d0b54c43a2a9 (diff) | |
download | gcc-5a8d501f0d1001ba6ddd5d0281e44280bc601677.zip gcc-5a8d501f0d1001ba6ddd5d0281e44280bc601677.tar.gz gcc-5a8d501f0d1001ba6ddd5d0281e44280bc601677.tar.bz2 |
ipa-inline-analysis.c (estimate_function_body_sizes): Recompute body size unconditionally.
* ipa-inline-analysis.c (estimate_function_body_sizes): Recompute
body size unconditionally.
From-SVN: r247729
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ipa-inline-analysis.c | 14 |
2 files changed, 13 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4adb9a8..2f1de24 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-05-05 Jan Hubicka <hubicka@ucw.cz> + + * ipa-inline-analysis.c (estimate_function_body_sizes): Recompute + body size unconditionally. + 2017-05-07 Jeff Law <law@redhat.com> Revert: diff --git a/gcc/ipa-inline-analysis.c b/gcc/ipa-inline-analysis.c index ec6f2ac..d44191a 100644 --- a/gcc/ipa-inline-analysis.c +++ b/gcc/ipa-inline-analysis.c @@ -2994,6 +2994,7 @@ estimate_function_body_sizes (struct cgraph_node *node, bool early) inline_summaries->get (node)->self_size = size; nonconstant_names.release (); ipa_release_body_info (&fbi); + inline_update_overall_summary (node); if (opt_for_fn (node->decl, optimize)) { if (!early) @@ -3119,12 +3120,13 @@ compute_inline_parameters (struct cgraph_node *node, bool early) info->size = info->self_size; info->stack_frame_offset = 0; info->estimated_stack_size = info->estimated_self_stack_size; - if (flag_checking) - { - inline_update_overall_summary (node); - gcc_assert (!(info->time - info->self_time).to_int () - && info->size == info->self_size); - } + + /* Code above should compute exactly the same result as + inline_update_overall_summary but because computation happens in + different order the roundoff errors result in slight changes. */ + inline_update_overall_summary (node); + gcc_assert (!(info->time - info->self_time).to_int () + && info->size == info->self_size); } |