public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Avoid ICE in fnsummary on complex predicates
@ 2017-05-23 12:50 Jan Hubicka
  0 siblings, 0 replies; only message in thread
From: Jan Hubicka @ 2017-05-23 12:50 UTC (permalink / raw)
  To: gcc-patches

Hi,
as noticed when bootstrapping ppc, it may happen that !exec does not imply
nonconst becuase predicates are computed conservatively and we can throw away
some information.

Bootstrapped/regtested x86_64-linux, comitted.

Honza

	* ipa-fnsummary.c (estimate_node_size_and_time): Do not sanity check
	that nonconst implies exec.
Index: ipa-fnsummary.c
===================================================================
--- ipa-fnsummary.c	(revision 248365)
+++ ipa-fnsummary.c	(working copy)
@@ -2738,11 +2738,14 @@ estimate_node_size_and_time (struct cgra
 
   for (i = 0; vec_safe_iterate (info->size_time_table, i, &e); i++)
     {
-      bool nonconst = e->nonconst_predicate.evaluate (possible_truths);
       bool exec = e->exec_predicate.evaluate (nonspec_possible_truths);
-      gcc_assert (!nonconst || exec);
+
+      /* Because predicates are conservative, it can happen that nonconst is 1
+	 but exec is 0.  */
       if (exec)
         {
+          bool nonconst = e->nonconst_predicate.evaluate (possible_truths);
+
 	  gcc_checking_assert (e->time >= 0);
 	  gcc_checking_assert (time >= 0);
 

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

only message in thread, other threads:[~2017-05-23 12:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-23 12:50 Avoid ICE in fnsummary on complex predicates 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).