public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc(refs/users/hubicka/heads/honza-gcc-benchmark-branch-v2)] Fix ICE in compute_fn_summary
@ 2021-03-31  9:44 Jan Hubicka
  0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2021-03-31  9:44 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:0b7ad21183e9e9539bf87c2ebf25433f932a2d5c

commit 0b7ad21183e9e9539bf87c2ebf25433f932a2d5c
Author: Jan Hubicka <jh@suse.cz>
Date:   Mon Mar 1 14:33:39 2021 +0100

    Fix ICE in compute_fn_summary
    
            PR ipa/98338
            * ipa-fnsummary.c (compute_fn_summary): Fix sanity check.

Diff:
---
 gcc/ipa-fnsummary.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/gcc/ipa-fnsummary.c b/gcc/ipa-fnsummary.c
index e32e69cd3ad..f4f9ee3e9ae 100644
--- a/gcc/ipa-fnsummary.c
+++ b/gcc/ipa-fnsummary.c
@@ -3137,11 +3137,18 @@ compute_fn_summary (struct cgraph_node *node, bool early)
   info->estimated_stack_size = size_info->estimated_self_stack_size;
 
   /* Code above should compute exactly the same result as
-     ipa_update_overall_fn_summary but because computation happens in
-     different order the roundoff errors result in slight changes.  */
+     ipa_update_overall_fn_summary except for case when speculative
+     edges are present since these are accounted to size but not
+     self_size. Do not compare time since different order the roundoff
+     errors result in slight changes.  */
   ipa_update_overall_fn_summary (node);
-  /* In LTO mode we may have speculative edges set.  */
-  gcc_assert (in_lto_p || size_info->size == size_info->self_size);
+  if (flag_checking)
+    {
+      for (e = node->indirect_calls; e; e = e->next_callee)
+       if (e->speculative)
+ 	 break;
+      gcc_assert (e || size_info->size == size_info->self_size);
+    }
 }


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-31  9:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-31  9:44 [gcc(refs/users/hubicka/heads/honza-gcc-benchmark-branch-v2)] Fix ICE in compute_fn_summary Jan Hubicka

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).