This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [lto] Add -flto-report
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: Diego Novillo <dnovillo at google dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Ian Taylor <iant at google dot com>
- Date: Tue, 3 Mar 2009 07:27:05 +0100
- Subject: Re: [lto] Add -flto-report
- References: <20090224215011.GA12807@google.com> <b798aad50903021634i26dc05c9q70f635b6150d3929@mail.gmail.com>
Hello Diego,
a couple of trivial nits:
* Diego Novillo wrote on Tue, Mar 03, 2009 at 01:34:09AM CET:
> --- doc/invoke.texi (revision 144416)
> +++ doc/invoke.texi (revision 144417)
> @@ -6707,6 +6707,32 @@ compilation unit, not for the single sou
>
> This option is not supported for Fortran programs.
>
> +@item -flto
> +@opindex flto
> +This option runs the standard link-time optimizer. When invoked
> +with source code, it generates GIMPLE and writes it to special
> +ELF sections in the object file. When the object files are
> +linked together, all the function bodies are read from these ELF
> +sections and instantiated as if they had been part of the same
> +translation unit.
> +
> +Disabled by default.
> +
> +@item -flto
> +@opindex flto
> +This option is similar to @option{-flto}
No, actually, it is the same! :-)
I guess you mean -fwhopr in the @item and @opindex here.
> but it differs in how
> +the final link stage is executed. Instead of loading all the
> +function bodies in memory, the callgraph is analyzed and
> +optimization decisions are made (whole program analysis or WPA).
> +Once optimizations decisions are made, the callgraph is
s/optimizations/optimization/
> +partitioned and the different sections are compiled separately
> +(local transformations or LTRANS). This process allows
> +optimizations on very large programs that otherwise would not fit
> +in memory. This option enables @option{-fwpa} and
> +@option{-fltrans} automatically.
> +
> +Disabled by default.
> +
> @item -fwpa
> @opindex fwpa
> This option runs the link-time optimizer in the whole-program-analysis (WPA)
> @@ -6746,6 +6772,12 @@ written. This option is only meaningful
>
> Disabled by default.
>
> +@item -flto-report
> +This option is only useful when processing object files in LTO
> +mode (via -fwhopr or -flto).
> +
> +Disabled by default.
> +
> @item -fcprop-registers
> @opindex fcprop-registers
> After register allocation and post-register allocation instruction splitting,
Cheers,
Ralf