This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix CDDCE miscompilation (PR tree-optimization/55018)
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: stevenb dot gcc at gmail dot com
- Cc: jakub at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Thu, 1 Nov 2012 21:26:25 +0100
- Subject: Re: [PATCH] Fix CDDCE miscompilation (PR tree-optimization/55018)
> From: Steven Bosscher <stevenb.gcc@gmail.com>
> Date: Sun, 28 Oct 2012 19:33:29 +0100
> On Mon, Oct 22, 2012 at 11:09 PM, Jakub Jelinek wrote:
> > On Mon, Oct 22, 2012 at 10:51:43PM +0200, Steven Bosscher wrote:
> > Wouldn't it be way cheaper to just export dfs_find_deadend from cfganal.c
> > and call it in calc_dfs_tree on each unconnected bb?
> > I.e. (untested with the exception of the testcase):
> >
> > 2012-10-22 Jakub Jelinek <jakub@redhat.com>
> >
> > PR tree-optimization/55018
> > * cfganal.c (dfs_find_deadend): No longer static.
> > * basic-block.h (dfs_find_deadend): New prototype.
> > * dominance.c (calc_dfs_tree): If saw_unconnected,
> > traverse from dfs_find_deadend of unconnected b
> > instead of b directly.
> >
> > * gcc.dg/torture/pr55018.c: New test.
> Attached patch was bootstrapped&tested on
gcc/
PR tree-optimization/55018
* basic-block.h (dfs_find_deadend): New prototype.
* cfganal.c (dfs_find_deadend): No longer static. Use bitmap
instead of sbitmap for visited.
(flow_dfs_compute_reverse_execute): Use dfs_find_deadend here, too.
* dominance.c (calc_dfs_tree): If saw_unconnected,
traverse from dfs_find_deadend of unconnected b
instead of b directly.
It seems this caused PR55168, ICE.
brgds, H-P