On 02/01/2017 06:57 PM, Martin Sebor wrote:
As discussed in bug 32003 - Undocumented -fdump-tree options, rather
than duplicating the same boiler-plate text for each of the dozens
(138 by my count) of undocumented passes, the attached patch removes
the pass-specific -fdump-tree- options replacing them with a list of
generic steps to determine the full list of such options and the names
of the dump files for each.
The bug only talks about -fdump-tree- options so the attached patch
only tackles those and leaves the -fdump-rtl- options for another
time.
Thanks for tackling this. I think the patch requires another round of
cleanup, though.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 4b13aeb..75b6e3e 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -543,30 +543,9 @@ Objective-C and Objective-C++ Dialects}.
-fdump-passes @gol
-fdump-rtl-@var{pass} -fdump-rtl-@var{pass}=@var{filename} @gol
-fdump-statistics @gol
--fdump-tree-all @gol
I'd prefer that we continue to document -fdump-tree-all explicitly.
It's the easiest to use and remember, and it's also the one I need most
often when I'm tracking down a bug and I don't have a clue which pass is
introducing it. :-)
+The determine what tree dumps are available or find the dump for a pass
+of interest follow the steps below.
s/The/To/
+@enumerate
+@item
+Invoke GCC with @option{-fdump-passes} and in the @file{stderr} output
+look for a code that corresponds to the pass you are interested in.
+For example, the codes @code{tree-evrp}, @code{tree-vrp1}, and
+@code{tree-vrp2} correspond to the three Value Range Propagation passes.
+The number at the end distinguishes distinct invocations of the same pass.
+@item
+To enable the creation of the dump file, append the pass code to
+the @option{-fdump-} option prefix and invoke GCC with it. For example,
+to enable the dump from the Early Value Range Propagation pass, invoke
+GCC with the @code{-fdump-tree-evrp} option. Optionally, you may
s/@code/@option/
+specify the name of the dump file. If you don't specify one, GCC will
+create on as described below.
s/will create on/creates one/
+@item
+Find the pass dump in a file whose name is composed of three components
+separated by a period: the name of the source file GCC was invoked to
+compile, a numeric suffix indicating the pass number followed by the
+letter @code{t} for tree passes (and the letter @code{r} for rtl passes),
s/@code/@samp/g
s/rtl/RTL/
+and finally the pass code. For example, the Early VRP pass dump might be
+in a file named @file{myfile.c.038t.evrp} in the current working
+directory. Note that the numeric codes need not be stable and may change
s/need not be/are not/
+from one version of GCC to another.
+@end enumerate
-Sandra