Re: [PATCH] Documentation for dump and optinfo output

2014-02-13 Thread Sharad Singhai
Committed as r207767.

Indeed, I had an older version of makeinfo. Once I updated to the
latest version 5.2, I saw the warnings. Those are fixed by this patch.

Thanks,
Sharad

 On Tue, Feb 11, 2014 at 11:42 PM, Thomas Schwinge tho...@codesourcery.com
 wrote:

 Hi!

 On Wed, 5 Feb 2014 16:33:19 -0800, Sharad Singhai sing...@google.com
 wrote:
  I am really sorry about the delay.

 No worries; not exactly a severe issue.  ;-)

  I couldn't exactly reproduce the
  warning which you described

 Maybe the version of makeinfo is relevant?

 $ makeinfo --version | head -n 1
 makeinfo (GNU texinfo) 5.1

  but I found a place where two nodes were
  out of order in optinfo.texi. Could you please apply the following
  patch and see if the problem goes away? If it works for you, I will
  commit the doc fixes.
 
  Also I would appreciate the exact command which produces these warnings.

 Your patch does fix the problem; see the following diff of the build log,
 where the warnings are now gone, and which also happens to contain the
 makeinfo command line.

 @@ -4199,12 +4199,6 @@ if [ xinfo = xinfo ]; then \
 makeinfo --split-size=500 --split-size=500
 --no-split -I . -I ../../source/gcc/doc \
 -I ../../source/gcc/doc/include -o doc/gccint.info
 ../../source/gcc/doc/gccint.texi; \
 fi
 -../../source/gcc/doc/optinfo.texi:45: warning: node next `Optimization
 groups' in menu `Dump output verbosity' and in sectioning `Dump files and
 streams' differ
 -../../source/gcc/doc/optinfo.texi:77: warning: node next `Dump files and
 streams' in menu `Dump types' and in sectioning `Dump output verbosity'
 differ
 -../../source/gcc/doc/optinfo.texi:77: warning: node prev `Dump files and
 streams' in menu `Dump output verbosity' and in sectioning `Optimization
 groups' differ
 -../../source/gcc/doc/optinfo.texi:104: warning: node next `Dump output
 verbosity' in menu `Dump files and streams' and in sectioning `Dump types'
 differ
 -../../source/gcc/doc/optinfo.texi:104: warning: node prev `Dump output
 verbosity' in menu `Optimization groups' and in sectioning `Dump files and
 streams' differ
 -../../source/gcc/doc/optinfo.texi:137: warning: node prev `Dump types' in
 menu `Dump files and streams' and in sectioning `Dump output verbosity'
 differ
  if [ xinfo = xinfo ]; then \
 makeinfo --split-size=500 --split-size=500
 --no-split -I ../../source/gcc/doc \
 -I ../../source/gcc/doc/include -o
 doc/gccinstall.info ../../source/gcc/doc/install.texi; \

  * doc/optinfo.texi: Fix order of nodes.

 Thanks, please commit.


 Grüße,
  Thomas




Re: [PATCH] Documentation for dump and optinfo output

2014-02-11 Thread Thomas Schwinge
Hi!

On Wed, 5 Feb 2014 16:33:19 -0800, Sharad Singhai sing...@google.com wrote:
 I am really sorry about the delay.

No worries; not exactly a severe issue.  ;-)

 I couldn't exactly reproduce the
 warning which you described

Maybe the version of makeinfo is relevant?

$ makeinfo --version | head -n 1
makeinfo (GNU texinfo) 5.1

 but I found a place where two nodes were
 out of order in optinfo.texi. Could you please apply the following
 patch and see if the problem goes away? If it works for you, I will
 commit the doc fixes.
 
 Also I would appreciate the exact command which produces these warnings.

Your patch does fix the problem; see the following diff of the build log,
where the warnings are now gone, and which also happens to contain the
makeinfo command line.

