[PATCH] Mark back edges in insert_backedge_copies

William J. Schmidt wschmidt@linux.vnet.ibm.com
Thu Nov 17 23:53:00 GMT 2011


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.



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




More information about the Gcc-patches mailing list