Patchwork Fix PR58250

login
register
mail settings
Submitter Markus Trippelsdorf
Date Aug. 30, 2013, 12:25 p.m.
Message ID <20130830122544.GA715@x4>
Download mbox | patch
Permalink /patch/271253/
State New
Headers show

Comments

Markus Trippelsdorf - Aug. 30, 2013, 12:25 p.m.
During an LTO/PGO Firefox build one gets countless warnings:
  warning: -fprefetch-loop-arrays is not supported with -Os

This happens because flag_prefetch_loop_arrays is always set during the
profile-use phase.
Fix by following the suggestion of Jakub and disable prefetching of
loop_arrays when optimizing for size.

Please apply if the patch looks OK.
Thanks.

2013-08-30  Markus Trippelsdorf  <markus@trippelsdorf.de>

	* config/i386/i386.c (ix86_option_override_internal): Only
	prefetch loop_arrays during profile_use when not optimizing for
	size.

Patch

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index a8d70bc..f385db4 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -3952,7 +3952,7 @@  ix86_option_override_internal (bool main_args_p)
   /* Enable sw prefetching at -O3 for CPUS that prefetching is helpful.  */
   if (flag_prefetch_loop_arrays < 0
       && HAVE_prefetch
-      && (optimize >= 3 || flag_profile_use)
+      && (optimize >= 3 || (flag_profile_use && !optimize_size))
       && TARGET_SOFTWARE_PREFETCHING_BENEFICIAL)
     flag_prefetch_loop_arrays = 1;