This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: -fwhopr and -flto options reorg


Hello Jan,

some nits in addition to David's:

* Jan Hubicka wrote on Fri, Nov 12, 2010 at 06:18:52PM CET:
> --- invoke.texi	(revision 166652)
> +++ invoke.texi	(working copy)

> @@ -7455,6 +7455,22 @@ file.  When the object files are linked 
>  bodies are read from these ELF sections and instantiated as if they
>  had been part of the same translation unit.
>  
> +If you specify the optional @var{n} the link stage is executed in
> +parallel using @var{n} parallel jobs by utilizing an installed
> +@command{make} program.  The environment variable @env{MAKE} may be
> +used to override the program used.  See also option
> +@option{--param lto-partitions=@var{value}}). GCC by default split
> +program to fixed number of partitions.

splits the.  But how about:

By default, GCC splits the program into a fixed number of ...
partitions.

> This parameter can be used
> +to increase the parallelism and also to reduce memory usage in the
> +later stage of link time optimization process.

stages?

> +You can also specify @option{-flto=jobserver} to use GNU make's 
> +job server mode to determine the number of parallel jobs. This 

Two spaces after period; more instances below.

> +is useful when the Makefile calling GCC is already parallel.

s/parallel/run in &/  ?

> +The parent Makefile will need a @samp{+} prepended to the command recipe
> +for this to work. This will likely only work if @env{MAKE} is 
> +GNU make.
> +
>  To use the link-timer optimizer, @option{-flto} needs to be specified at
>  compile time and during the final link.  For example,
>  
> @@ -7489,6 +7505,14 @@ The only important thing to keep in mind
>  optimizations the @option{-flto} flag needs to be passed to both the
>  compile and the link commands.
>  
> +To make while program optimization effective, it is neccesary to make certain
> +level of whole program assumptions.

I don't understand this sentence.  s/while /whole-/  ?
'certain level' sounds like there's a compiler knob to turn.
How about  s/level of //  ?

>  Compiler needs to know what functions and

The compiler

> +variables can be accessed by libraries and runtime outside of the link time
> +optimized unit.  When supported by linker, the linker plugin (see

the linker

> +@option{-fuse-linker-plugin}) pass to the compiler information about used and

passes information about ... and ... to the compiler

> +externally visible symbols. When linker plugin is not availble,
> +@option{-fwhole-program} should be used to get goo code quality.

s/goo/&d/

>  Note that when a file is compiled with @option{-flto}, the generated
>  object file will be larger than a regular object file because it will
>  contain GIMPLE bytecodes and the usual final code.  This means that
> @@ -7603,23 +7627,11 @@ Link time optimization does not play wel
>  information.  Combining @option{-flto} with
>  @option{-g} is experimental.
>  
> -If you specify the optional @var{n} the link stage is executed in
> -parallel using @var{n} parallel jobs by utilizing an installed
> -@command{make} program.  The environment variable @env{MAKE} may be
> -used to override the program used.
> -
> -You can also specify @option{-fwhopr=jobserver} to use GNU make's 
> -job server mode to determine the number of parallel jobs. This 
> -is useful when the Makefile calling GCC is already parallel.
> -The parent Makefile will need a @samp{+} prepended to the command recipe
> -for this to work. This will likely only work if @env{MAKE} is 
> -GNU make.
> -
>  This option is disabled by default.
>  
>  @item -flto-partition=@var{alg}
>  @opindex flto-partition
> -Specify partitioning algorithm used by @option{-fwhopr} mode.  The value is
> +Specify partitioning algorithm used by link time optimizer.  The value is

the link time optimizer

>  either @code{1to1} to specify partitioning corresponding to source files
>  or @code{balanced} to specify partitioning into, if possible, equally sized
>  chunks.  Specifying @code{none} as an algorithm disables partitioning
> @@ -7629,22 +7641,21 @@ The default value is @code{balanced}.
>  @item -fwpa
>  @opindex fwpa
>  This is an internal option used by GCC when compiling with
> -@option{-fwhopr}.  You should never need to use it.
> +@option{-flto} with partitioning enabled.  You should never need to use it.
>  
> -This option runs the link-time optimizer in the whole-program-analysis
> -(WPA) mode, which reads in summary information from all inputs and
> -performs a whole-program analysis based on summary information only.
> -It generates object files for subsequent runs of the link-time
> -optimizer where individual object files are optimized using both
> -summary information from the WPA mode and the actual function bodies.
> -It then drives the LTRANS phase.
> +This option runs the serial part of link-time optimizer performing the

the link-time optimizer.  Please use one of 'link time' or 'link-time'
only, throughout.

> +inter-procedural propagation (WPA mode). Compiler reads in summary information

The compiler

> +from all inputs and performs an analysis based on summary information only.  It
> +generates object files for subsequent runs of the link-time optimizer where
> +individual object files are optimized using both summary information from the
> +WPA mode and the actual function bodies.  It then drives the LTRANS phase.
>  
>  Disabled by default.
>  
>  @item -fltrans
>  @opindex fltrans
>  This is an internal option used by GCC when compiling with
> -@option{-fwhopr}.  You should never need to use it.
> +@option{-flto} with partitioning enabled.  You should never need to use it.
>  
>  This option runs the link-time optimizer in the local-transformation (LTRANS)
>  mode, which reads in output from a previous run of the LTO in WPA mode.
> @@ -7655,7 +7666,7 @@ Disabled by default.
>  @item -fltrans-output-list=@var{file}
>  @opindex fltrans-output-list
>  This is an internal option used by GCC when compiling with
> -@option{-fwhopr}.  You should never need to use it.
> +@option{-lto}.  You should never need to use it.
>  
>  This option specifies a file to which the names of LTRANS output files are
>  written.  This option is only meaningful in conjunction with @option{-fwpa}.
> @@ -7665,7 +7676,7 @@ Disabled by default.
>  @item -flto-compression-level=@var{n}
>  This option specifies the level of compression used for intermediate
>  language written to LTO object files, and is only meaningful in
> -conjunction with LTO mode (@option{-fwhopr}, @option{-flto}).  Valid
> +conjunction with LTO mode (@option{-flto}).  Valid
>  values are 0 (no compression) to 9 (maximum compression).  Values
>  outside this range are clamped to either 0 or 9.  If the option is not
>  given, a default balanced compression setting is used.
> @@ -7674,7 +7685,7 @@ given, a default balanced compression se
>  Prints a report with internal details on the workings of the link-time
>  optimizer.  The contents of this report vary from version to version,
>  it is meant to be useful to GCC developers when processing object
> -files in LTO mode (via @option{-fwhopr} or @option{-flto}).
> +files in LTO mode (via @option{-flto}).
>  
>  Disabled by default.
>  

Thanks,
Ralf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]