public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Don't enable -fprefetch-loop-arrays for TARGET_SOFTWARE_PREFETCHING_BENEFICIAL if -Os
@ 2015-04-10  6:35 Uros Bizjak
  0 siblings, 0 replies; 2+ messages in thread
From: Uros Bizjak @ 2015-04-10  6:35 UTC (permalink / raw)
  To: gcc-patches; +Cc: Joseph S. Myers

Hello!

> Testing an x86_64 toolchain configured for a processor with
> TARGET_SOFTWARE_PREFETCHING_BENEFICIAL produces failures
>
> FAIL: g++.dg/pr60518.C  -std=gnu++98 (test for excess errors)
> FAIL: g++.dg/pr60518.C  -std=gnu++11 (test for excess errors)
> FAIL: g++.dg/pr60518.C  -std=gnu++14 (test for excess errors)
>
> where the failure is from the message "pr60518.C:1:0: warning:
> -fprefetch-loop-arrays is not supported with -Os".
>
> Given that lack of support, it seems appropriate for the back end not
> to enable this option in the -Os case; this patch implements that.
>
> Bootstrapped with no regressions on x86_64-unknown-linux-gnu; tested
> for a cross to x86_64-linux-gnu --with-arch=btver2, where those test
> failures duly disappear.  OK to commit?
>
> 2015-04-09  Joseph Myers  <joseph@codesourcery.com>
>
>    * config/i386/i386.c (ix86_option_override_internal): Don't set
>    -fprefetch-loop-arrays if optimizing for size.

OK.

Thanks,
Uros.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Don't enable -fprefetch-loop-arrays for TARGET_SOFTWARE_PREFETCHING_BENEFICIAL if -Os
@ 2015-04-09 22:06 Joseph Myers
  0 siblings, 0 replies; 2+ messages in thread
From: Joseph Myers @ 2015-04-09 22:06 UTC (permalink / raw)
  To: gcc-patches

Testing an x86_64 toolchain configured for a processor with
TARGET_SOFTWARE_PREFETCHING_BENEFICIAL produces failures

FAIL: g++.dg/pr60518.C  -std=gnu++98 (test for excess errors)
FAIL: g++.dg/pr60518.C  -std=gnu++11 (test for excess errors)
FAIL: g++.dg/pr60518.C  -std=gnu++14 (test for excess errors)

where the failure is from the message "pr60518.C:1:0: warning:
-fprefetch-loop-arrays is not supported with -Os".

Given that lack of support, it seems appropriate for the back end not
to enable this option in the -Os case; this patch implements that.

Bootstrapped with no regressions on x86_64-unknown-linux-gnu; tested
for a cross to x86_64-linux-gnu --with-arch=btver2, where those test
failures duly disappear.  OK to commit?

2015-04-09  Joseph Myers  <joseph@codesourcery.com>

	* config/i386/i386.c (ix86_option_override_internal): Don't set
	-fprefetch-loop-arrays if optimizing for size.

Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c	(revision 221936)
+++ gcc/config/i386/i386.c	(working copy)
@@ -4168,6 +4168,7 @@ ix86_option_override_internal (bool main_args_p,
   if (opts->x_flag_prefetch_loop_arrays < 0
       && HAVE_prefetch
       && (opts->x_optimize >= 3 || opts->x_flag_profile_use)
+      && !opts->x_optimize_size
       && TARGET_SOFTWARE_PREFETCHING_BENEFICIAL)
     opts->x_flag_prefetch_loop_arrays = 1;
 

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-10  6:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-10  6:35 Don't enable -fprefetch-loop-arrays for TARGET_SOFTWARE_PREFETCHING_BENEFICIAL if -Os Uros Bizjak
  -- strict thread matches above, loose matches on Subject: below --
2015-04-09 22:06 Joseph Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).