Mark back edges in insert_backedge_copies

Submitted by William J. Schmidt on Nov. 17, 2011, 9:55 p.m.

Details

Message ID 1321566913.8437.7.camel@gnopaine
State New
Headers show

Commit Message

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.

Comments

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 hide | download patch | download mbox

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.  */