diff options
author | Richard Henderson <rth@redhat.com> | 2003-08-29 15:44:05 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2003-08-29 15:44:05 -0700 |
commit | d560a41c5c43524d82795ac4421eab2df6764e30 (patch) | |
tree | b8bd1c0f20314f33063c82cf2cf403d0630408e5 /gcc/toplev.c | |
parent | 3a70d621853e616201bac254b8e3900b63b6fcf4 (diff) | |
download | gcc-d560a41c5c43524d82795ac4421eab2df6764e30.zip gcc-d560a41c5c43524d82795ac4421eab2df6764e30.tar.gz gcc-d560a41c5c43524d82795ac4421eab2df6764e30.tar.bz2 |
function.h (struct function): Add rtl_inline_init, saved_for_inline.
* function.h (struct function): Add rtl_inline_init, saved_for_inline.
* integrate.c (save_for_inline): Set saved_for_inline.
* c-semantics.c (genrtl_scope_stmt): Check it.
* toplev.c (wrapup_global_declarations): Check it.
(rest_of_handle_inlining): Set and check rtl_inline_init.
(rest_of_compilation): Remove out of date comment.
From-SVN: r70931
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 418fa35..3e639c6 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1588,6 +1588,7 @@ wrapup_global_declarations (tree *vec, int len) if (TREE_CODE (decl) == FUNCTION_DECL && DECL_INITIAL (decl) != 0 && DECL_SAVED_INSNS (decl) != 0 + && DECL_SAVED_INSNS (decl)->saved_for_inline && (flag_keep_inline_functions || (TREE_PUBLIC (decl) && !DECL_COMDAT (decl)) || TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))) @@ -2464,8 +2465,9 @@ rest_of_handle_inlining (tree decl) /* If we are reconsidering an inline function at the end of compilation, skip the stuff for making it inline. */ - if (DECL_SAVED_INSNS (decl) != 0) + if (cfun->rtl_inline_init) return 0; + cfun->rtl_inline_init = 1; /* If this is nested inside an inlined external function, pretend it was only declared. Since we cannot inline such functions, @@ -2522,7 +2524,7 @@ rest_of_handle_inlining (tree decl) if (open_dump_file (DFI_rtl, decl)) { - if (DECL_SAVED_INSNS (decl)) + if (DECL_SAVED_INSNS (decl) && DECL_SAVED_INSNS (decl)->saved_for_inline) fprintf (rtl_dump_file, ";; (integrable)\n\n"); close_dump_file (DFI_rtl, print_rtl, insns); } @@ -3553,9 +3555,6 @@ rest_of_compilation (tree decl) if (! DECL_DEFER_OUTPUT (decl)) { free_after_compilation (cfun); - - /* Clear integrate.c's pointer to the cfun structure we just - destroyed. */ DECL_SAVED_INSNS (decl) = 0; } cfun = 0; |