From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29886 invoked by alias); 16 Jan 2013 10:58:38 -0000 Received: (qmail 29877 invoked by uid 22791); 16 Jan 2013 10:58:37 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 16 Jan 2013 10:58:31 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r0GAwUwv006394 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 16 Jan 2013 05:58:30 -0500 Received: from zalov.redhat.com (vpn1-6-50.ams2.redhat.com [10.36.6.50]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r0GAwSnI026621 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 16 Jan 2013 05:58:30 -0500 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.redhat.com (8.14.5/8.14.5) with ESMTP id r0GAwS35028265; Wed, 16 Jan 2013 11:58:28 +0100 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id r0GAwRc8028264; Wed, 16 Jan 2013 11:58:27 +0100 Date: Wed, 16 Jan 2013 10:58:00 -0000 From: Jakub Jelinek To: Alexandre Oliva Cc: gcc-patches@gcc.gnu.org Subject: Re: fix for PR49888 var-tracking compile-time regression Message-ID: <20130116105827.GE7269@tucnak.redhat.com> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2013-01/txt/msg00838.txt.bz2 On Wed, Jan 16, 2013 at 08:28:59AM -0200, Alexandre Oliva wrote: > PR49888 introduced clobber_overlapping_mems to detach VALUEs (and > variables bound to them) from MEMs as the MEMs are modified. This > turned out to be quite expensive, particularly the computation of > canonical addresses passed to alias dependency. > > This patch introduces caching of the canonical addresses to alleviate > this expensive operation. We cache mappings that apply to the entire > function, from equivalences recorded in the global cselib table, and > mappings that apply only to the local basic block. This cut down 2% of > a full regstrap cycle, and about 1% of the time it took to build target > libraries for C, C++ and Java. Can you safely cache the canon addresses already during vt_initialize (when cselib_* is still processing new insns, cselib VALUEs contain REGs and MEMs that are flushed at the end of processing the current bb in vt_initialize)? In my earlier attempts to cache something in var-tracking, I've always started caching at the end of vt_initialize, when the VALUEs should be (with one small exception of variable_post_merge_new_vals created VALUEs) pretty much stable, everything should be flushed that needs to be flushed, etc. Also, what effects (if any) does the patch have on the .debug_info/.debug_loc size and coverage? Jakub