public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] Do not enable -fprefetch-loop-arrays with -fprofile-use (PR, gcov-profile/58250).
@ 2016-08-03  9:54 Martin Liška
  2016-08-03 13:28 ` Richard Biener
  0 siblings, 1 reply; 3+ messages in thread
From: Martin Liška @ 2016-08-03  9:54 UTC (permalink / raw)
  To: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 191 bytes --]

Hi.

I've just grabbed patch a that was suggested in the PR (and IMHO makes sense).

Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.

Ready to be installed?
Martin

[-- Attachment #2: 0001-Do-not-enable-fprefetch-loop-arrays-with-fprofile-us.patch --]
[-- Type: text/x-patch, Size: 1092 bytes --]

From e75e997f05d547017b3a962069fa4d1b024420cd Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Tue, 2 Aug 2016 09:21:22 +0200
Subject: [PATCH] Do not enable -fprefetch-loop-arrays with -fprofile-use (PR
 gcov-profile/58250).

gcc/ChangeLog:

2016-08-02  Martin Liska  <mliska@suse.cz>

	* config/i386/i386.c (ix86_option_override_internal):
	Do not enable -fprefetch-loop-arrays with -fprofile-use.
---
 gcc/config/i386/i386.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7c8bb17..91cea25 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -5847,7 +5847,7 @@ ix86_option_override_internal (bool main_args_p,
   /* Enable sw prefetching at -O3 for CPUS that prefetching is helpful.  */
   if (opts->x_flag_prefetch_loop_arrays < 0
       && HAVE_prefetch
-      && (opts->x_optimize >= 3 || opts->x_flag_profile_use)
+      && opts->x_optimize >= 3
       && !opts->x_optimize_size
       && TARGET_SOFTWARE_PREFETCHING_BENEFICIAL)
     opts->x_flag_prefetch_loop_arrays = 1;
-- 
2.9.2


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

* Re: [PATCH] Do not enable -fprefetch-loop-arrays with -fprofile-use (PR, gcov-profile/58250).
  2016-08-03  9:54 [PATCH] Do not enable -fprefetch-loop-arrays with -fprofile-use (PR, gcov-profile/58250) Martin Liška
@ 2016-08-03 13:28 ` Richard Biener
  2016-08-03 13:40   ` Martin Liška
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Biener @ 2016-08-03 13:28 UTC (permalink / raw)
  To: Martin Liška; +Cc: GCC Patches

On Wed, Aug 3, 2016 at 11:54 AM, Martin Liška <mliska@suse.cz> wrote:
> Hi.
>
> I've just grabbed patch a that was suggested in the PR (and IMHO makes sense).
>
> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>
> Ready to be installed?

Err, but what was suggested, not enable it with -Os is already done - you
disable it unconditionally?

Richard.

> Martin

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

* Re: [PATCH] Do not enable -fprefetch-loop-arrays with -fprofile-use (PR, gcov-profile/58250).
  2016-08-03 13:28 ` Richard Biener
@ 2016-08-03 13:40   ` Martin Liška
  0 siblings, 0 replies; 3+ messages in thread
From: Martin Liška @ 2016-08-03 13:40 UTC (permalink / raw)
  To: Richard Biener; +Cc: GCC Patches

On 08/03/2016 03:28 PM, Richard Biener wrote:
> On Wed, Aug 3, 2016 at 11:54 AM, Martin Liška <mliska@suse.cz> wrote:
>> Hi.
>>
>> I've just grabbed patch a that was suggested in the PR (and IMHO makes sense).
>>
>> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
>>
>> Ready to be installed?
> 
> Err, but what was suggested, not enable it with -Os is already done - you
> disable it unconditionally?

Sorry, I was wrong ;) Looks the bug is fixed since r222033, where following hunk was added:

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 110ec4a..b442da9 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -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;

I'm going to close the PR.

Martin

> 
> Richard.
> 
>> Martin

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

end of thread, other threads:[~2016-08-03 13:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-03  9:54 [PATCH] Do not enable -fprefetch-loop-arrays with -fprofile-use (PR, gcov-profile/58250) Martin Liška
2016-08-03 13:28 ` Richard Biener
2016-08-03 13:40   ` Martin Liška

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