This is the mail archive of the 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]

[PATCH] Fix PR58250

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.

2013-08-30  Markus Trippelsdorf  <>

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

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))
     flag_prefetch_loop_arrays = 1;


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