@@ -4199,12 +4199,6 @@ if [ xinfo = xinfo ]; then \
makeinfo --split-size=500 --split-size=500 --no-split 
-I . -I ../../source/gcc/doc \
-I ../../source/gcc/doc/include -o doc/gccint.info 
../../source/gcc/doc/gccint.texi; \
fi
-../../source/gcc/doc/optinfo.texi:45: warning: node next `Optimization groups' 
in menu `Dump output verbosity' and in sectioning `Dump files and streams' 
differ
-../../source/gcc/doc/optinfo.texi:77: warning: node next `Dump files and 
streams' in menu `Dump types' and in sectioning `Dump output verbosity' differ
-../../source/gcc/doc/optinfo.texi:77: warning: node prev `Dump files and 
streams' in menu `Dump output verbosity' and in sectioning `Optimization 
groups' differ
-../../source/gcc/doc/optinfo.texi:104: warning: node next `Dump output 
verbosity' in menu `Dump files and streams' and in sectioning `Dump types' 
differ
-../../source/gcc/doc/optinfo.texi:104: warning: node prev `Dump output 
verbosity' in menu `Optimization groups' and in sectioning `Dump files and 
streams' differ
-../../source/gcc/doc/optinfo.texi:137: warning: node prev `Dump types' in menu 
`Dump files and streams' and in sectioning `Dump output verbosity' differ
 if [ xinfo = xinfo ]; then \
makeinfo --split-size=500 --split-size=500 --no-split 
-I ../../source/gcc/doc \
-I ../../source/gcc/doc/include -o doc/gccinstall.info 
../../source/gcc/doc/install.texi; \

 * doc/optinfo.texi: Fix order of nodes.

Thanks, please commit.


Grüße,
 Thomas


pgpFX9jiZv3dY.pgp
Description: PGP signature


Re: [PATCH] Documentation for dump and optinfo output

2014-02-05 Thread Sharad Singhai
I am really sorry about the delay. I couldn't exactly reproduce the
warning which you described, but I found a place where two nodes were
out of order in optinfo.texi. Could you please apply the following
patch and see if the problem goes away? If it works for you, I will
commit the doc fixes.

Also I would appreciate the exact command which produces these warnings.

Thanks,
Sharad

2014-02-05  Sharad Singhai  sing...@google.com

* doc/optinfo.texi: Fix order of nodes.

Index: doc/optinfo.texi
===
--- doc/optinfo.texi (revision 207525)
+++ doc/optinfo.texi (working copy)
@@ -12,8 +12,8 @@ information about various compiler transformations
 @menu
 * Dump setup:: Setup of optimization dumps.
 * Optimization groups::Groups made up of optimization passes.
+* Dump files and streams:: Dump output file names and streams.
 * Dump output verbosity::  How much information to dump.
-* Dump files and streams:: Dump output file names and streams.
 * Dump types:: Various types of dump functions.
 * Dump examples::  Sample usage.
 @end menu

Thanks,
Sharad


On Fri, Jan 24, 2014 at 2:20 AM, Thomas Schwinge
tho...@codesourcery.com wrote:
 Hi!

 On Thu, 19 Dec 2013 01:44:08 -0800, Sharad Singhai sing...@google.com wrote:
 I ran 'make doc' and browsed the info output for basic sanity. Okay for 
 trunk?

   * Makefile.in: Add optinfo.texi.
   * doc/optinfo.texi: New documentation for optimization info.
   * doc/passes.texi: Add new node.

 Thanks for contributing to the documentation!

 During build, I'm seeing the following warnings; would be great if you
 could address these:

 ../../source/gcc/doc/optinfo.texi:45: warning: node next `Optimization 
 groups' in menu `Dump output verbosity' and in sectioning `Dump files and 
 streams' differ
 ../../source/gcc/doc/optinfo.texi:77: warning: node next `Dump files and 
 streams' in menu `Dump types' and in sectioning `Dump output verbosity' differ
 ../../source/gcc/doc/optinfo.texi:77: warning: node prev `Dump files and 
 streams' in menu `Dump output verbosity' and in sectioning `Optimization 
 groups' differ
 ../../source/gcc/doc/optinfo.texi:104: warning: node next `Dump output 
 verbosity' in menu `Dump files and streams' and in sectioning `Dump types' 
 differ
 ../../source/gcc/doc/optinfo.texi:104: warning: node prev `Dump output 
 verbosity' in menu `Optimization groups' and in sectioning `Dump files and 
 streams' differ
 ../../source/gcc/doc/optinfo.texi:137: warning: node prev `Dump types' in 
 menu `Dump files and streams' and in sectioning `Dump output verbosity' differ


 Grüße,
  Thomas


