From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125512 invoked by alias); 13 Jul 2017 11:04:31 -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 123952 invoked by uid 89); 13 Jul 2017 11:04:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=Hx-languages-length:1267, story X-HELO: mo4-p00-ob.smtp.rzone.de Received: from mo4-p00-ob.smtp.rzone.de (HELO mo4-p00-ob.smtp.rzone.de) (81.169.146.163) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 13 Jul 2017 11:04:29 +0000 X-RZG-AUTH: :LXoWVUeid/7A29J/hMvvT3ol15ykJcYwR/bcHRirORRW3yMcVao= X-RZG-CLASS-ID: mo00 Received: from [192.168.0.123] (mail.hightec-rt.com [213.135.1.215]) by smtp.strato.de (RZmta 41.1 DYNA|AUTH) with ESMTPSA id 4012b4t6DB4NTfN (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Thu, 13 Jul 2017 13:04:23 +0200 (CEST) Subject: Re: [ping #4][patch] Fix PR80929: Realistic PARALLEL cost in seq_cost. To: Segher Boessenkool Cc: gcc-patches References: <20170712121119.GK13471@gate.crashing.org> <48a6d282-a3b2-99da-e190-9bba101ae2ec@gjlay.de> <20170712193605.GQ13471@gate.crashing.org> From: Georg-Johann Lay Message-ID: <93683dbf-a0e1-6f7c-6630-a3112049e9c9@gjlay.de> Date: Thu, 13 Jul 2017 11:04:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170712193605.GQ13471@gate.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-07/txt/msg00726.txt.bz2 On 12.07.2017 21:36, Segher Boessenkool wrote: > On Wed, Jul 12, 2017 at 03:30:00PM +0200, Georg-Johann Lay wrote: >> On 12.07.2017 14:11, Segher Boessenkool wrote: >>> On Tue, Jul 11, 2017 at 10:47:27AM +0200, Georg-Johann Lay wrote: >>>> This small addition improves costs of PARALLELs in >>>> rtlanal.c:seq_cost(). Up to now, these costs are >>>> assumed to be 1 which gives gross inexact costs for, >>>> e.g. divmod which is represented as PARALLEL. >>> >>> insn_rtx_cost returns 0 ("unknown") for such a PARALLEL, so your >>> current patch does not change this at all? Ah I see now. So this is unfixable... Any change to seq_cost that would address the issue I had in mind (completely wrong costs for divmod that are represented as PARALLEL with 2 SETs) will come up with different handling than the "logic" of insn_rtx_costs. So the only way to avoid that "logic" is to pass the whole story to the back-end. And in order not to break any existing assumptions this can only be achieved by a new hook that graceful degrades to the current behaviour and reasoning when that new hook says "dunno". I already started an RFC here: https://gcc.gnu.org/ml/gcc/2017-07/msg00080.html Johann