public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <hubicka@ucw.cz>
To: Eric Botcazou <ebotcazou@adacore.com>
Cc: Jan Hubicka <hubicka@ucw.cz>,
	gcc-patches@gcc.gnu.org,	"H.J. Lu" <hjl.tools@gmail.com>,
	Richard Biener <richard.guenther@gmail.com>,
	Arnaud Charlet <charlet@adacore.com>
Subject: Re: Fix lto-symtab ICE during Ada LTO bootstrap
Date: Mon, 21 Dec 2015 14:19:00 -0000	[thread overview]
Message-ID: <20151221141944.GB10803@kam.mff.cuni.cz> (raw)
In-Reply-To: <3448714.nhJ8om10cS@polaris>

Hi,
the change in my patch was intentional, I forgot to send the email. Sorry for that.
The reason is that labels/predictions/debug statements now go specially though DCE
and are marked as neecessary, but not really handled so (i.e. we can remove conditional
controlling only debug statements).
This can cause an infinite loop.
> > It's apparently another bug in the DCE pass.  
> 
> But it comes from a stalled ABNORMAL flag after the FRE3 pass so:

I suppose the CFG verifier should also catch this.  I wonder how this can lead
to wrong code as opossed to infinite loop?
I can imagine DCE being confused about non-control-flow stmt and conclude the
abnormal path as the path leaving the loop.  I will look into the testcase more.

Thanks for working this out!
Honza
> 
> Index: tree-ssa-pre.c
> ===================================================================
> --- tree-ssa-pre.c	(revision 231856)
> +++ tree-ssa-pre.c	(working copy)
> @@ -4128,6 +4128,14 @@ eliminate_dom_walker::before_dom_childre
>  		      print_gimple_stmt (dump_file, stmt, 0, 0);
>  		    }
>  
> +		  if (is_gimple_call (stmt)
> +		      && stmt_can_make_abnormal_goto (stmt))
> +		    {
> +		      bitmap_set_bit (need_ab_cleanup, gimple_bb (stmt)-
> >index);
> +		      if (dump_file && (dump_flags & TDF_DETAILS))
> +			fprintf (dump_file, "  Removed AB side-effects.\n");
> +		    }
> +
>  		  pre_stats.eliminations++;
>  		  continue;
>  		}
> 
> is apparently sufficient.  Testing...
> 
> -- 
> Eric Botcazou

  reply	other threads:[~2015-12-21 14:19 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-21 18:35 Jan Hubicka
2015-11-22 14:46 ` Eric Botcazou
2015-11-22 15:17   ` Arnaud Charlet
2015-11-23  1:24     ` Jan Hubicka
2015-11-23  9:59       ` Arnaud Charlet
2015-11-23 11:13         ` Eric Botcazou
2015-11-23 11:24           ` Arnaud Charlet
2015-11-23 12:00             ` Eric Botcazou
2015-11-23 13:35               ` Richard Biener
2015-11-23 16:05                 ` Eric Botcazou
2015-11-23 16:17                   ` H.J. Lu
2015-11-23 16:26                     ` Eric Botcazou
2015-11-23 16:31                       ` Arnaud Charlet
2015-11-23 19:05                       ` Jan Hubicka
2015-11-23 22:29                         ` Eric Botcazou
2015-11-23 22:53                           ` Jan Hubicka
2015-11-23 23:09                             ` Jan Hubicka
2015-12-20  6:54                         ` Jan Hubicka
2015-12-20  8:14                           ` Eric Botcazou
2015-12-20 22:20                         ` Eric Botcazou
2015-12-21 10:20                           ` Eric Botcazou
2015-12-21 14:19                             ` Jan Hubicka [this message]
2015-12-21 15:16                               ` Eric Botcazou
2015-12-21 14:20                             ` Jan Hubicka
2015-11-22 18:49   ` Jan Hubicka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151221141944.GB10803@kam.mff.cuni.cz \
    --to=hubicka@ucw.cz \
    --cc=charlet@adacore.com \
    --cc=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=richard.guenther@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).