From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 96560 invoked by alias); 22 May 2018 18:55:34 -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 96551 invoked by uid 89); 22 May 2018 18:55:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-12.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=substantial, (unknown) X-HELO: mail-yw0-f193.google.com Received: from mail-yw0-f193.google.com (HELO mail-yw0-f193.google.com) (209.85.161.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 22 May 2018 18:55:31 +0000 Received: by mail-yw0-f193.google.com with SMTP id h11-v6so5106105ywc.8 for ; Tue, 22 May 2018 11:55:31 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=oukEwalHB86JS2bOOexAl3+YVXd/kRAkzSm35MmQBfc=; b=dqPJ9dfKfRWFJhyu6X9oLxfJaBRzMG/uxEVtC/sIvkH6mq+drt1aw9LgcfVhRdtnaQ iNHvajp136uAn4KmPs+g5okqDzREDpyAw/ANiaOnZD7OJKBrhjChDw+ic1obS+1mCE6J AOzUEcYHFAz0vCwBTdT2g+QJ6FO6EzBc/ypXhUbApvAnftgYdc1lOQ5NaUm9yfRJ3WLD DQDOqMdxtM3x2Vb42A/n1XmxbIvHvqIZs6D1uUMaktB0MLiinv8w3Ea0CqymmColyuul d32a0xAtRBZtdwhRD7rFGDClMWK6LsuKGnLO75P5w+cFqopuuzi+0jw5F+khYyYOvULM xnBA== X-Gm-Message-State: ALKqPwdWK5yYbmAVkA4cflUw6DGrRsif5rHO4jL9ueRizuOYNmXnUysH zf66aUlo/ujeZIAfoouHHq08pg== X-Google-Smtp-Source: AB8JxZp4OKJgVLa1WQ97f+E36ZYlFB740Q7UTC1GcUGrezsoShWp+4LXb3qZNrZf8w4ji8Qz9hFnlQ== X-Received: by 2002:a81:6c06:: with SMTP id h6-v6mr157457ywc.357.1527015330050; Tue, 22 May 2018 11:55:30 -0700 (PDT) Received: from [192.168.1.15] (c-69-243-238-236.hsd1.al.comcast.net. [69.243.238.236]) by smtp.gmail.com with ESMTPSA id 138-v6sm3812112ywq.6.2018.05.22.11.55.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 May 2018 11:55:29 -0700 (PDT) Subject: Re: [PATCH 1/2] Introduce prefetch-minimum stride option From: Luis Machado To: Kyrill Tkachov , gcc-patches@gcc.gnu.org Cc: james.greenhalgh@arm.com, Richard.Earnshaw@arm.com, "H.J. Lu" , Jeff Law References: <1516628770-25036-1-git-send-email-luis.machado@linaro.org> <1516628770-25036-2-git-send-email-luis.machado@linaro.org> <468c1099-3a87-6e95-53c4-3ba62fe3472f@linaro.org> <5AFAAA57.2080501@foss.arm.com> <3b4ec84e-5902-f7de-f047-282c3b3fff08@linaro.org> <5AFBF522.5040805@foss.arm.com> <41528915-fb50-7c59-f476-f5c085621bc8@linaro.org> Message-ID: <12caffd9-81c4-1a29-429a-6fd712db08d8@linaro.org> Date: Tue, 22 May 2018 18:56:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <41528915-fb50-7c59-f476-f5c085621bc8@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-05/txt/msg01176.txt.bz2 On 05/16/2018 08:18 AM, Luis Machado wrote: > > > On 05/16/2018 06:08 AM, Kyrill Tkachov wrote: >> >> On 15/05/18 12:12, Luis Machado wrote: >>> Hi, >>> >>> On 05/15/2018 06:37 AM, Kyrill Tkachov wrote: >>>> Hi Luis, >>>> >>>> On 14/05/18 22:18, Luis Machado wrote: >>>>> Hi, >>>>> >>>>> Here's an updated version of the patch (now reverted) that >>>>> addresses the previous bootstrap problem (signedness and long >>>>> long/int conversion). >>>>> >>>>> I've checked that it bootstraps properly on both aarch64-linux and >>>>> x86_64-linux and that tests look sane. >>>>> >>>>> James, would you please give this one a try to see if you can still >>>>> reproduce PR85682? I couldn't reproduce it in multiple attempts. >>>>> >>>> >>>> The patch doesn't hit the regressions in PR85682 from what I can see. >>>> I have a comment on the patch below. >>>> >>> >>> Great. Thanks for checking Kyrill. >>> >>>> --- a/gcc/tree-ssa-loop-prefetch.c >>>> +++ b/gcc/tree-ssa-loop-prefetch.c >>>> @@ -992,6 +992,23 @@ prune_by_reuse (struct mem_ref_group *groups) >>>>   static bool >>>>   should_issue_prefetch_p (struct mem_ref *ref) >>>>   { >>>> +  /* Some processors may have a hardware prefetcher that may >>>> conflict with >>>> +     prefetch hints for a range of strides.  Make sure we don't issue >>>> +     prefetches for such cases if the stride is within this particular >>>> +     range.  */ >>>> +  if (cst_and_fits_in_hwi (ref->group->step) >>>> +      && abs_hwi (int_cst_value (ref->group->step)) < >>>> +      (HOST_WIDE_INT) PREFETCH_MINIMUM_STRIDE) >>>> +    { >>>> >>>> The '<' should go on the line below together with >>>> PREFETCH_MINIMUM_STRIDE. >>> >>> I've fixed this locally now. >> >> Thanks. I haven't followed the patch in detail, are you looking for >> midend changes approval since the last version? >> Or do you need aarch64 approval? > > The changes are not substantial, but midend approval i what i was aiming > at. > > Also the confirmation that PR85682 is no longer happening. James confirmed PR85682 is no longer reproducible with the updated patch and the bootstrap issue is fixed now. So i take it this should be OK to push to mainline? Also, i'd like to discuss the possibility of having these couple options backported to GCC 8. As is, the changes don't alter code generation by default, but they allow better tuning of the software prefetcher for targets that benefit from it. Maybe after letting the changes bake on mainline enough to be confirmed stable? Thanks, Luis