diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2001-09-04 12:12:50 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2001-09-04 12:12:50 +0000 |
commit | 5c924f87e603f3e4f1545d8a6ae6ae5458c0d388 (patch) | |
tree | 3ee4e117f64782e128a0b62f4646f1f75a953c45 | |
parent | b85b580849f96934389701e913980947713066d4 (diff) |
* c-common.h (tree_dump_index): Add more comments.
* c-dump.c (dump_files): Name flags `tree' rather than `ast'.
(dump_option_value_info): New struct.
(dump_options): New array.
(dump_switch_p): Parse switch options symbolically.
* doc/invoke.texi (-fdump-ast): Rename to ...
(-fdump-tree): ... here. Document that options are symbolic, and
not all are applicable.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@45373 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/c-common.h | 9 | ||||
-rw-r--r-- | gcc/doc/invoke.texi | 54 |
3 files changed, 47 insertions, 27 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index aeae6364541..b10e31712b3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2001-09-04 Nathan Sidwell <nathan@codesourcery.com> + + * c-common.h (tree_dump_index): Add more comments. + * c-dump.c (dump_files): Name flags `tree' rather than `ast'. + (dump_option_value_info): New struct. + (dump_options): New array. + (dump_switch_p): Parse switch options symbolically. + * doc/invoke.texi (-fdump-ast): Rename to ... + (-fdump-tree): ... here. Document that options are symbolic, and + not all are applicable. + 2001-09-04 David S. Miller <davem@redhat.com> * config/sparc/sparc.md (define_splits): Kill constraints. diff --git a/gcc/c-common.h b/gcc/c-common.h index e93f2123aae..26933b74f63 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -844,9 +844,10 @@ extern int c_safe_from_p PARAMS ((rtx, tree)); extern int c_unsafe_for_reeval PARAMS ((tree)); -/* In dump.c */ +/* In c-dump.c */ -/* Different tree dump places. */ +/* Different tree dump places. When you add new tree dump places, + extend the DUMP_FILES array in c-dump.c */ enum tree_dump_index { TDI_all, /* dump the whole translation unit */ @@ -858,7 +859,9 @@ enum tree_dump_index TDI_end }; -/* Bit masks to control tree dumping. */ +/* Bit masks to control tree dumping. Not all values are applicable to + all tree dumps. Add new ones at the end. When you define new + values, extend the DUMP_OPTIONS array in c-dump.c */ #define TDF_ADDRESS (1 << 0) /* dump node addresses */ #define TDF_SLIM (1 << 1) /* don't go wild following links */ diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index d23bb494464..b2967728671 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -239,8 +239,8 @@ in the following sections. -a -ax -d@var{letters} -dumpspecs -dumpmachine -dumpversion @gol -fdump-unnumbered -fdump-translation-unit@r{[}-@var{n}@r{]} @gol -fdump-class-hierarchy@r{[}-@var{n}@r{]} @gol --fdump-ast-original@r{[}-@var{n}@r{]} -fdump-ast-optimized@r{[}-@var{n}@r{]} @gol --fdump-ast-inlined@r{[}-@var{n}@r{]} @gol +-fdump-tree-original@r{[}-@var{n}@r{]} -fdump-tree-optimized@r{[}-@var{n}@r{]} @gol +-fdump-tree-inlined@r{[}-@var{n}@r{]} @gol -fmem-report -fpretend-float @gol -fprofile-arcs -ftest-coverage -ftime-report @gol -g -g@var{level} -gcoff -gdwarf -gdwarf-1 -gdwarf-1+ -gdwarf-2 @gol @@ -2974,39 +2974,45 @@ use diff on debugging dumps for compiler invocations with different options, in particular with and without @option{-g}. @item -fdump-translation-unit @r{(C and C++ only)} -@itemx -fdump-translation-unit-@var{number} @r{(C and C++ only)} +@itemx -fdump-translation-unit-@var{options} @r{(C and C++ only)} @opindex fdump-translation-unit Dump a representation of the tree structure for the entire translation unit to a file. The file name is made by appending @file{.tu} to the -source file name. If the @samp{-@var{number}} form is used, @var{number} -controls the details of the dump as described for the @option{-fdump-ast} options. +source file name. If the @samp{-@var{options}} form is used, @var{options} +controls the details of the dump as described for the +@option{-fdump-tree} options. @item -fdump-class-hierarchy @r{(C++ only)} -@itemx -fdump-class-hierarchy-@var{number} @r{(C++ only)} +@itemx -fdump-class-hierarchy-@var{options} @r{(C++ only)} @opindex fdump-class-hierarchy Dump a representation of each class's hierarchy and virtual function table layout to a file. The file name is made by appending @file{.class} -to the source file name. If the @samp{-@var{number}} form is used, @var{number} -controls the details of the dump as described for the @option{-fdump-ast} -options. - -@item -fdump-ast-@var{switch} @r{(C++ only)} -@itemx -fdump-ast-@var{switch}-@var{number} @r{(C++ only)} -@opindex fdump-ast -Control the dumping at various stages of processing the abstract syntax -tree to a file. The file name is generated by appending a switch -specific suffix to the source file name. If the @samp{-@var{number}} form is -used, @var{number} is a bit mask which controls the details of the -dump. The following bits are meaningful (these are not set symbolically, -as the primary function of these dumps is for debugging gcc itself): +to the source file name. If the @samp{-@var{options}} form is used, +@var{options} controls the details of the dump as described for the +@option{-fdump-tree} options. + +@item -fdump-tree-@var{switch} @r{(C++ only)} +@itemx -fdump-tree-@var{switch}-@var{options} @r{(C++ only)} +@opindex fdump-tree +Control the dumping at various stages of processing the intermediate +language tree to a file. The file name is generated by appending a switch +specific suffix to the source file name. If the @samp{-@var{options}} +form is used, @var{options} is a list of @samp{-} separated options that +control the details of the dump. Not all options are applicable to all +dumps, those which are not meaningful will be ignored. The following +options are available @table @samp -@item bit0 (1) +@item address Print the address of each node. Usually this is not meaningful as it -changes according to the environment and source file. -@item bit1 (2) -Inhibit dumping of members of a scope or body of a function, unless they -are reachable by some other path. +changes according to the environment and source file. Its primary use +is for tying up a dump file with a debug environment. +@item slim +Inhibit dumping of members of a scope or body of a function merely +because that scope has been reached. Only dump such items when they +are directly reachable by some other path. +@item all +Turn on all options. @end table The following tree dumps are possible: |