Re: [PATCH] Documentation for dump and optinfo output

2014-01-24 Thread Thomas Schwinge
Hi!

On Thu, 19 Dec 2013 01:44:08 -0800, Sharad Singhai sing...@google.com wrote:
 I ran 'make doc' and browsed the info output for basic sanity. Okay for trunk?

   * Makefile.in: Add optinfo.texi.
   * doc/optinfo.texi: New documentation for optimization info.
   * doc/passes.texi: Add new node.

Thanks for contributing to the documentation!

During build, I'm seeing the following warnings; would be great if you
could address these:

../../source/gcc/doc/optinfo.texi:45: warning: node next `Optimization 
groups' in menu `Dump output verbosity' and in sectioning `Dump files and 
streams' differ
../../source/gcc/doc/optinfo.texi:77: warning: node next `Dump files and 
streams' in menu `Dump types' and in sectioning `Dump output verbosity' differ
../../source/gcc/doc/optinfo.texi:77: warning: node prev `Dump files and 
streams' in menu `Dump output verbosity' and in sectioning `Optimization 
groups' differ
../../source/gcc/doc/optinfo.texi:104: warning: node next `Dump output 
verbosity' in menu `Dump files and streams' and in sectioning `Dump types' 
differ
../../source/gcc/doc/optinfo.texi:104: warning: node prev `Dump output 
verbosity' in menu `Optimization groups' and in sectioning `Dump files and 
streams' differ
../../source/gcc/doc/optinfo.texi:137: warning: node prev `Dump types' in 
menu `Dump files and streams' and in sectioning `Dump output verbosity' differ


Grüße,
 Thomas


pgpbEVl9Ts89I.pgp
Description: PGP signature


[PATCH] Documentation for dump and optinfo output

2013-12-19 Thread Sharad Singhai
I am really sorry, I forgot to add gcc internal documentation for dump
functions. Sorry about a very long delay.

The attached patch adds some documentation about how to use the new
dump infrastructure. This doc is attached to 'passes' documentation
node as that seemed the most logical place. Also, I am not sure what
level of details would be useful. I could perhaps add some more
details if needed.

I ran 'make doc' and browsed the info output for basic sanity. Okay for trunk?

Thanks,
Sharad
2013-12-19sing...@google.com

* Makefile.in: Add optinfo.texi.
* doc/optinfo.texi: New documentation for optimization info.
* doc/passes.texi: Add new node.

Index: Makefile.in
===
--- Makefile.in (revision 206105)
+++ Makefile.in (working copy)
@@ -2807,7 +2807,7 @@ TEXI_GCCINT_FILES = gccint.texi gcc-common.texi gc
 configfiles.texi collect2.texi headerdirs.texi funding.texi\
 gnu.texi gpl_v3.texi fdl.texi contrib.texi languages.texi  \
 sourcebuild.texi gty.texi libgcc.texi cfg.texi tree-ssa.texi   \
-loop.texi generic.texi gimple.texi plugins.texi
+loop.texi generic.texi gimple.texi plugins.texi optinfo.texi
 
 TEXI_GCCINSTALL_FILES = install.texi install-old.texi fdl.texi \
 gcc-common.texi gcc-vers.texi
