From patchwork Tue Oct 9 16:08:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 190357 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 C19AF2C00E7 for ; Wed, 10 Oct 2012 03:14:35 +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=1350404076; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=2sG0c7V 96l1tlJ+jRHadyz0ztyU=; b=r+tKDcfvg20NRCvcyQwqhBJ4vexRhImHu7tXW+X DZ/A2i7PsWeaEi/KN8KHwG6gt/yA5l61j6ZAdlz45w2HxbVXVpLllAAHhii4tzcT vRB7hZr8prRSJCQtjKDqOPWBQRfriXUyiiP43w2FMu9UUoluBGA32qJZQ23CtEiM vG8U= 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:Subject:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=omcPLDcmcFSqVBj3RvrDLP34yB6uNYc7J5kcKEqqIJDeeFaytYswTMfMSgdTVe sKomdWyyg2KK8g2ozSk/QY15VwFkXKulTDxGwpjCIDZbPE50XhWBtUlbMglz98T+ 81ifL8l96/6EFtKX/RlH/5Wsa54Qwjstojj+jRUO8DZls=; Received: (qmail 26482 invoked by alias); 9 Oct 2012 16:14:28 -0000 Received: (qmail 26469 invoked by uid 22791); 9 Oct 2012 16:14:26 -0000 X-SWARE-Spam-Status: No, hits=-7.1 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_SPAMHAUS_DROP, MAY_BE_FORGED, 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; Tue, 09 Oct 2012 16:14:19 +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 q99GEJIa005877 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 9 Oct 2012 12:14:19 -0400 Received: from toll.usersys.redhat.com (unused [10.15.16.165] (may be forged)) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q99GEIuY031471 for ; Tue, 9 Oct 2012 12:14:19 -0400 Message-ID: <50744C00.4090508@redhat.com> Date: Tue, 09 Oct 2012 12:08:32 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0 MIME-Version: 1.0 To: gcc-patches Subject: [lra] patch for speeding up elimination pass for PR54146 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 I committed the following patch to speed up the elimination patch (rev. 192262). The patch was successfully bootstrapped on x86/x86-64. 2012-10-09 Vladimir Makarov * lra-eliminations.c (lra_eliminate): Use direct access to insns through lra_insn_recog_data for process_insn_for_elimination. 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: