From patchwork Mon Oct 8 20:25:23 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 190119 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 377672C0324 for ; Tue, 9 Oct 2012 07:25:53 +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=1350332753; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=WQgqOL6MAtAhSyCd2MmPxA6Q3fc=; b=EF4EMq82iX9XjRK 3KWCAsLGwcVgaTkRbjJ+pcNFVy6CP8n/bZ4tPQVphiXHWetTQBAnTqxQeFD22Vrz QRwL3i1peGigjKv8RZfvaWuOQ3hkhy2GO8wF3+z6PNP195nQL98fmHlSUOeC/HZK V6sCbkaIOaUvaDHwyF/0EgDfU3M4= 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:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=sGHm2uTh5bZ7lvXIAsFg5aWAh7gV53gAhKbyxE44qsCmYmTBKhL22jBiP+6Nad Hj0RUdMIqHnG7Cn4rnW9YAJnxuo2jAfeQd3crymVa+0SjyXCv6eEPKcNvyHl8MVw hJgFzFgUqG/7BcXPIoGQhI6QHpZmu9JmUMP0UeLRA3iNs=; Received: (qmail 26865 invoked by alias); 8 Oct 2012 20:25:38 -0000 Received: (qmail 26819 invoked by uid 22791); 8 Oct 2012 20:25:29 -0000 X-SWARE-Spam-Status: No, hits=-7.4 required=5.0 tests=AWL, BAYES_05, KHOP_RCVD_UNTRUST, KHOP_SPAMHAUS_DROP, KHOP_THREADED, RCVD_IN_DNSWL_HI, RCVD_IN_HOSTKARMA_W, 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; Mon, 08 Oct 2012 20:25:24 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q98KPOJ7012182 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 8 Oct 2012 16:25:24 -0400 Received: from ivy.local (ovpn-113-74.phx2.redhat.com [10.3.113.74]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q98KPN69012227; Mon, 8 Oct 2012 16:25:23 -0400 Message-ID: <507336B3.6030806@redhat.com> Date: Mon, 08 Oct 2012 16:25:23 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Steven Bosscher CC: GCC Patches Subject: Re: [lra] another patch to speed more compilation of PR54146 References: In-Reply-To: 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 10/07/2012 07:00 PM, Steven Bosscher wrote: > Hello, > > This patch changes the worklist-like bitmap in lra_eliminate() to an > sbitmap. Effect on compile time: > > lra r192183: LRA virtuals elimination: 51.56 ( 6%) > with patch: LRA virtuals elimination: 14.02 ( 2%) > > OK for the branch after bootstrap&test on x86_64-unknown-linux-gnu? > > Actually I have a simpler and better patch: gcc17 is too busy now :) (i am getting sporadically 'out of memory' as there is not enough virtual memory), So I check on Intel machine with 16GB. memory With yours patch: integrated RA : 48.70 (13%) usr 0.27 ( 4%) sys 49.00 (13%) wall 223608 kB (19%) ggc LRA non-specific : 20.99 ( 6%) usr 0.05 ( 1%) sys 21.11 ( 5%) wall 41590 kB ( 4%) ggc LRA virtuals elimination: 5.18 ( 1%) usr 0.01 ( 0%) sys 5.20 ( 1%) wall 36048 kB ( 3%) ggc LRA reload inheritance : 0.12 ( 0%) usr 0.00 ( 0%) sys 0.10 ( 0%) wall 1200 kB ( 0%) ggc LRA create live ranges : 16.32 ( 4%) usr 0.01 ( 0%) sys 16.50 ( 4%) wall 5194 kB ( 0%) ggc LRA hard reg assignment : 0.33 ( 0%) usr 0.01 ( 0%) sys 0.40 ( 0%) wall 0 kB ( 0%) ggc reload : 2.51 ( 1%) usr 0.04 ( 1%) sys 2.58 ( 1%) wall 0 kB ( 0%) ggc real=385.86 user=376.67 system=7.94 share=99%% maxrss=30761024 ins=0 outs=92544 mfaults=3926163 waits=13 text data bss dec hex filename 6395363 16 607 6395986 619852 s.o With mine patch: integrated RA : 48.81 (13%) usr 0.36 ( 5%) sys 49.39 (13%) wall 223608 kB (19%) ggc LRA non-specific : 21.08 ( 6%) usr 0.03 ( 0%) sys 21.12 ( 6%) wall 41590 kB ( 4%) ggc LRA virtuals elimination: 0.33 ( 0%) usr 0.02 ( 0%) sys 0.35 ( 0%) wall 36048 kB ( 3%) ggc LRA reload inheritance : 0.13 ( 0%) usr 0.00 ( 0%) sys 0.12 ( 0%) wall 1200 kB ( 0%) ggc LRA create live ranges : 16.87 ( 5%) usr 0.00 ( 0%) sys 16.80 ( 4%) wall 5194 kB ( 0%) ggc LRA hard reg assignment : 0.33 ( 0%) usr 0.02 ( 0%) sys 0.44 ( 0%) wall 0 kB ( 0%) ggc LRA coalesce pseudo regs: 0.01 ( 0%) usr 0.00 ( 0%) sys 0.00 ( 0%) wall 0 kB ( 0%) ggc reload : 2.56 ( 1%) usr 0.04 ( 1%) sys 2.60 ( 1%) wall 0 kB ( 0%) ggc real=381.71 user=372.78 system=7.69 share=99%% maxrss=30760656 ins=0 outs=92544 mfaults=3925988 waits=15 text data bss dec hex filename 6395363 16 607 6395986 619852 s.o Elimination before the patches took 5% on the Intel machine. Index: lra-eliminations.c =================================================================== --- lra-eliminations.c (revision 192169) +++ lra-eliminations.c (working copy) @@ -1291,9 +1291,10 @@ void lra_eliminate (bool final_p) { int i; - basic_block bb; - rtx insn, temp, mem_loc, invariant; + unsigned int uid; + rtx mem_loc, invariant; bitmap_head insns_with_changed_offsets; + bitmap_iterator bi; struct elim_table *ep; int regs_num = max_reg_num (); @@ -1344,12 +1345,8 @@ lra_eliminate (bool final_p) fprintf (lra_dump_file, "Updating elimination of equiv for reg %d\n", i); } - FOR_EACH_BB (bb) - FOR_BB_INSNS_SAFE (bb, insn, temp) - { - if (bitmap_bit_p (&insns_with_changed_offsets, INSN_UID (insn))) - process_insn_for_elimination (insn, final_p); - } + EXECUTE_IF_SET_IN_BITMAP (&insns_with_changed_offsets, 0, uid, bi) + process_insn_for_elimination (lra_insn_recog_data[uid]->insn, final_p); bitmap_clear (&insns_with_changed_offsets); lra_eliminate_done: