From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102319 invoked by alias); 17 Jun 2019 13:39:19 -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 102310 invoked by uid 89); 17 Jun 2019 13:39:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.1 spammy=H*r:192.168.10, closing X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0b-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.158.5) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Jun 2019 13:39:17 +0000 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5HDbVI4088033 for ; Mon, 17 Jun 2019 09:39:14 -0400 Received: from e06smtp05.uk.ibm.com (e06smtp05.uk.ibm.com [195.75.94.101]) by mx0b-001b2d01.pphosted.com with ESMTP id 2t69mrxbr4-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 17 Jun 2019 09:39:14 -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 14:39:12 +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 14:39:08 +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 x5HDd7Tq9371784 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 Jun 2019 13:39:07 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7820411C05B; Mon, 17 Jun 2019 13:39:07 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A0BCE11C054; Mon, 17 Jun 2019 13:39:04 +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 13:39:04 +0000 (GMT) Subject: Re: [PATCH v4 2/3] Add predict_doloop_p target hook To: Richard Biener , Segher Boessenkool Cc: 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> From: "Kewen.Lin" Date: Mon, 17 Jun 2019 13:39: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: <1021295E-F884-469F-B3A2-B005007C7656@suse.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit x-cbid: 19061713-0020-0000-0000-0000034AD591 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19061713-0021-0000-0000-0000219E1B76 Message-Id: <3b30e16a-4462-93a9-5af5-61085e347071@linux.ibm.com> X-IsSubscribed: yes X-SW-Source: 2019-06/txt/msg00950.txt.bz2 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 Thanks, Kewen > Richard. > >> >> Segher >