This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix updating of dominators in thread_jumps
- From: Jeffrey A Law <law at redhat dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, stevenb at suse dot de
- Date: Mon, 13 Sep 2004 13:04:42 -0600
- Subject: Re: [patch] Fix updating of dominators in thread_jumps
- Organization: Red Hat, Inc
- References: <20040912172219.GA29949@atrey.karlin.mff.cuni.cz>
- Reply-to: law at redhat dot com
On Sun, 2004-09-12 at 11:22, Zdenek Dvorak wrote:
> Hello,
>
> updating of dominators in jump threading handles incorrectly the
> case when source of threaded edge is dominated by its destination.
> In case
>
> S --> A
> |
> v
> B
>
> when edge S-->A is forwarded over the edge A-->B and A is immediate
> dominator of B, we are setting idom(B) := idom(A). This however
> is incorrect in case that S is dominated by B, as then B is still
> dominated by A after redirection.
>
> The patch fixes this problem.
>
> Bootstrapped & regtested on i686.
>
> Zdenek
>
> * tree-cfg.c (thread_jumps): Update dominators correctly in
> case destination of threaded edge dominates its source.
This is fine. Please install this patch along with any testcase
you've got for the problem.
Thanks,
Jeff