On Tue, Mar 10, 2015 at 11:53:56AM +0100, Richard Biener wrote:
> 2015-03-09 Richard Biener <[email protected]>
>
> PR middle-end/44563
> * tree-inline.c (copy_cfg_body): Skip block mapped to entry/exit
> for redirect_all_calls.
>
> Index: gcc/tree-inline.c
> ===================================================================
> *** gcc/tree-inline.c (revision 221278)
> --- gcc/tree-inline.c (working copy)
> *************** copy_cfg_body (copy_body_data * id, gcov
> *** 2802,2811 ****
> if (need_debug_cleanup
> && bb->index != ENTRY_BLOCK
> && bb->index != EXIT_BLOCK)
> ! maybe_move_debug_stmts_to_successors (id, (basic_block) bb->aux);
> ! /* Update call edge destinations. This can not be done before loop
> ! info is updated, because we may split basic blocks. */
> ! if (id->transform_call_graph_edges == CB_CGE_DUPLICATE)
> redirect_all_calls (id, (basic_block)bb->aux);
> ((basic_block)bb->aux)->aux = NULL;
> bb->aux = NULL;
> --- 2802,2815 ----
> if (need_debug_cleanup
> && bb->index != ENTRY_BLOCK
> && bb->index != EXIT_BLOCK)
> ! {
> ! maybe_move_debug_stmts_to_successors (id, (basic_block) bb->aux);
> ! /* Update call edge destinations. This can not be done before loop
> ! info is updated, because we may split basic blocks. */
> ! }
> ! if (id->transform_call_graph_edges == CB_CGE_DUPLICATE
> ! && bb->index != ENTRY_BLOCK
> ! && bb->index != EXIT_BLOCK)
That looks weird (artefact from the previous attempt?).
I'd really expect the comment to stay where it was and similarly the
maybe_move_debug_stmts_to_successors call not to be wrapped by {}.
> redirect_all_calls (id, (basic_block)bb->aux);
> ((basic_block)bb->aux)->aux = NULL;
> bb->aux = NULL;
Jakub