function.h (struct function): Remove cannot_inline field.

gcc/ChangeLog:
2004-06-15  Paolo Bonzini  <bonzini@gnu.org>

	* function.h (struct function): Remove cannot_inline field.
	(current_function_cannot_inline): Remove.
	* passes.c (rest_of_compilation): Reset DECL_DEFER_OUTPUT.
	Simplify conditionals to ignore warn_return_type.
	* tree-optimize.c (tree_rest_of_compilation): Do not reset
	DECL_DEFER_OUTPUT.
	* objc/objc-act.c (build_module_descriptor, finish_method_def):
	Do not set current_function_cannot_inline.

gcc/java/ChangeLog:
2004-06-15  Paolo Bonzini  <bonzini@gnu.org>

	* class.c (emit_register_classes): Make the function uninlinable,
	do not set current_function_cannot_inline.
	* resource.c (write_resource_constructor): Do not reset
	flag_inline_functions around rest_of_compilation.

gcc/cp/ChangeLog:
2004-06-15  Paolo Bonzini  <bonzini@gnu.org>

	* cp-tree.h (struct language_function): Remove cannot_inline.
	* decl.c (save_function_data): cannot_inline is no more.
	(cxx_push_function_context): Likewise.
	* decl2.c (start_objects, start_static_storage_duration_function):
	Reset DECL_INLINE, set DECL_UNINLINABLE.

From-SVN: r83181
This commit is contained in:
Paolo Bonzini 2004-06-15 12:46:07 +00:00 committed by Paolo Bonzini
parent 8cff2a9522
commit 096f22f424
12 changed files with 43 additions and 57 deletions

View file

@ -1,3 +1,14 @@
2004-06-15 Paolo Bonzini <bonzini@gnu.org>
* function.h (struct function): Remove cannot_inline field.
(current_function_cannot_inline): Remove.
* passes.c (rest_of_compilation): Reset DECL_DEFER_OUTPUT.
Simplify conditionals to ignore warn_return_type.
* tree-optimize.c (tree_rest_of_compilation): Do not reset
DECL_DEFER_OUTPUT.
* objc/objc-act.c (build_module_descriptor, finish_method_def):
Do not set current_function_cannot_inline.
2004-06-15 J"orn Rennecke <joern.rennecke@superh.com>
* cfglayout.c (fixup_reorder_chain): Handle case where the

View file

@ -1,3 +1,11 @@
2004-06-15 Paolo Bonzini <bonzini@gnu.org>
* cp-tree.h (struct language_function): Remove cannot_inline.
* decl.c (save_function_data): cannot_inline is no more.
(cxx_push_function_context): Likewise.
* decl2.c (start_objects, start_static_storage_duration_function):
Reset DECL_INLINE, set DECL_UNINLINABLE.
2004-06-14 Giovanni Bajo <giovannibajo@gcc.gnu.org>
PR c++/15967

View file

@ -773,8 +773,6 @@ struct language_function GTY(())
struct named_label_list *x_named_labels;
struct cp_binding_level *bindings;
varray_type x_local_names;
const char *cannot_inline;
};
/* The current C++-specific per-function global variables. */

View file

@ -10491,15 +10491,6 @@ save_function_data (tree decl)
f->x_named_label_uses = NULL;
f->bindings = NULL;
f->x_local_names = NULL;
/* If we've already decided that we cannot inline this function, we
must remember that fact when we actually go to expand the
function. */
if (current_function_cannot_inline)
{
f->cannot_inline = current_function_cannot_inline;
DECL_INLINE (decl) = 0;
}
}
/* Add a note to mark the beginning of the main body of the constructor.
@ -11156,11 +11147,6 @@ cxx_push_function_context (struct function * f)
now, restore saved state. */
*cp_function_chain = *DECL_SAVED_FUNCTION_DATA (fn);
/* If we decided that we didn't want to inline this function,
make sure the back-end knows that. */
if (!current_function_cannot_inline)
current_function_cannot_inline = cp_function_chain->cannot_inline;
/* We don't need the saved data anymore. Unless this is an inline
function; we need the named return value info for
cp_copy_res_decl_for_inlining. */

View file

@ -1976,8 +1976,8 @@ start_objects (int method_type, int initp)
have external linkage. And, there's no point in deferring
compilation of thes functions; they're all going to have to be
out anyhow. */
current_function_cannot_inline
= "static constructors and destructors cannot be inlined";
DECL_INLINE (current_function_decl) = 0;
DECL_UNINLINABLE (current_function_decl) = 1;
return body;
}
@ -2131,8 +2131,8 @@ start_static_storage_duration_function (unsigned count)
/* This function must not be deferred because we are depending on
its compilation to tell us what is TREE_SYMBOL_REFERENCED. */
current_function_cannot_inline
= "static storage duration functions cannot be inlined";
DECL_INLINE (ssdf_decl) = 0;
DECL_UNINLINABLE (ssdf_decl) = 1;
return body;
}

View file

@ -232,10 +232,6 @@ struct function GTY(())
/* The arg pointer hard register, or the pseudo into which it was copied. */
rtx internal_arg_pointer;
/* Language-specific reason why the current function cannot be made
inline. */
const char *cannot_inline;
/* Opaque pointer used by get_hard_reg_initial_val and
has_hard_reg_initial_val (see integrate.[hc]). */
struct initial_value_struct *hard_reg_initial_vals;
@ -542,7 +538,6 @@ extern int trampolines_created;
#define current_function_limit_stack (cfun->limit_stack)
#define current_function_uses_pic_offset_table (cfun->uses_pic_offset_table)
#define current_function_uses_const_pool (cfun->uses_const_pool)
#define current_function_cannot_inline (cfun->cannot_inline)
#define current_function_epilogue_delay_list (cfun->epilogue_delay_list)
#define current_function_has_nonlocal_label (cfun->has_nonlocal_label)
#define current_function_has_nonlocal_goto (cfun->has_nonlocal_goto)

