This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[tree-ssa] Fix bug in bsi_insert_on_edge.
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: 06 Oct 2003 10:35:44 -0400
- Subject: [tree-ssa] Fix bug in bsi_insert_on_edge.
When splitting an edge, we weren't marking the new edge as a fallthru
edge. This was causing PRE to blow up since we'd create something like:
if (a_18 != 0)
{
# BLOCK 21. PRED: 8. SUCC: 9.
pretmp.12_32 = T.1_4 >> 2;
# BLOCK 9. PRED: 21 18. SUCC: 11 10.
<U3488>:;;
and the edge from 8 to 9 wouldn't be marked as FALLTHRU.
Commited.
Andrew
* tree-cfg.c (tree_split_edge): Mark edge as FALLTHRU when splitting.
Index: tree-cfg.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-cfg.c,v
retrieving revision 1.1.4.172
diff -c -p -r1.1.4.172 tree-cfg.c
*** tree-cfg.c 26 Sep 2003 13:08:48 -0000 1.1.4.172
--- tree-cfg.c 6 Oct 2003 14:26:47 -0000
*************** tree_split_edge (edge edge_in)
*** 4543,4549 ****
new_bb = create_bb ();
create_block_annotation (new_bb);
redirect_edge_succ (edge_in, new_bb);
! new_edge = make_edge (new_bb, dest, 0);
/* Find all the PHI arguments on the original edge, and change them to
the new edge. */
--- 4543,4549 ----
new_bb = create_bb ();
create_block_annotation (new_bb);
redirect_edge_succ (edge_in, new_bb);
! new_edge = make_edge (new_bb, dest, EDGE_FALLTHRU);
/* Find all the PHI arguments on the original edge, and change them to
the new edge. */