From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13373 invoked by alias); 17 Jun 2019 14:24:38 -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 13039 invoked by uid 89); 17 Jun 2019 14:24:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=chances X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Jun 2019 14:24:24 +0000 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5HEHu2F138881 for ; Mon, 17 Jun 2019 10:24:09 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0a-001b2d01.pphosted.com with ESMTP id 2t6aaw6w1b-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 17 Jun 2019 10:24:09 -0400 Received: from localhost by e06smtp05.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 17 Jun 2019 15:24:07 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp05.uk.ibm.com (192.168.101.135) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 17 Jun 2019 15:24:03 +0100 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x5HEO28Q50659502 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 Jun 2019 14:24:02 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8AB5C11C05B; Mon, 17 Jun 2019 14:24:02 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B1A6C11C04C; Mon, 17 Jun 2019 14:23:59 +0000 (GMT) Received: from 192.168.10.101 (unknown [9.200.34.226]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 17 Jun 2019 14:23:59 +0000 (GMT) Subject: Re: [PATCH v4 2/3] Add predict_doloop_p target hook To: Richard Biener Cc: Segher Boessenkool , Bill Schmidt , gcc-patches@gcc.gnu.org, Jeff Law , bin.cheng@linux.alibaba.com, jakub@redhat.com, Kugan Vivekanandarajah References: <20190520163759.GY31586@gate.crashing.org> <3d3347ad-6910-a5ea-11f9-1a4fc3cbc6d0@linux.ibm.com> <20190614215352.GU31586@gate.crashing.org> <97ea6425-e941-8fa2-c887-bd81d2948077@linux.ibm.com> <579f9761-f6a5-1e82-57fb-402216beb729@linux.ibm.com> <20190617095930.GY31586@gate.crashing.org> <1021295E-F884-469F-B3A2-B005007C7656@suse.de> <3b30e16a-4462-93a9-5af5-61085e347071@linux.ibm.com> From: "Kewen.Lin" Date: Mon, 17 Jun 2019 14:24:00 -0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit x-cbid: 19061714-0020-0000-0000-0000034AD8E6 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061714-0021-0000-0000-0000219E1F04 Message-Id: <281420fb-382a-58f0-b91c-9f7b50d9391d@linux.ibm.com> X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00959.txt.bz2 on 2019/6/17 下午9:44, Richard Biener wrote: > On Mon, 17 Jun 2019, Kewen.Lin wrote: > >> on 2019/6/17 下午8:08, Richard Biener wrote: >>> On June 17, 2019 11:59:30 AM GMT+02:00, Segher Boessenkool wrote: >>>> On Mon, Jun 17, 2019 at 10:51:49AM +0200, Richard Biener wrote: >>>>> On Mon, 17 Jun 2019, Kewen.Lin wrote: >>>>> >>>>>> Hi Segher and Bill, >>>>>> >>>>>> Thanks a lot for your review comments! I've updated the patch >>>> accordingly. >>>>>> >>>>>> The updated one attached. >>>>> >>>>> OK. I suppose all low-overhead loop instructions use a decrement to >>>> zero >>>>> style iterator? >>>> >>>> The documentation says decrement to 0, decrement to -1, and decrement >>>> to >>>> any negative are all supported. But all are decrement, yes. >>> >>> Hmm, so I wonder if we should tell IVOPTS the kind because the IV generated has to match RTL doloops expectations? Thus return an enum value from the hook? >>> >> >> I guess we don't need to make it in IVOPTs, since doloop_optimize can transform the loop closing to >> its expected pattern once it gets the iteration count, with target hook doloop_end. >> It's to modify the original closing into: >> niter -> 0 >> niter-1 -> -1 >> niter-n -> -n > > True, but this IV may affect other IVs choice (well, at least if it is > "cheap" to use the doloop IV in derived IVs which it is not for power). > Good point! For those targets like power having counter register, it would be fine. For the other, I'm sorry that I'm not sure how the sequence looks like. All decrement/cmp kept? Just like normal but it has hardware fusion support? Maybe we can add one more iv cand specific for this kind of use, assign negative cost for this specific pair (group/cand), it can give chances to be selected for other uses if it's better? Thanks, Kewen > Richard. >