public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>
To: jakub@redhat.com
Cc: dnovillo@redhat.com, rth@redhat.com, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix PR tree-optimization/17724
Date: Sat, 09 Oct 2004 09:23:00 -0000	[thread overview]
Message-ID: <20041009090000.GA24787@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <20041009082440.GB22455@atrey.karlin.mff.cuni.cz>

Hello,

> ----- Forwarded message from Diego Novillo <dnovillo@redhat.com> -----
> 
> Date: Fri, 08 Oct 2004 19:28:08 -0400
> From: Diego Novillo <dnovillo@redhat.com>
> To: Jakub Jelinek <jakub@redhat.com>
> Cc: Richard Henderson <rth@redhat.com>,
>         "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
> Subject: Re: [PATCH] Fix PR tree-optimization/17724
> 
> On Thu, 2004-10-07 at 16:04, Jakub Jelinek wrote:
> 
> > The third one recomputes dominators (and post-dominators) of neighbours
> > of unreachable basic blocks after they are deleted by
> > delete_unreachable_blocks.
> > 
> I like this one.  It looks OK and safe, so let's go with it.
> 
> 
> Thanks.  Diego.
>
> ----- End forwarded message -----

this does not seem to be the right fix to me:

1) Change to delete_unreachable_blocks is not necessary.  As long as
   dominators are set correctly before delete_unreachable_blocks,
   they are also set correctly after it (since removal of unreachable
   blocks cannot affect any path from entry to basic block bb, and
   immediate dominator is determined from exactly these paths).

2) Change in tree_purge_dead_eh_edges also is not OK.
   tree_purge_dead_eh_edges may remove basically arbitrary edge.
   After removal of the edge, just locally updating the dominators
   of the destination of the edge is not sufficient, since also
   immediate dominators of other blocks may get changed.

3) The attempts to update postdominators are just wasted time, since
   we do not try to update those anywhere else (making updating of
   postdominators work would require changes on many more places,
   and so far it is not needed anywhere).

So the real problem for the bug is that tree_purge_dead_eh_edges
breaks the information about dominators irrepairably (at least in the
current state; it would be of course possible to write code to update
dominators after edge removal incrementally, but it would be relatively
complicated and I am not entirely sure it would pay up in the compile
time).  The right fix is simply to call free_dominance_info in
tree_purge_dead_eh_edges when the edge is removed.

Zdenek

       reply	other threads:[~2004-10-09  9:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20041009082440.GB22455@atrey.karlin.mff.cuni.cz>
2004-10-09  9:23 ` Zdenek Dvorak [this message]
2004-10-10 15:20   ` [PATCH] Fix PR tree-optimization/17724 (take 2) Jakub Jelinek
2004-10-12 17:59     ` Diego Novillo
2004-10-15 19:24     ` Zdenek Dvorak
2004-10-07 20:13 [PATCH] Fix PR tree-optimization/17724 Jakub Jelinek
2004-10-07 22:16 ` Kazu Hirata
2004-10-08  7:05   ` Jakub Jelinek
2004-10-08 19:32     ` Jeffrey A Law
2004-10-08 20:25       ` Andrew Pinski
2004-10-08 23:48 ` Diego Novillo
2004-10-09  8:24   ` Zdenek Dvorak
  -- strict thread matches above, loose matches on Subject: below --
2004-09-30  1:05 Jakub Jelinek

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=20041009090000.GA24787@atrey.karlin.mff.cuni.cz \
    --to=rakdver@atrey.karlin.mff.cuni.cz \
    --cc=dnovillo@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=rth@redhat.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).