public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Luis Machado <luis.machado@linaro.org>
To: Kyrill Tkachov <kyrylo.tkachov@foss.arm.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: James Greenhalgh <James.Greenhalgh@arm.com>,
	Richard Earnshaw <Richard.Earnshaw@arm.com>
Subject: Re: [PATCH 2/2] Introduce prefetch-dynamic-strides option.
Date: Tue, 23 Jan 2018 13:32:00 -0000	[thread overview]
Message-ID: <79ae8f4a-2967-3771-8ba5-b1d200bf59da@linaro.org> (raw)
In-Reply-To: <5A670303.1090706@foss.arm.com>

Hi,

On 01/23/2018 07:40 AM, Kyrill Tkachov wrote:
> Hi Luis,
> 
> On 22/01/18 13:46, Luis Machado wrote:
>> The following patch adds an option to control software prefetching of 
>> memory
>> references with non-constant/unknown strides.
>>
>> Currently we prefetch these references if the pass thinks there is 
>> benefit to
>> doing so. But, since this is all based on heuristics, it's not always 
>> the case
>> that we end up with better performance.
>>
>> For Falkor there is also the problem of conflicts with the hardware 
>> prefetcher,
>> so we need to be more conservative in terms of what we issue software 
>> prefetch
>> hints for.
>>
>> This also aligns GCC with what LLVM does for Falkor.
>>
>> Similarly to the previous patch, the defaults guarantee no change in 
>> behavior
>> for other targets and architectures.
>>
>> I've regression-tested and bootstrapped it on aarch64-linux. No 
>> problems found.
>>
>> Ok?
>>
> 
> This also looks like a sensible approach to me with a caveat inline.
> The same general comments as for patch [1/2] apply.
>> diff --git a/gcc/config/aarch64/aarch64-protos.h 
>> b/gcc/config/aarch64/aarch64-protos.h
>> index 8736bd9..22bd9ae 100644
>> --- a/gcc/config/aarch64/aarch64-protos.h
>> +++ b/gcc/config/aarch64/aarch64-protos.h
>> @@ -230,6 +230,9 @@ struct cpu_prefetch_tune
>>    const int l1_cache_size;
>>    const int l1_cache_line_size;
>>    const int l2_cache_size;
>> +  /* Whether software prefetch hints should be issued for non-constant
>> +     strides.  */
>> +  const unsigned int prefetch_dynamic_strides;
> 
> I understand that the midend PARAMs are defined as integers, but I think
> the backend tuning option here is better represented as a boolean as it 
> really
> is just a yes/no decision.
>
I started off with a boolean to be honest. Then i noticed the midend 
only used integers, which i restricted to the range of 0..1.

I'll change this locally to use booleans again.

Thanks!
Luis

  reply	other threads:[~2018-01-23 13:18 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22 13:46 [PATCH 0/2] Add a couple new options to control loop prefetch pass Luis Machado
2018-01-22 14:01 ` [PATCH 1/2] Introduce prefetch-minimum stride option Luis Machado
2018-01-23  9:46   ` Kyrill Tkachov
2018-01-23 13:23     ` Luis Machado
2018-05-01 18:30   ` Jeff Law
2018-05-07 14:10     ` Luis Machado
2018-05-07 15:15       ` H.J. Lu
2018-05-07 15:51         ` Luis Machado
2018-05-14 21:21   ` Luis Machado
2018-05-15  9:59     ` Kyrill Tkachov
2018-05-15 11:21       ` Luis Machado
2018-05-16  9:22         ` Kyrill Tkachov
2018-05-16 11:53           ` Luis Machado
2018-05-22 18:56             ` Luis Machado
2018-05-22 21:21               ` Jeff Law
2018-05-23 20:27               ` H.J. Lu
2018-05-23 22:34                 ` Luis Machado
2018-05-23 22:41                   ` H.J. Lu
2018-05-23 22:42                     ` H.J. Lu
2018-05-23 22:45                       ` H.J. Lu
2018-05-23 23:29                         ` Luis Machado
2018-05-24  2:51                           ` Jeff Law
2018-05-24 12:21                             ` Luis Machado
2018-01-22 14:10 ` [PATCH 2/2] Introduce prefetch-dynamic-strides option Luis Machado
2018-01-23  9:53   ` Kyrill Tkachov
2018-01-23 13:32     ` Luis Machado [this message]
2018-05-01 18:31   ` Jeff Law
2018-05-07 14:13     ` Luis Machado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=79ae8f4a-2967-3771-8ba5-b1d200bf59da@linaro.org \
    --to=luis.machado@linaro.org \
    --cc=James.Greenhalgh@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kyrylo.tkachov@foss.arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).