This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Do not destroy dominance info during loop recognition
- 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: Thu, 29 Jul 2004 09:14:30 -0600
- Subject: Re: [patch] Do not destroy dominance info during loop recognition
- Organization: Red Hat, Inc
- References: <20040729130245.GA21033@atrey.karlin.mff.cuni.cz>
- Reply-to: law at redhat dot com
On Thu, 2004-07-29 at 07:02, Zdenek Dvorak wrote:
> Hello,
>
> as noticed by Steven, the dominance information is destroyed and
> recomputed during recognition of loops, from purely historical reasons.
> This patch makes the dominance information to be updated instead.
>
> The patch uncovered a latent bug in iterate_fix_dominators --
> iterate_fix_dominators used to return wrong results in some cases,
> because the old values of the immediate dominators were not cleaned
> up, and the dataflow did not necessarily have to converge to the
> right solution (only some conservative approximation of it).
> This problem also caused PR 16690 on lno branch. It is fixed in
> an obvious way -- by cleaning up the old information.
>
> Bootstrapped (with -funroll-loops -funswitch-loops to increase testing
> coverage) & regtested on i686.
>
> Zdenek
>
> * cfgloop.c (update_latch_info): Update dominator of the new block.
> (canonicalize_loop_headers, flow_loops_find): Do not free dominance
> info.
> * dominance.c (verify_dominators): Check that the dominance tree is
> connected.
> (recount_dominator): Ignore unreachable blocks.
> (iterate_fix_dominators): Cleanup old dominance information before
> recomputing it.
This is fine. Please install.
Thanks,
Jeff