OSDN Git Service

* c-common.h (tree_dump_index): Add more comments.
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Sep 2001 12:12:50 +0000 (12:12 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 4 Sep 2001 12:12:50 +0000 (12:12 +0000)
* 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: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45373 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/c-common.h
gcc/doc/invoke.texi

index aeae636..b10e317 100644 (file)
@@ -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.
index e93f212..26933b7 100644 (file)
@@ -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 */
 
index d23bb49..b296772 100644 (file)
@@ -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: