Commit 057f8f20 by Andi Kleen Committed by Andi Kleen

Add -flto-report-wpa

-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.

gcc/:

2013-04-22  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.

From-SVN: r198172
parent 86210f13
2013-04-22 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.
2013-04-22 Xinliang David Li <davidxl@google.com> 2013-04-22 Xinliang David Li <davidxl@google.com>
* graph.c (draw_cfg_node_succ_edges): Add branch probility as label. * graph.c (draw_cfg_node_succ_edges): Add branch probility as label.
......
...@@ -1504,6 +1504,10 @@ flto-report ...@@ -1504,6 +1504,10 @@ flto-report
Common Report Var(flag_lto_report) Init(0) Common Report Var(flag_lto_report) Init(0)
Report various link-time optimization statistics 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 fmath-errno
Common Report Var(flag_errno_math) Init(1) Optimization SetByCombined Common Report Var(flag_errno_math) Init(1) Optimization SetByCombined
Set errno after built-in math functions Set errno after built-in math functions
......
...@@ -379,7 +379,7 @@ Objective-C and Objective-C++ Dialects}. ...@@ -379,7 +379,7 @@ Objective-C and Objective-C++ Dialects}.
-fivopts -fkeep-inline-functions -fkeep-static-consts @gol -fivopts -fkeep-inline-functions -fkeep-static-consts @gol
-floop-block -floop-interchange -floop-strip-mine -floop-nest-optimize @gol -floop-block -floop-interchange -floop-strip-mine -floop-nest-optimize @gol
-floop-parallelize-all -flto -flto-compression-level @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 -fmerge-constants -fmodulo-sched -fmodulo-sched-allow-regmoves @gol
-fmove-loop-invariants fmudflap -fmudflapir -fmudflapth -fno-branch-count-reg @gol -fmove-loop-invariants fmudflap -fmudflapir -fmudflapth -fno-branch-count-reg @gol
-fno-default-inline @gol -fno-default-inline @gol
...@@ -8455,6 +8455,10 @@ files in LTO mode (via @option{-flto}). ...@@ -8455,6 +8455,10 @@ files in LTO mode (via @option{-flto}).
Disabled by default. 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 @item -fuse-linker-plugin
Enables the use of a linker plugin during link-time optimization. This 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 option relies on plugin support in the linker, which is available in gold
......
...@@ -3274,7 +3274,7 @@ do_whole_program_analysis (void) ...@@ -3274,7 +3274,7 @@ do_whole_program_analysis (void)
} }
/* Show the LTO report before launching LTRANS. */ /* 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 (); print_lto_report_1 ();
if (mem_report_wpa) if (mem_report_wpa)
dump_memory_report (true); dump_memory_report (true);
...@@ -3402,7 +3402,7 @@ lto_main (void) ...@@ -3402,7 +3402,7 @@ lto_main (void)
print_lto_report before launching LTRANS. If LTRANS was print_lto_report before launching LTRANS. If LTRANS was
launched directly by the driver we would not need to do launched directly by the driver we would not need to do
this. */ this. */
if (flag_lto_report) if (flag_lto_report || (flag_wpa && flag_lto_report_wpa))
print_lto_report_1 (); print_lto_report_1 ();
/* Record the global variables. */ /* Record the global variables. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment