This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Correct the initialization of an edge flag
On Mon, Apr 14, 2003 at 09:24:19AM +0200, Jan Hubicka wrote:
>
> Can you give me example for what it is usefull?
>
Your're right, at tree level EDGE_FALLTHRU is not used.
I'm bootstrapping the following patch:
* tree-ssa-dce.c (remove_conditional): Don't use EDGE_FALLTHRU.
* tree-cfg.c (make_edges, make_exit_edges,
bsi_commit_first_edge_insert): Idem.
Index: tree-ssa-dce.c
===================================================================
RCS file: /home/pop/cvsroot/gcc-cvs/gcc/gcc/Attic/tree-ssa-dce.c,v
retrieving revision 1.1.2.32
diff -u -3 -p -c -r1.1.2.32 tree-ssa-dce.c
*** tree-ssa-dce.c 7 Apr 2003 01:07:57 -0000 1.1.2.32
--- tree-ssa-dce.c 14 Apr 2003 09:03:30 -0000
*************** remove_conditional (basic_block bb)
*** 671,675 ****
/* Add an edge to BB's post dominator. Add PHI arguments to every PHI
node at PDOM_BB from the list of arguments computed above.. */
if (bb->succ == NULL)
! ssa_make_edge (bb, pdom_bb, EDGE_FALLTHRU, phi_arg_list);
}
--- 671,675 ----
/* Add an edge to BB's post dominator. Add PHI arguments to every PHI
node at PDOM_BB from the list of arguments computed above.. */
if (bb->succ == NULL)
! ssa_make_edge (bb, pdom_bb, 0, phi_arg_list);
}
Index: tree-cfg.c
===================================================================
RCS file: /home/pop/cvsroot/gcc-cvs/gcc/gcc/Attic/tree-cfg.c,v
retrieving revision 1.1.4.71
diff -u -3 -p -c -r1.1.4.71 tree-cfg.c
*** tree-cfg.c 9 Apr 2003 19:27:40 -0000 1.1.4.71
--- tree-cfg.c 14 Apr 2003 09:07:01 -0000
*************** make_edges ()
*** 656,662 ****
/* Create an edge from entry to the first block with executable
statements in it. */
! make_edge (ENTRY_BLOCK_PTR, BASIC_BLOCK (0), EDGE_FALLTHRU);
/* Traverse basic block array placing edges. */
FOR_EACH_BB (bb)
--- 656,662 ----
/* Create an edge from entry to the first block with executable
statements in it. */
! make_edge (ENTRY_BLOCK_PTR, BASIC_BLOCK (0), 0);
/* Traverse basic block array placing edges. */
FOR_EACH_BB (bb)
*************** make_edges ()
*** 684,690 ****
/* Finally, if no edges were created above, this is a regular
basic block that only needs a fallthru edge. */
if (bb->succ == NULL)
! make_edge (bb, successor_block (bb), EDGE_FALLTHRU);
}
/* Clean up the graph and warn for unreachable code. */
--- 684,690 ----
/* Finally, if no edges were created above, this is a regular
basic block that only needs a fallthru edge. */
if (bb->succ == NULL)
! make_edge (bb, successor_block (bb), 0);
}
/* Clean up the graph and warn for unreachable code. */
*************** make_exit_edges (bb)
*** 763,769 ****
else if (FUNCTION_RECEIVES_NONLOCAL_GOTO (current_function_decl))
{
make_goto_expr_edges (bb);
! make_edge (bb, successor_block (bb), EDGE_FALLTHRU);
}
break;
--- 763,769 ----
else if (FUNCTION_RECEIVES_NONLOCAL_GOTO (current_function_decl))
{
make_goto_expr_edges (bb);
! make_edge (bb, successor_block (bb), 0);
}
break;
*************** make_exit_edges (bb)
*** 779,785 ****
&& FUNCTION_RECEIVES_NONLOCAL_GOTO (current_function_decl))
{
make_goto_expr_edges (bb);
! make_edge (bb, successor_block (bb), EDGE_FALLTHRU);
}
break;
--- 779,785 ----
&& FUNCTION_RECEIVES_NONLOCAL_GOTO (current_function_decl))
{
make_goto_expr_edges (bb);
! make_edge (bb, successor_block (bb), 0);
}
break;
*************** bsi_commit_first_edge_insert (e, stmt)
*** 2997,3003 ****
new_bb = create_bb ();
redirect_edge_succ (e, new_bb);
! make_edge (new_bb, dest, EDGE_FALLTHRU);
bb_ann = (bb_ann_t) xmalloc (sizeof (struct bb_ann_d));
new_bb->aux = bb_ann;
--- 2997,3003 ----
new_bb = create_bb ();
redirect_edge_succ (e, new_bb);
! make_edge (new_bb, dest, 0);
bb_ann = (bb_ann_t) xmalloc (sizeof (struct bb_ann_d));
new_bb->aux = bb_ann;