re PR ipa/44563 (GCC uses a lot of RAM when compiling a large numbers of functions)
authorRichard Biener <rguenther@suse.de>
Tue, 10 Mar 2015 12:44:01 +0000 (12:44 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 10 Mar 2015 12:44:01 +0000 (12:44 +0000)
2015-03-09  Richard Biener  <rguenther@suse.de>

PR middle-end/44563
* tree-inline.c (copy_cfg_body): Skip block mapped to entry/exit
for redirect_all_calls.

From-SVN: r221321

gcc/ChangeLog
gcc/tree-inline.c

index ddd430ba03c0ae294011982e4de17d5b15fa5419..f2e949bfd6d40864cb47c0cd6ea8028970fc6c07 100644 (file)
@@ -1,3 +1,9 @@
+2015-03-10  Richard Biener  <rguenther@suse.de>
+
+       PR middle-end/44563
+       * tree-inline.c (copy_cfg_body): Skip block mapped to entry/exit
+       for redirect_all_calls.
+
 2015-03-10  Marek Polacek  <polacek@redhat.com>
 
        * gdbinit.in (pcfun): Define and document.
index d8abe03e40db8d8ff0f4cb27c81d83d47dd4eb80..259a3488c3475ffcbb9dce5b82c03b7b4b10a2de 100644 (file)
@@ -2805,7 +2805,9 @@ copy_cfg_body (copy_body_data * id, gcov_type count, int frequency_scale,
          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)
+       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;