Patchwork Mark back edges in insert_backedge_copies

login
register
mail settings
Submitter William J. Schmidt
Date Nov. 17, 2011, 9:55 p.m.
Message ID <1321566913.8437.7.camel@gnopaine>
Download mbox | patch
Permalink /patch/126323/
State New
Headers show

Comments

William J. Schmidt - Nov. 17, 2011, 9:55 p.m.
Greetings,

While investigating http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39976, I
found that tree-outof-ssa.c:insert_backedge_copies tests whether edges
are back edges, but the back edges haven't been marked to facilitate
this.  (This was the reason the failures started happening in r149206,
although fixing it doesn't take care of the problem in the current trunk
revision because of the duplicate PHIs noted in the issue.)

This simple patch updates the back edge information where it's needed.
Bootstrapped and regression tested on powerpc64-linux.  OK for trunk?

Thanks,
Bill


2011-11-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* tree-outof-ssa.c (insert_back_edge_copies):  Add call to
	mark_dfs_back_edges.
Richard Guenther - Nov. 18, 2011, 9:37 a.m.
On Thu, Nov 17, 2011 at 10:55 PM, William J. Schmidt
<wschmidt@linux.vnet.ibm.com> wrote:
> Greetings,
>
> While investigating http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39976, I
> found that tree-outof-ssa.c:insert_backedge_copies tests whether edges
> are back edges, but the back edges haven't been marked to facilitate
> this.  (This was the reason the failures started happening in r149206,
> although fixing it doesn't take care of the problem in the current trunk
> revision because of the duplicate PHIs noted in the issue.)
>
> This simple patch updates the back edge information where it's needed.
> Bootstrapped and regression tested on powerpc64-linux.  OK for trunk?

Ok.

Thanks,
Richard.

> Thanks,
> Bill
>
>
> 2011-11-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
>
>        * tree-outof-ssa.c (insert_back_edge_copies):  Add call to
>        mark_dfs_back_edges.
>
>
>
> Index: gcc/tree-outof-ssa.c
> ===================================================================
> --- gcc/tree-outof-ssa.c        (revision 181442)
> +++ gcc/tree-outof-ssa.c        (working copy)
> @@ -1021,6 +1021,8 @@ insert_backedge_copies (void)
>   basic_block bb;
>   gimple_stmt_iterator gsi;
>
> +  mark_dfs_back_edges ();
> +
>   FOR_EACH_BB (bb)
>     {
>       /* Mark block as possibly needing calculation of UIDs.  */
>
>
>

Patch

Index: gcc/tree-outof-ssa.c
===================================================================
--- gcc/tree-outof-ssa.c	(revision 181442)
+++ gcc/tree-outof-ssa.c	(working copy)
@@ -1021,6 +1021,8 @@  insert_backedge_copies (void)
   basic_block bb;
   gimple_stmt_iterator gsi;
 
+  mark_dfs_back_edges ();
+
   FOR_EACH_BB (bb)
     {
       /* Mark block as possibly needing calculation of UIDs.  */