From patchwork Mon Oct 8 10:31:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Bosscher X-Patchwork-Id: 189980 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 31D3E2C0311 for ; Mon, 8 Oct 2012 21:32:30 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1350297151; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: MIME-Version:Received:In-Reply-To:References:From:Date: Message-ID:Subject:To:Cc:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=4kYmuMNreDfgaQG/KlQjAPBXrpk=; b=Zx09Sl0eqaeG5G+ Bw/lT/3/3iSlQggWVkRUktZKGWI6kUrXeTYORQwa5JGNYHlkgu0Gjq804v+l4E2M Whu8SsvJZ0Uy6GwGrfy6JEtJVxuU0FN+0PCa6Ey+w7OxUX9v9OnWsSn5jpA9IdUC uDN4RzRWQ2dlMOD6Vu8S1nfNLJtE= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:MIME-Version:Received:In-Reply-To:References:From:Date:Message-ID:Subject:To:Cc:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=DAN1AaP/ITosRRVeL9ma5jN8Q52pizky/iBZPCDAT2Xu61lrOykcK97UrS/ptj ICdDHo4ygXneNroUjijjqbAAe+Gdlu5dZHpM/i4W0YNzMeeadKG2D1KXQq1u9vd8 qMiKKz044EZonIZT1EZIVd6g6AT4qhF3wgAegGf7RmIXc=; Received: (qmail 25340 invoked by alias); 8 Oct 2012 10:31:56 -0000 Received: (qmail 25328 invoked by uid 22791); 8 Oct 2012 10:31:54 -0000 X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-lb0-f175.google.com (HELO mail-lb0-f175.google.com) (209.85.217.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 08 Oct 2012 10:31:49 +0000 Received: by mail-lb0-f175.google.com with SMTP id y2so2819900lbk.20 for ; Mon, 08 Oct 2012 03:31:47 -0700 (PDT) Received: by 10.152.108.197 with SMTP id hm5mr4159665lab.45.1349692307526; Mon, 08 Oct 2012 03:31:47 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.42.5 with HTTP; Mon, 8 Oct 2012 03:31:27 -0700 (PDT) In-Reply-To: <5071A6FB.5030202@redhat.com> References: <5071A6FB.5030202@redhat.com> From: Steven Bosscher Date: Mon, 8 Oct 2012 12:31:27 +0200 Message-ID: Subject: Re: [lra] patch to speed more compilation of PR54146 To: Vladimir Makarov Cc: GCC Patches X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Sun, Oct 7, 2012 at 5:59 PM, Vladimir Makarov wrote: > * lra-lives.c (lra_start_point_ranges, lra_finish_point_ranges): > Remove. > (process_bb_lives): Change start regno in > EXECUTE_IF_SET_IN_BITMAP. Iterate on DF_LR_IN (bb) instead of > pseudos_live_through_calls. This can be done a bit better still by checking whether the pseudos_live_through_calls set is empty: * lra-lives.c (process_bb_lives): At the top of a basic block, break from the loop over pseudos_live_through_calls if the set is empty. This test is extremely cheap (the load for the cardinality test re-used by sparseset_bit_p) and it cuts down the time spent in live range chains even further (especially e.g. for blocks that don't contain calls). OK for the branch if it passes bootstrap+testing on x86_64-unknown-linux-gnu? Ciao! Steven --- lra-lives.c.orig 2012-10-08 12:24:10.000000000 +0200 +++ lra-lives.c 2012-10-08 12:26:07.000000000 +0200 @@ -751,8 +751,12 @@ process_bb_lives (basic_block bb) mark_pseudo_dead (i); EXECUTE_IF_SET_IN_BITMAP (DF_LR_IN (bb), FIRST_PSEUDO_REGISTER, j, bi) - if (sparseset_bit_p (pseudos_live_through_calls, j)) - check_pseudos_live_through_calls (j); + { + if (sparseset_cardinality (pseudos_live_through_calls) == 0) + break; + if (sparseset_bit_p (pseudos_live_through_calls, j)) + check_pseudos_live_through_calls (j); + } incr_curr_point (freq); }