Index: doc/optinfo.texi
===
--- doc/optinfo.texi(revision 0)
+++ doc/optinfo.texi(revision 0)
@@ -0,0 +1,208 @@
+@c Copyright (C) 2013 Free Software Foundation, Inc.
+@c This is part of the GCC manual.
+@c For copying conditions, see the file gcc.texi.
+
+@cindex optimization dumps
+
+This section is describes dump infrastructure which is common to both
+pass dumps as well as optimization dumps. The goal for this
+infrastructure is to provide both gcc developers and users detailed
+information about various compiler transformations and optimizations.
+
+@menu
+* Dump setup:: Setup of optimization dumps.
+* Optimization groups::Groups made up of optimization passes.
+* Dump output verbosity::  How much information to dump.
+* Dump output files and streams::  Output file names and streams.
+* Dump types:: Various types of dump functions.
+* Dump examples::  Sample usage.
+@end menu
+
+@node Dump setup
+@subsection Dump setup
+@cindex dump setup
+
+A dump_manager class is defined in @file{dumpfile.h}. Various passes
+register dumping pass-specific information via @code{dump_register} in
+@file{passes.c}. During registration, an optimization pass can select
+its optimization group (@pxref{Optimization groups}). Then the
+optimization information from the entire group can be output via
+command-line switches. Note that if a pass does not fit into any of
+the pre-defined groups, it can select @code{OPTGROUP_NONE}.
+
+In general, a pass need not worry about its dump output file name,
+whether certain flags are enabled, etc. However, for legacy reasons,
+passes could also call @code{dump_begin} which returns a stream in
+case the particular pass has optimization dumps enabled. A pass could
+call @code{dump_end} when the dump has ended. These methods should go
+away once all the passes are converted to use the new dump
+infrastructure.
+
+The recommended way to setup the dump output is via @code{dump_start}
+and @code{dump_end}.
+
+@node Optimization groups
+@subsection Optimization groups
+@cindex optimization groups
+The optimization passes are grouped into several categories. Currently
+defined categories in @file{dumpfile.h} are
+
+@ftable @code
+
+@item OPTGROUP_IPA
+IPA optimization passes. Enabled by @option{-ipa}
+
+@item OPTGROUP_LOOP
+Loop optimization passes. Enabled by @option{-loop}.
+
+@item OPTGROUP_INLINE
+Inlining passes. Enabled by @option{-inline}.
+
+@item OPTGROUP_VEC
+Vectorization passes. Enabled by @option{-vec}.
+
+@item OPTGROUP_OTHER
+All other optimization passes which do not fall into one of the above.
+
+@item OPTGROUP_ALL
+All optimization passes. Enabled by @option{-all}.
+
+@end ftable
+
+By using groups a user could selectively enable optimization
+information only for a group of passes. By default, the optimization
+information for all the passes is dumped.
+
+@node Dump output files and streams
+@subsection Dump output files and streams
+@cindex optimization info file names
+
+There are two separate output streams available for outputting
+optimization information from passes. Note that both these streams
+accept @code{stderr} and @code{stdout} as valid streams and thus it is
+possible to dump output to standard output or error. This is specially
+handy for outputting all available information in a single file by
+redirecting @code{stderr}.
+
+@table @code
+@item @code{pstream}
+This stream is for pass-specific dump output. For example,

Re: [PATCH] Documentation for dump and optinfo output

2013-12-19 Thread Richard Biener
On Thu, 19 Dec 2013, Sharad Singhai wrote:

 I am really sorry, I forgot to add gcc internal documentation for dump
 functions. Sorry about a very long delay.
 
 The attached patch adds some documentation about how to use the new
 dump infrastructure. This doc is attached to 'passes' documentation
 node as that seemed the most logical place. Also, I am not sure what
 level of details would be useful. I could perhaps add some more
 details if needed.
 
 I ran 'make doc' and browsed the info output for basic sanity. Okay for trunk?

Ok.

Thanks,
Richard.