Commit 73c68f61 by Scott Snyder Committed by Richard Henderson

flags.h: Add flag_eliminate_unused_debug_types.

        * flags.h: Add flag_eliminate_unused_debug_types.
        * toplev.c: Add flag_eliminate_unused_debug_types.
        (f_options): Add -feliminate-unused-debug-types.
        * dwarf2out.c (struct file_table): Add emitted member.
        (splice_child_die): Fix the parent pointer for the child being
        spliced.
        (lookup_filename): Maintain file_table.emitted array.  Don't
        output .file directive here.
        (maybe_emit_file): (new)
        (init_file_table): Set up file_table.emitted.
        (dwarf2out_source_line): Use maybe_emit_file.
        (dwarf2out_start_source_file): Use maybe_emit_file.
        (dwarf2out_init): Use maybe_emit_file.
        (prune_unused_types_walk_attribs): (new)
        (prune_unused_types_mark): (new)
        (prune_unused_types_walk): (new)
        (prune_unused_types_prune): (new)
        (prune_unused_types): (new)
        (dwarf2out_finish): Call prune_unused_types if
        flag_eliminate_unused_debug_types is set.
        * doc/invoke.texi (Option Summary): Add
        -feliminate-unused-debug-types.
        (Debugging Options): Likewise.

From-SVN: r63588
parent d8fad4ea
2003-02-28 scott snyder <snyder@fnal.gov>
* flags.h: Add flag_eliminate_unused_debug_types.
* toplev.c: Add flag_eliminate_unused_debug_types.
(f_options): Add -feliminate-unused-debug-types.
* dwarf2out.c (struct file_table): Add emitted member.
(splice_child_die): Fix the parent pointer for the child being
spliced.
(lookup_filename): Maintain file_table.emitted array. Don't
output .file directive here.
(maybe_emit_file): (new)
(init_file_table): Set up file_table.emitted.
(dwarf2out_source_line): Use maybe_emit_file.
(dwarf2out_start_source_file): Use maybe_emit_file.
(dwarf2out_init): Use maybe_emit_file.
(prune_unused_types_walk_attribs): (new)
(prune_unused_types_mark): (new)
(prune_unused_types_walk): (new)
(prune_unused_types_prune): (new)
(prune_unused_types): (new)
(dwarf2out_finish): Call prune_unused_types if
flag_eliminate_unused_debug_types is set.
* doc/invoke.texi (Option Summary): Add
-feliminate-unused-debug-types.
(Debugging Options): Likewise.
2003-02-28 Geoffrey Keating <geoffk@apple.com>
* doc/invoke.texi: Change .pch to .gch.
......
......@@ -258,6 +258,7 @@ in the following sections.
-p -pg -print-file-name=@var{library} -print-libgcc-file-name @gol
-print-multi-directory -print-multi-lib @gol
-print-prog-name=@var{program} -print-search-dirs -Q @gol
-feliminate-unused-debug-types @gol
-save-temps -time}
@item Optimization Options
......@@ -3412,6 +3413,18 @@ anything else.
@opindex dumpspecs
Print the compiler's built-in specs---and don't do anything else. (This
is used when GCC itself is being built.) @xref{Spec Files}.
@item -feliminate-unused-debug-types
@opindex feliminate-unused-debug-types
Normally, when producing DWARF2 output, GCC will emit debugging
information for all types declared in a compilation
unit, regardless of whether or not they are actually used
in that compilation unit. Sometimes this is useful, such as
if, in the debugger, you want to cast a value to a type that is
not actually used in your program (but is declared). More often,
however, this results in a significant amount of wasted space.
With this option, GCC will avoid producing debug symbol output
for types that are nowhere used in the source file being compiled.
@end table
@node Optimize Options
......
......@@ -641,6 +641,10 @@ extern int flag_gcse_sm;
extern int flag_eliminate_dwarf2_dups;
/* Nonzero means we should do unused type elimination. */
extern int flag_eliminate_unused_debug_types;
/* Nonzero means to collect statistics which might be expensive
and to print them when we are done. */
extern int flag_detailed_statistics;
......
......@@ -378,6 +378,10 @@ tree current_function_func_begin_label;
int flag_eliminate_dwarf2_dups = 0;
/* Nonzero if doing unused type elimination. */
int flag_eliminate_unused_debug_types = 0;
/* Nonzero if generating code to do profiling. */
int profile_flag = 0;
......@@ -999,6 +1003,8 @@ static const lang_independent_options f_options[] =
{
{"eliminate-dwarf2-dups", &flag_eliminate_dwarf2_dups, 1,
N_("Perform DWARF2 duplicate elimination") },
{"eliminate-unused-debug-types", &flag_eliminate_unused_debug_types, 1,
N_("Perform unused type elimination in debug info") },
{"float-store", &flag_float_store, 1,
N_("Do not store floats in registers") },
{"defer-pop", &flag_defer_pop, 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment