aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-16 18:58:51 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-16 18:58:51 +0000
commitc8c4ca6d71db5f42e4da1c649ccaa7a9e3bc0ff5 (patch)
tree6de510f651766f1daf10b0bf6db9c8a40c430cec
parent455adfe309d594cda209c72b5ab8615a69265c33 (diff)
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36461 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/function.h1
-rw-r--r--gcc/integrate.c20
-rw-r--r--gcc/toplev.c17
-rw-r--r--gcc/tree.h12
4 files changed, 25 insertions, 25 deletions
diff --git a/gcc/function.h b/gcc/function.h
index 08d438ab67e..3912d859790 100644
--- a/gcc/function.h
+++ b/gcc/function.h
@@ -444,6 +444,7 @@ struct function
/* For integrate.c. */
int inlinable;
+ int no_debugging_symbols;
/* This is in fact an rtvec. */
void *original_arg_vector;
tree original_decl_initial;
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 6128aaf895d..79fbce6d422 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -263,7 +263,7 @@ static tree *parmdecl_map;
/* In save_for_inline, nonzero if past the parm-initialization insns. */
static int in_nonparm_insns;
-/* 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
@@ -399,7 +399,7 @@ copy_decl_for_inlining (decl, from_fn, to_fn)
functions at the end of compilation. */
void
-save_for_inline_nocopy (fndecl)
+save_for_inline (fndecl)
tree fndecl;
{
rtx insn;
@@ -454,6 +454,7 @@ save_for_inline_nocopy (fndecl)
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. */
@@ -1213,8 +1214,7 @@ expand_inline_function (fndecl, parms, target, ignore, type,
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. */
@@ -1234,7 +1234,7 @@ copy_insn_list (insns, map, static_chain_value)
#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. */
@@ -1503,9 +1503,7 @@ copy_insn_list (insns, map, static_chain_value)
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
@@ -2767,6 +2765,7 @@ output_inline_function (fndecl)
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;
@@ -2782,6 +2781,10 @@ output_inline_function (fndecl)
/* 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);
@@ -2791,4 +2794,5 @@ output_inline_function (fndecl)
cfun = old_cfun;
current_function_decl = old_cfun ? old_cfun->decl : 0;
+ write_symbols = old_write_symbols;
}
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 95ef7a292e9..fb41c789965 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -2778,17 +2778,15 @@ rest_of_compilation (decl)
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,
@@ -2803,7 +2801,7 @@ rest_of_compilation (decl)
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;
@@ -2862,7 +2860,6 @@ rest_of_compilation (decl)
#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
diff --git a/gcc/tree.h b/gcc/tree.h
index 330e28c16ea..2c5ad0aee73 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -1386,11 +1386,10 @@ struct tree_type
#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))
@@ -2789,8 +2788,7 @@ extern int global_bindings_p PARAMS ((void));
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));