aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>2000-09-16 14:58:51 -0400
committerRichard Kenner <kenner@gcc.gnu.org>2000-09-16 14:58:51 -0400
commitf93dacbdefbd440732896d176447c814d61458bf (patch)
tree6de510f651766f1daf10b0bf6db9c8a40c430cec /gcc
parent5748b2cb4b46855f9a6052741de818825e9632ef (diff)
downloadgcc-f93dacbdefbd440732896d176447c814d61458bf.zip
gcc-f93dacbdefbd440732896d176447c814d61458bf.tar.gz
gcc-f93dacbdefbd440732896d176447c814d61458bf.tar.bz2
function.h (no_debugging_symbols): New field.
* 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
Diffstat (limited to 'gcc')
-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 08d438a..3912d85 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 6128aaf..79fbce6 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 95ef7a2..fb41c78 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 330e28c..2c5ad0a 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));