diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9b4c512add6..80912c3eb1d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-10-01 Jan Hubicka + + * c-decl.c (c_expand_body): Update call tree_rest_of_compilation. + * cgraphunit.c (cgraph_build_static_cdtor): Likewise. + * toplev.h (tree_rest_of_compilation): Update prototype. + * tree-optimize.c (tree_rest_of_compilation): Kill nested_p argument. + 2004-10-01 Kazu Hirata * tree-cfg.c (cleanup_tree_cfg): Pull a call to diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 3b042591110..c03adf8204c 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,7 @@ +2004-10-01 Jan Hubicka + + * misc.c (gnat_expand_body): Update call of tree_rest_of_compilation. + 2004-09-23 Robert Dewar PR ada/17540 diff --git a/gcc/ada/misc.c b/gcc/ada/misc.c index d1631cdb463..f74626ad4ed 100644 --- a/gcc/ada/misc.c +++ b/gcc/ada/misc.c @@ -649,7 +649,7 @@ gnat_expand_body (tree gnu_decl) if (!DECL_INITIAL (gnu_decl) || DECL_INITIAL (gnu_decl) == error_mark_node) return; - tree_rest_of_compilation (gnu_decl, false); + tree_rest_of_compilation (gnu_decl); } /* Adjusts the RLI used to layout a record after all the fields have been diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 5ef46b0eb8f..7502a07195b 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -6324,7 +6324,7 @@ c_expand_body (tree fndecl) || DECL_INITIAL (fndecl) == error_mark_node) return; - tree_rest_of_compilation (fndecl, false); + tree_rest_of_compilation (fndecl); if (DECL_STATIC_CONSTRUCTOR (fndecl) && targetm.have_ctors_dtors) diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index a5c42b4d16f..5d0a32faad6 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -2923,7 +2923,7 @@ cgraph_build_static_cdtor (char which, tree body, int priority) /* ??? We will get called LATE in the compilation process. */ if (cgraph_global_info_ready) - tree_rest_of_compilation (decl, false); + tree_rest_of_compilation (decl); else cgraph_finalize_function (decl, 0); diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e636b96fda3..d22d49dd15a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2004-10-01 Jan Hubicka + + * semantics.c (expand_body): Update call of tree_rest_of_compilation. + 2004-09-30 Nathan Sidwell * cp-tree.h (struct lang_decl): Shrink by reordering fields and diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index 54abf936528..5bb6f3b4d59 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -2892,7 +2892,7 @@ expand_body (tree fn) generating trees for a function. */ gcc_assert (function_depth == 0); - tree_rest_of_compilation (fn, 0); + tree_rest_of_compilation (fn); current_function_decl = saved_function; diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 5e49f6ca46b..a6c885014d6 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2004-10-01 Jan Hubicka + + * f95-lang.c (gfc_expand_function): Update call of + tree_rest_of_compilation. + * trans-decl.c (gfc_generate_constructors): Likewise. + 2004-09-26 Tobias Schlueter * trans-intrinsic.c: Comment fixes. diff --git a/gcc/fortran/f95-lang.c b/gcc/fortran/f95-lang.c index 8edf5692bb0..dec03e8256d 100644 --- a/gcc/fortran/f95-lang.c +++ b/gcc/fortran/f95-lang.c @@ -196,7 +196,7 @@ tree *ridpointers = NULL; static void gfc_expand_function (tree fndecl) { - tree_rest_of_compilation (fndecl, 0); + tree_rest_of_compilation (fndecl); } diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index cbe36f72c38..e4c8fa45257 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -2353,7 +2353,7 @@ gfc_generate_constructors (void) free_after_parsing (cfun); free_after_compilation (cfun); - tree_rest_of_compilation (fndecl, 0); + tree_rest_of_compilation (fndecl); current_function_decl = NULL_TREE; #endif diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 089c1d272fc..265f5930557 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,7 @@ +2004-10-01 Jan Hubicka + + * java.c (java_expand_body): Update call of tree_rest_of_compilation. + 2004-10-01 Kazu Hirata * lex.c: Fix a comment typo. diff --git a/gcc/java/decl.c b/gcc/java/decl.c index e10c9914869..b0a25dc97b9 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -1970,7 +1970,7 @@ finish_method (tree fndecl) void java_expand_body (tree fndecl) { - tree_rest_of_compilation (fndecl, 0); + tree_rest_of_compilation (fndecl); } /* We pessimistically marked all methods and fields external until we diff --git a/gcc/toplev.h b/gcc/toplev.h index a657036548e..f0dfaa9eae6 100644 --- a/gcc/toplev.h +++ b/gcc/toplev.h @@ -76,7 +76,7 @@ extern void inform (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); extern void rest_of_decl_compilation (tree, int, int); extern void rest_of_type_compilation (tree, int); extern void rest_of_compilation (void); -extern void tree_rest_of_compilation (tree, bool); +extern void tree_rest_of_compilation (tree); extern void init_tree_optimization_passes (void); extern void finish_optimization_passes (void); extern bool enable_rtl_dump_file (int); diff --git a/gcc/tree-optimize.c b/gcc/tree-optimize.c index aa3df9e787c..1d145dcf73b 100644 --- a/gcc/tree-optimize.c +++ b/gcc/tree-optimize.c @@ -565,7 +565,7 @@ update_inlined_to_pointers (struct cgraph_node *node, compilation for FNDECL. */ void -tree_rest_of_compilation (tree fndecl, bool nested_p) +tree_rest_of_compilation (tree fndecl) { location_t saved_loc; struct cgraph_node *saved_node = NULL, *node; @@ -629,11 +629,6 @@ tree_rest_of_compilation (tree fndecl, bool nested_p) if (!vars_to_rename) vars_to_rename = BITMAP_XMALLOC (); - /* If this is a nested function, protect the local variables in the stack - above us from being collected while we're compiling this function. */ - if (nested_p) - ggc_push_context (); - /* Perform all tree transforms and optimizations. */ execute_pass_list (all_passes); @@ -689,7 +684,7 @@ tree_rest_of_compilation (tree fndecl, bool nested_p) } } - if (!nested_p && !flag_inline_trees) + if (!flag_inline_trees) { DECL_SAVED_TREE (fndecl) = NULL; if (DECL_STRUCT_FUNCTION (fndecl) == 0 @@ -708,9 +703,5 @@ tree_rest_of_compilation (tree fndecl, bool nested_p) input_location = saved_loc; ggc_collect (); - - /* Undo the GC context switch. */ - if (nested_p) - ggc_pop_context (); timevar_pop (TV_EXPAND); } diff --git a/gcc/treelang/ChangeLog b/gcc/treelang/ChangeLog index 773a50a5e46..6eb1dfcf553 100644 --- a/gcc/treelang/ChangeLog +++ b/gcc/treelang/ChangeLog @@ -1,3 +1,8 @@ +2004-10-01 Jan Hubicka + + * treetree.c (treeland_expand_function): Update call of + tree_rest_of_compilation. + 2004-09-17 Jeffrey D. Oldham Zack Weinberg diff --git a/gcc/treelang/treetree.c b/gcc/treelang/treetree.c index e0a220fe65d..a81b8b9fa36 100644 --- a/gcc/treelang/treetree.c +++ b/gcc/treelang/treetree.c @@ -1278,7 +1278,7 @@ static void treelang_expand_function (tree fndecl) { /* We have nothing special to do while expanding functions for treelang. */ - tree_rest_of_compilation (fndecl, 0); + tree_rest_of_compilation (fndecl); } #include "debug.h" /* for debug_hooks, needed by gt-treelang-treetree.h */