This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 7/9] Add -flto-report-wpa
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Andi Kleen <andi at firstfloor dot org>
- Cc: gcc-patches at gcc dot gnu dot org, hubicka at ucw dot cz, Andi Kleen <ak at linux dot intel dot com>
- Date: Mon, 22 Apr 2013 13:53:29 +0200
- Subject: Re: [PATCH 7/9] Add -flto-report-wpa
- References: <1366407117-18462-1-git-send-email-andi at firstfloor dot org> <1366407117-18462-8-git-send-email-andi at firstfloor dot org>
On Fri, Apr 19, 2013 at 11:31 PM, Andi Kleen <andi@firstfloor.org> wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> -flto-report is useful, but it prints for every LTRANS pass and
> is very noisy and the main problem is often in WPA only.
>
> Add a new -flto-report-wpa option that is only printed for WPA.
Ok.
Thanks,
Richard.
> gcc/:
>
> 2013-04-19 Andi Kleen <ak@linux.intel.com>
>
> * common.opt (-flto-report-wpa): Add.
> * doc/invoke.texi (-flto-report-wpa): Add.
> * lto/lto.c (do_whole_program_analysis): Check for lto-report-wpa.
> (lto_main): dito.
> ---
> gcc/common.opt | 4 ++++
> gcc/doc/invoke.texi | 6 +++++-
> gcc/lto/lto.c | 4 ++--
> 3 files changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/common.opt b/gcc/common.opt
> index f0cb9e8..8be32e5 100644
> --- a/gcc/common.opt
> +++ b/gcc/common.opt
> @@ -1504,6 +1504,10 @@ flto-report
> Common Report Var(flag_lto_report) Init(0)
> Report various link-time optimization statistics
>
> +flto-report-wpa
> +Common Report Var(flag_lto_report_wpa) Init(0)
> +Report various link-time optimization statistics for WPA only
> +
> fmath-errno
> Common Report Var(flag_errno_math) Init(1) Optimization SetByCombined
> Set errno after built-in math functions
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index 782b569..034845d 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -379,7 +379,7 @@ Objective-C and Objective-C++ Dialects}.
> -fivopts -fkeep-inline-functions -fkeep-static-consts @gol
> -floop-block -floop-interchange -floop-strip-mine -floop-nest-optimize @gol
> -floop-parallelize-all -flto -flto-compression-level @gol
> --flto-partition=@var{alg} -flto-report -fmerge-all-constants @gol
> +-flto-partition=@var{alg} -flto-report -flto-report-wpa -fmerge-all-constants @gol
> -fmerge-constants -fmodulo-sched -fmodulo-sched-allow-regmoves @gol
> -fmove-loop-invariants fmudflap -fmudflapir -fmudflapth -fno-branch-count-reg @gol
> -fno-default-inline @gol
> @@ -8455,6 +8455,10 @@ files in LTO mode (via @option{-flto}).
>
> Disabled by default.
>
> +@item -flto-report-wpa
> +Like @option{-flto-report}, but only print for the WPA phase of Link
> +Time Optimization.
> +
> @item -fuse-linker-plugin
> Enables the use of a linker plugin during link-time optimization. This
> option relies on plugin support in the linker, which is available in gold
> diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c
> index 4aaf2dc..dbef690 100644
> --- a/gcc/lto/lto.c
> +++ b/gcc/lto/lto.c
> @@ -3287,7 +3287,7 @@ do_whole_program_analysis (void)
> }
>
> /* Show the LTO report before launching LTRANS. */
> - if (flag_lto_report)
> + if (flag_lto_report || (flag_wpa && flag_lto_report_wpa))
> print_lto_report_1 ();
> if (mem_report_wpa)
> dump_memory_report (true);
> @@ -3415,7 +3415,7 @@ lto_main (void)
> print_lto_report before launching LTRANS. If LTRANS was
> launched directly by the driver we would not need to do
> this. */
> - if (flag_lto_report)
> + if (flag_lto_report || (flag_wpa && flag_lto_report_wpa))
> print_lto_report_1 ();
>
> /* Record the global variables. */
> --
> 1.8.1.4
>