View file

@ -1,3 +1,10 @@
2004-06-15 Paolo Bonzini <bonzini@gnu.org>
* class.c (emit_register_classes): Make the function uninlinable,
do not set current_function_cannot_inline.
* resource.c (write_resource_constructor): Do not reset
flag_inline_functions around rest_of_compilation.
2004-06-08 Andrew Pinski <pinskia@physics.uc.edu>
PR java/15769

View file

@ -2293,6 +2293,8 @@ emit_register_classes (void)
DECL_SOURCE_LINE (init_decl) = 0;
TREE_STATIC (init_decl) = 1;
current_function_decl = init_decl;
DECL_INLINE (init_decl) = 0;
DECL_UNINLINABLE (init_decl) = 1;
DECL_RESULT (init_decl) = build_decl (RESULT_DECL, NULL_TREE,
void_type_node);
@ -2308,10 +2310,6 @@ emit_register_classes (void)
init_function_start (init_decl);
expand_function_start (init_decl, 0);
/* Do not allow the function to be deferred. */
current_function_cannot_inline
= "static constructors and destructors cannot be inlined";
for ( t = registered_class; t; t = TREE_CHAIN (t))
emit_library_call (registerClass_libfunc, 0, VOIDmode, 1,
XEXP (DECL_RTL (t), 0), Pmode);

View file

@ -151,14 +151,10 @@ write_resource_constructor (void)
input_location = DECL_SOURCE_LOCATION (init_decl);
expand_function_end ();
poplevel (1, 0, 1);
{
/* Force generation, even with -O3 or deeper. Gross hack.
FIXME. */
int saved_flag = flag_inline_functions;
flag_inline_functions = 0;
rest_of_compilation (init_decl);
flag_inline_functions = saved_flag;
}
/* rest_of_compilation forces generation even if -finline-functions. */
rest_of_compilation (init_decl);
current_function_decl = NULL_TREE;
if (targetm.have_ctors_dtors)
targetm.asm_out.constructor (XEXP (DECL_RTL (init_decl), 0),

View file

@ -1910,8 +1910,6 @@ build_module_descriptor (void)
/* Don't let this one be deferred. */
DECL_INLINE (init_function_decl) = 0;
DECL_UNINLINABLE (init_function_decl) = 1;
current_function_cannot_inline
= "static constructors and destructors cannot be inlined";
parms
= build_tree_list (NULL_TREE,
@ -7981,7 +7979,6 @@ finish_method_def (void)
dispatched, so suppress all thoughts of doing so. */
DECL_INLINE (current_function_decl) = 0;
DECL_UNINLINABLE (current_function_decl) = 1;
current_function_cannot_inline = "methods cannot be inlined";
finish_function ();
lang_expand_function_end = NULL;

View file

@ -1359,6 +1359,10 @@ rest_of_compilation (tree decl)
timevar_push (TV_REST_OF_COMPILATION);
/* There's no need to defer outputting this function any more; we
know we want to output it. */
DECL_DEFER_OUTPUT (current_function_decl) = 0;
/* Register rtl specific functions for cfg. */
rtl_register_cfg_hooks ();
@ -1425,8 +1429,7 @@ rest_of_compilation (tree decl)
/* Initialize some variables used by the optimizers. */
init_function_for_compilation ();
if (! DECL_DEFER_OUTPUT (decl))
TREE_ASM_WRITTEN (decl) = 1;
TREE_ASM_WRITTEN (decl) = 1;
/* Now that integrate will no longer see our rtl, we need not
distinguish between the return value of this function and the
@ -1438,10 +1441,8 @@ rest_of_compilation (tree decl)
purge_hard_subreg_sets (get_insns ());
/* Early return if there were errors. We can run afoul of our
consistency checks, and there's not really much point in fixing them.
Don't return yet if -Wreturn-type; we need to do cleanup_cfg. */
if (((rtl_dump_and_exit || flag_syntax_only) && !warn_return_type)
|| errorcount || sorrycount)
consistency checks, and there's not really much point in fixing them. */
if (rtl_dump_and_exit || flag_syntax_only || errorcount || sorrycount)
goto exit_rest_of_compilation;
timevar_push (TV_JUMP);
@ -1534,15 +1535,8 @@ rest_of_compilation (tree decl)
purge_line_number_notes (insns);
timevar_pop (TV_JUMP);
close_dump_file (DFI_jump, print_rtl, insns);
/* Now is when we stop if -fsyntax-only and -Wreturn-type. */
if (rtl_dump_and_exit || flag_syntax_only || DECL_DEFER_OUTPUT (decl))
goto exit_rest_of_compilation;
timevar_push (TV_JUMP);
if (optimize)
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);

View file

@ -582,10 +582,6 @@ tree_rest_of_compilation (tree fndecl, bool nested_p)
if (nested_p)
ggc_push_context ();
/* There's no need to defer outputting this function any more; we
know we want to output it. */
DECL_DEFER_OUTPUT (fndecl) = 0;
/* Run the optimizers and output the assembler code for this function. */
rest_of_compilation (fndecl);