* function.h (no_debugging_symbols): New field.
* integrate.c (save_for_inline): Renamed from save_for_inline_nocopy.
Initialize no_debugging_symbols.
(output_inline_function): Save and restore write_symbols and set from
no_debugging_symbols.
* toplev.c (rest_of_compilation): Call save_for_inline.
* tree.h: Update comment.
From-SVN: r36461
/* For integrate.c. */
int inlinable;
+ int no_debugging_symbols;
/* This is in fact an rtvec. */
void *original_arg_vector;
tree original_decl_initial;
/* In save_for_inline, nonzero if past the parm-initialization insns. */
static int in_nonparm_insns;
\f
-/* Subroutine for `save_for_inline_nocopy'. Performs initialization
+/* Subroutine for `save_for_inline'. Performs initialization
needed to save FNDECL's insns and info for future inline expansion. */
static rtvec
functions at the end of compilation. */
void
-save_for_inline_nocopy (fndecl)
+save_for_inline (fndecl)
tree fndecl;
{
rtx insn;
cfun->inl_last_parm_insn = cfun->x_last_parm_insn;
cfun->original_arg_vector = argvec;
cfun->original_decl_initial = DECL_INITIAL (fndecl);
+ cfun->no_debugging_symbols = (write_symbols == NO_DEBUG);
DECL_SAVED_INSNS (fndecl) = cfun;
/* Clean up. */
computed in expand_inline_function. This function may call itself for
insns containing sequences.
- Copying is done in two passes, first the insns and then their REG_NOTES,
- just like save_for_inline.
+ Copying is done in two passes, first the insns and then their REG_NOTES.
If static_chain_value is non-zero, it represents the context-pointer
register for the function. */
#endif
/* Copy the insns one by one. Do this in two passes, first the insns and
- then their REG_NOTES, just like save_for_inline. */
+ then their REG_NOTES. */
/* This loop is very similar to the loop in copy_loop_body in unroll.c. */
discarded because it is important to have only one of
each in the current function.
- NOTE_INSN_DELETED notes aren't useful (save_for_inline
- deleted these in the copy used for continuing compilation,
- not the copy used for inlining).
+ NOTE_INSN_DELETED notes aren't useful.
NOTE_INSN_BASIC_BLOCK is discarded because the saved bb
pointer (which will soon be dangling) confuses flow's
tree fndecl;
{
struct function *old_cfun = cfun;
+ enum debug_info_type old_write_symbols = write_symbols;
struct function *f = DECL_SAVED_INSNS (fndecl);
cfun = f;
/* We're not deferring this any longer. */
DECL_DEFER_OUTPUT (fndecl) = 0;
+ /* If requested, suppress debugging information. */
+ if (f->no_debugging_symbols)
+ write_symbols = NO_DEBUG;
+
/* Compile this function all the way down to assembly code. */
rest_of_compilation (fndecl);
cfun = old_cfun;
current_function_decl = old_cfun ? old_cfun->decl : 0;
+ write_symbols = old_write_symbols;
}
if (DECL_DEFER_OUTPUT (decl))
{
- /* If -Wreturn-type, we have to do a bit of compilation.
- However, if we just fall through we will call
- save_for_inline_copying() which results in excessive
- memory use. Instead, we just want to call
- jump_optimize() to figure out whether or not we can fall
- off the end of the function; we do the minimum amount of
- work necessary to make that safe. And, we set optimize
- to zero to keep jump_optimize from working too hard. */
+ /* If -Wreturn-type, we have to do a bit of compilation. We just
+ want to call jump_optimize to figure out whether or not we can
+ fall off the end of the function; we do the minimum amount of
+ work necessary to make that safe. And, we set optimize to zero
+ to keep jump_optimize from working too hard. */
if (warn_return_type)
{
int saved_optimize = optimize;
+
optimize = 0;
find_exception_handler_labels ();
jump_optimize (insns, !JUMP_CROSS_JUMP, !JUMP_NOOP_MOVES,
TREE_NOTHROW (current_function_decl) = 1;
timevar_push (TV_INTEGRATION);
- save_for_inline_nocopy (decl);
+ save_for_inline (decl);
timevar_pop (TV_INTEGRATION);
DECL_SAVED_INSNS (decl)->inlinable = inlinable;
goto exit_rest_of_compilation;
#endif
/* From now on, allocate rtl in current_obstack, not in saveable_obstack.
- Note that that may have been done above, in save_for_inline_copying.
The call to resume_temporary_allocation near the end of this function
goes back to the usual state of affairs. This must be done after
we've built up any unwinders for exception handling, and done
#define DECL_ORIGIN(NODE) \
(DECL_ABSTRACT_ORIGIN (NODE) ? DECL_ABSTRACT_ORIGIN (NODE) : NODE)
-/* Nonzero for any sort of ..._DECL node means this decl node represents
- an inline instance of some original (abstract) decl from an inline function;
- suppress any warnings about shadowing some other variable.
- FUNCTION_DECL nodes can also have their abstract origin set to themselves
- (see save_for_inline_copying). */
+/* Nonzero for any sort of ..._DECL node means this decl node represents an
+ inline instance of some original (abstract) decl from an inline function;
+ suppress any warnings about shadowing some other variable. FUNCTION_DECL
+ nodes can also have their abstract origin set to themselves. */
#define DECL_FROM_INLINE(NODE) (DECL_ABSTRACT_ORIGIN (NODE) != (tree) 0 \
&& DECL_ABSTRACT_ORIGIN (NODE) != (NODE))
extern void insert_block PARAMS ((tree));
/* In integrate.c */
-extern void save_for_inline_nocopy PARAMS ((tree));
-extern void save_for_inline_copying PARAMS ((tree));
+extern void save_for_inline PARAMS ((tree));
extern void set_decl_abstract_flags PARAMS ((tree, int));
extern void output_inline_function PARAMS ((tree));
extern void set_decl_origin_self PARAMS ((tree));