+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
+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
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. */
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.
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. */
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;
}
/* 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;
}
/* 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;
#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)
+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
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);
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);
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),
/* 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,
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;
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 ();
/* 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
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);
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);
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);