From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26930 invoked by alias); 30 Jan 2019 14:24:33 -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 26915 invoked by uid 89); 30 Jan 2019 14:24:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.4 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_NUMSUBJECT,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*UA:52.6.0, H*u:52.6.0, HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 30 Jan 2019 14:24:29 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3B53BC05D3FB; Wed, 30 Jan 2019 14:24:28 +0000 (UTC) Received: from [10.10.121.20] (ovpn-121-20.rdu2.redhat.com [10.10.121.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id BF2885C21A; Wed, 30 Jan 2019 14:24:27 +0000 (UTC) Subject: Re: [PATCH] Fix compile-time of PR89115 To: Richard Biener , gcc-patches@gcc.gnu.org References: From: Vladimir Makarov Message-ID: <28f7c761-6005-e70d-8e95-8fdaef18dfbf@redhat.com> Date: Wed, 30 Jan 2019 14:25:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2019-01/txt/msg01722.txt.bz2 On 01/30/2019 07:45 AM, Richard Biener wrote: > The PR89115 spends ~66% of its compile-time in LRA reload inheritance > because of a weak hash and a lot of collisions in the invaraints hash. > > This can be fixed by the following, bringing down inheritance time > to the noise. > > Bootstrap / regtest running on x86_64-unknown-linux-gnu, OK for trunk > (and branches?)? Yes, sure.  Thank you, Richard. > The hash function is still weak but w/o a testcase I don't think > it's worth slowing it down further. > > Thanks, > Richard. > > 2019-01-30 Richard Biener > > PR rtl-optimization/89115 > * lra.c (lra_rtx_hash): Properly hash CONST_INT values. > > Index: gcc/lra.c > =================================================================== > --- gcc/lra.c (revision 268383) > +++ gcc/lra.c (working copy) > @@ -1719,10 +1719,12 @@ lra_rtx_hash (rtx x) > > case SCRATCH: > case CONST_DOUBLE: > - case CONST_INT: > case CONST_VECTOR: > return val; > > + case CONST_INT: > + return val + UINTVAL (x); > + > default: > break; > }