This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Mark back edges in insert_backedge_copies
- From: "William J. Schmidt" <wschmidt at linux dot vnet dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: bergner at vnet dot ibm dot com
- Date: Thu, 17 Nov 2011 15:55:13 -0600
- Subject: [PATCH] Mark back edges in insert_backedge_copies
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. */