From patchwork Thu Aug 25 19:03:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Makarov X-Patchwork-Id: 111639 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 E8973B72BA for ; Fri, 26 Aug 2011 05:04:03 +1000 (EST) Received: (qmail 11642 invoked by alias); 25 Aug 2011 19:04:01 -0000 Received: (qmail 11632 invoked by uid 22791); 25 Aug 2011 19:04:01 -0000 X-SWARE-Spam-Status: No, hits=-6.6 required=5.0 tests=AWL, BAYES_00, 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; Thu, 25 Aug 2011 19:03:48 +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 p7PJ3l5t012477 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 25 Aug 2011 15:03:47 -0400 Received: from toll.yyz.redhat.com (toll.yyz.redhat.com [10.15.16.165]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p7PJ3lJe026273 for ; Thu, 25 Aug 2011 15:03:47 -0400 Message-ID: <4E569C92.6000502@redhat.com> Date: Thu, 25 Aug 2011 15:03:46 -0400 From: Vladimir Makarov User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Thunderbird/3.1.11 MIME-Version: 1.0 To: gcc-patches Subject: [lra] a small patch for LRA speedup. 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 Recently I sent the patch which was mostly a caller-saves subpass rewriting. It resulted in removing a call df-analyze because the new subpass does not use DF-infrastructure as all subsequent subpasses. Before caller-saves subpass there is a small subpass which substitutes scratches to pseudos for simpler and better allocation which called df_insn_rescan after each change. With the new caller-saves subpass we don't need to do that any more. The patch was successfully bootstrapped on x86-64 and ia64. 2011-08-25 Vladimir Makarov * lra.c (remove_scratches): Don't rescan insn. Index: lra.c =================================================================== --- lra.c (revision 178008) +++ lra.c (working copy) @@ -1791,7 +1791,6 @@ static void remove_scratches (void) { int i; - bool insn_change_p; basic_block bb; rtx insn, reg; loc_t loc; @@ -1807,12 +1806,10 @@ remove_scratches (void) { id = lra_get_insn_recog_data (insn); static_id = id->insn_static_data; - insn_change_p = false; for (i = 0; i < static_id->n_operands; i++) if (GET_CODE (*id->operand_loc[i]) == SCRATCH && GET_MODE (*id->operand_loc[i]) != VOIDmode) { - insn_change_p = true; *id->operand_loc[i] = reg = lra_create_new_reg (static_id->operand[i].mode, *id->operand_loc[i], ALL_REGS, NULL); @@ -1829,8 +1826,6 @@ remove_scratches (void) fprintf (lra_dump_file, "Removing SCRATCH in insn #%u (nop %d)\n", INSN_UID (insn), i); } - if (insn_change_p) - df_insn_rescan (insn); } }