aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Weinberg <zack@codesourcery.com>2001-09-05 17:48:26 +0000
committerZack Weinberg <zack@codesourcery.com>2001-09-05 17:48:26 +0000
commitaa872650e944c0b8429d4725fe7d47954e2835e5 (patch)
tree97c534b8bbefaf5aa35ed9ba21f1d2ca66906f42
parentb90cf708b71456f74fa86410b9d8a46ef440943d (diff)
* function.c (ggc_mark_struct_function): Mark f->outer.
* toplev.c (rest_of_compilation): Clear DECL_SAVED_INSNS here... * integrate.c (output_inline_function): ... not here. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@45419 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/function.c2
-rw-r--r--gcc/integrate.c8
-rw-r--r--gcc/toplev.c8
4 files changed, 18 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 27717bbfd23..259a22a7ef0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2001-09-05 Zack Weinberg <zack@codesourcery.com>
+
+ * function.c (ggc_mark_struct_function): Mark f->outer.
+ * toplev.c (rest_of_compilation): Clear DECL_SAVED_INSNS here...
+ * integrate.c (output_inline_function): ... not here.
+
Wed Sep 5 17:28:49 CEST 2001 Jan Hubicka <jh@suse.cz>
* profile.c (branch_prob): Call add_noreturn_fake_exit_edges.
diff --git a/gcc/function.c b/gcc/function.c
index ae19e07a0a7..f2beb9f4373 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -7706,6 +7706,8 @@ ggc_mark_struct_function (f)
ggc_mark_rtvec ((rtvec) f->original_arg_vector);
if (f->original_decl_initial)
ggc_mark_tree (f->original_decl_initial);
+ if (f->outer)
+ ggc_mark_struct_function (f->outer);
}
/* Called once, at initialization, to initialize function.c. */
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 232f5fe40de..cdf368e8215 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -2899,13 +2899,11 @@ output_inline_function (fndecl)
before it gets mangled by optimization. */
(*debug_hooks->outlining_inline_function) (fndecl);
- /* Compile this function all the way down to assembly code. */
+ /* Compile this function all the way down to assembly code. As a
+ side effect this destroys the saved RTL representation, but
+ that's okay, because we don't need to inline this anymore. */
rest_of_compilation (fndecl);
-
- /* We can't inline this anymore; rest_of_compilation destroyed the
- data structures describing the function. */
DECL_INLINE (fndecl) = 0;
- DECL_SAVED_INSNS (fndecl) = 0;
cfun = old_cfun;
current_function_decl = old_cfun ? old_cfun->decl : 0;
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 50699e6295b..f9f02f3f937 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -3773,7 +3773,13 @@ rest_of_compilation (decl)
/* We're done with this function. Free up memory if we can. */
free_after_parsing (cfun);
if (! DECL_DEFER_OUTPUT (decl))
- free_after_compilation (cfun);
+ {
+ free_after_compilation (cfun);
+
+ /* Clear integrate.c's pointer to the cfun structure we just
+ destroyed. */
+ DECL_SAVED_INSNS (decl) = 0;
+ }
cfun = 0;
ggc_collect ();