This is the mail archive of the
mailing list for the GCC project.
Re: Preliminary patch for PR23820 and PR24309
- From: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: Sebastian Pop <sebpop at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 14 Oct 2007 03:47:42 +0200
- Subject: Re: Preliminary patch for PR23820 and PR24309
- References: <firstname.lastname@example.org>
> On 10/13/07, Richard Guenther <email@example.com> wrote:
> > On 10/13/07, Sebastian Pop <firstname.lastname@example.org> wrote:
> > > On 10/13/07, Richard Guenther <email@example.com> wrote:
> > > > Huh? That patch should make zero difference.
> > > >
> > >
> > > However, it does. I double checked that without that patch ltrans-3
> > > fails, and with the patch it passes. Another sequence that works for
> > > ltrans-3 is duplicating DCE before VRP.
> > I checked as well and the dumps after these both passes are the same.
> > Also both passes are before loop-header copying. The difference it
> > seems to make is that DCE removes a forwarder block which it doesn't
> > do if it runs after VRP. For some reason.
> Nope. VRP inserts loop preheaders. So, does
> Index: tree-vrp.c
> --- tree-vrp.c (revision 129282)
> +++ tree-vrp.c (working copy)
> @@ -6089,7 +6089,7 @@ vrp_finalize (void)
> static unsigned int
> execute_vrp (void)
> - loop_optimizer_init (LOOPS_NORMAL | LOOPS_HAVE_RECORDED_EXITS);
> + loop_optimizer_init (AVOID_CFG_MODIFICATIONS);
> rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa);
> scev_initialize ();
> fix it as well?
this change should cause ICEs, as we assume that loops have
just a single latch edge (and recorded exits) in scev code.