From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7536 invoked by alias); 23 Jan 2018 13:18:14 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 7485 invoked by uid 89); 23 Jan 2018 13:18:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=honest X-HELO: mail-qt0-f195.google.com Received: from mail-qt0-f195.google.com (HELO mail-qt0-f195.google.com) (209.85.216.195) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 23 Jan 2018 13:18:05 +0000 Received: by mail-qt0-f195.google.com with SMTP id s39so1092260qth.7 for ; Tue, 23 Jan 2018 05:18:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=6f943fI5ooKT8HiL0dKNlFoJT5AjGweBH/BRgQzuJd4=; b=r2vwLvt4oCAB1vvDcHWNJvDC93JZlQ4oCs82QJgzCrtG+4rPSTMHfbx86Xgdk22E1F 6WIUELgofZVjNIAGjEV8GM5IRad70VhgZEurEdPeLD1gsnf9zS8mTVG5jOwNr8Min4Ww NWxHB9iDsrb0LksXqTPkjv8kTYtlSbM3ZO/59nEn5CjfKlXt89sK5vGI0RZmQ0tDHGfq GdzIjv49aIH1PNOlyzA/Kx3xxJQh3dqoh++qq6Z9o0bKy7e8/35wYWJmDb8U5m9Vkhcb juqMkj43PZ28K3CjYRuBI/mrfgxR96jeSKieTm2puyk2F7UPg4uQVSo2afItyrUkWoG4 rKKw== X-Gm-Message-State: AKwxytd3FEwPZVvmUTnxnZp3BIpHJs7NCRmYsbulZqux3+P4ynFEz/0L FeUESlj7robUcR/nOUuz3axioA== X-Google-Smtp-Source: AH8x225kEdVdrgBe1jCOcy4h0UwCz9GJauSMcLU4/S4vQk1T3h1bbMIH7sA6cupO0IamoYG1FFpQQg== X-Received: by 10.200.42.233 with SMTP id c38mr3631640qta.310.1516713483565; Tue, 23 Jan 2018 05:18:03 -0800 (PST) Received: from [192.168.1.107] ([177.180.105.91]) by smtp.gmail.com with ESMTPSA id v185sm6418706qkd.44.2018.01.23.05.18.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Jan 2018 05:18:02 -0800 (PST) Subject: Re: [PATCH 2/2] Introduce prefetch-dynamic-strides option. To: Kyrill Tkachov , "gcc-patches@gcc.gnu.org" Cc: James Greenhalgh , Richard Earnshaw References: <1516628770-25036-1-git-send-email-luis.machado@linaro.org> <1516628770-25036-3-git-send-email-luis.machado@linaro.org> <5A670303.1090706@foss.arm.com> From: Luis Machado Message-ID: <79ae8f4a-2967-3771-8ba5-b1d200bf59da@linaro.org> Date: Tue, 23 Jan 2018 13:32:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <5A670303.1090706@foss.arm.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg01949.txt.bz2 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