diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-03 14:57:29 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-09-03 14:57:29 +0000 |
commit | 2ff66ee0a9e17479730d8bc5f01d07236d380fd5 (patch) | |
tree | 43fdb3d7f0644c079f62da1e10f12ecddb5b3649 /gcc/c-objc-common.c | |
parent | 1d8ef9c845f44b9e4ea4f2dfdb3d6c35cb36da9f (diff) | |
download | ppe42-gcc-2ff66ee0a9e17479730d8bc5f01d07236d380fd5.tar.gz ppe42-gcc-2ff66ee0a9e17479730d8bc5f01d07236d380fd5.zip |
* Makefile.in (c-objc-common.o): Kill gt-c-objc-common.h dependency.
* c-decl.c (finish_function): Kill arguments, always use cgraph path.
* c-objc-common.c: Kill include of gt-c-objc-common.h
(expand_deferred_fns, deffer_fn): Kill function.
(deferred_fns): Kill variable.
(finish_cdtor): Update finish_function call.
(c_objc_common_finish_file): Always call cgraph code.
* c-parse.c: Regenerate.
* c-parse.y: Regenerate.
* c-tree.h (finish_function): Update prototype.
* objc-acct.c (build_module_descriptor, finish_method_def):
Update call of finish_function.
* cgraphunit.c (cgraph_default_inline_p, cgraph_analyze_function): Add
forward prototype.
(cgraph_finalize_function): In non-unit-at-a-time mode analyze the
function and assemble it if needed.
(cgraph_finalize_compilation_unit): Do nothing in non-unit-at-a-time
mode.
(cgraph_optimize): Likewise.
(cgraph_expand_function): In non-unit-at-a-time mode keep function body
even when it has no inline callees.
* c-parse.in: Update calls to finish_function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71028 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-objc-common.c')
-rw-r--r-- | gcc/c-objc-common.c | 76 |
1 files changed, 3 insertions, 73 deletions
diff --git a/gcc/c-objc-common.c b/gcc/c-objc-common.c index 16e0cffec32..96d6855f303 100644 --- a/gcc/c-objc-common.c +++ b/gcc/c-objc-common.c @@ -41,12 +41,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA static bool c_tree_printer (pretty_printer *, text_info *); static tree inline_forbidden_p (tree *, int *, void *); -static void expand_deferred_fns (void); static tree start_cdtor (int); static void finish_cdtor (tree); -static GTY(()) varray_type deferred_fns; - int c_missing_noreturn_ok_p (tree decl) { @@ -267,69 +264,9 @@ c_objc_common_init (void) mesg_implicit_function_declaration = 0; } - VARRAY_TREE_INIT (deferred_fns, 32, "deferred_fns"); - return true; } -/* Register a function tree, so that its optimization and conversion - to RTL is only done at the end of the compilation. */ - -int -defer_fn (tree fn) -{ - VARRAY_PUSH_TREE (deferred_fns, fn); - - return 1; -} - -/* Expand deferred functions for C and ObjC. */ - -static void -expand_deferred_fns (void) -{ - unsigned int i; - bool reconsider; - - do - { - reconsider = false; - for (i = 0; i < VARRAY_ACTIVE_SIZE (deferred_fns); i++) - { - tree decl = VARRAY_TREE (deferred_fns, i); - - if (TREE_ASM_WRITTEN (decl)) - continue; - - /* "extern inline" says the symbol exists externally, - which means we should *never* expand it locally - unless we're actually inlining it. */ - /* ??? Why did we queue these in the first place? */ - if (DECL_DECLARED_INLINE_P (decl) && DECL_EXTERNAL (decl)) - continue; - - /* With flag_keep_inline_functions, we're emitting everything, - so we never need to reconsider. */ - if (flag_keep_inline_functions) - ; - /* Must emit all public functions. C doesn't have COMDAT - functions, so we don't need to check that, like C++. */ - else if (TREE_PUBLIC (decl)) - reconsider = true; - /* Must emit if the symbol is referenced. */ - else if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))) - reconsider = true; - else - continue; - - c_expand_deferred_function (decl); - } - } - while (reconsider); - - deferred_fns = 0; -} - static tree start_cdtor (int method_type) { @@ -369,7 +306,7 @@ finish_cdtor (tree body) RECHAIN_STMTS (body, COMPOUND_BODY (body)); - finish_function (0, 0); + finish_function (); } /* Called at end of parsing, but before end-of-file processing. */ @@ -384,13 +321,8 @@ c_objc_common_finish_file (void) them based on linkage rules. */ merge_translation_unit_decls (); - if (flag_unit_at_a_time) - { - cgraph_finalize_compilation_unit (); - cgraph_optimize (); - } - else - expand_deferred_fns (); + cgraph_finalize_compilation_unit (); + cgraph_optimize (); if (static_ctors) { @@ -468,5 +400,3 @@ c_tree_printer (pretty_printer *pp, text_info *text) return false; } } - -#include "gt-c-objc-common.h" |