This improves PR44563 a lot by not walking the block before/after
the call being inlined for redirect_all_calls - that block will
have up to 100000 (unrelated) calls.

Bootstrapped on x86_64-unknown-linux-gnu, regtest in progress.

Will apply to trunk after that succeeded.

Thanks,
Richard.

2015-03-09  Richard Biener  <rguent...@suse.de>

        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)
          redirect_all_calls (id, (basic_block)bb->aux);
        ((basic_block)bb->aux)->aux = NULL;
        bb->aux = NULL;

Reply via email to