From patchwork Thu Aug 5 22:08:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Thuresson X-Patchwork-Id: 61048 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 746E8B6EDF for ; Fri, 6 Aug 2010 08:09:14 +1000 (EST) Received: (qmail 11749 invoked by alias); 5 Aug 2010 22:09:12 -0000 Received: (qmail 11737 invoked by uid 22791); 5 Aug 2010 22:09:10 -0000 X-SWARE-Spam-Status: No, hits=-51.0 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Aug 2010 22:09:04 +0000 Received: from hpaq12.eem.corp.google.com (hpaq12.eem.corp.google.com [172.25.149.12]) by smtp-out.google.com with ESMTP id o75M92ws004952 for ; Thu, 5 Aug 2010 15:09:02 -0700 Received: from pwi8 (pwi8.prod.google.com [10.241.219.8]) by hpaq12.eem.corp.google.com with ESMTP id o75M8bxd005233 for ; Thu, 5 Aug 2010 15:09:00 -0700 Received: by pwi8 with SMTP id 8so345188pwi.21 for ; Thu, 05 Aug 2010 15:09:00 -0700 (PDT) Received: by 10.142.154.5 with SMTP id b5mr9693807wfe.316.1281046140104; Thu, 05 Aug 2010 15:09:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.135.7 with HTTP; Thu, 5 Aug 2010 15:08:40 -0700 (PDT) In-Reply-To: <4C5B1A21.7050304@codesourcery.com> References: <4C536839.70508@codesourcery.com> <4C5B1A21.7050304@codesourcery.com> From: Martin Thuresson Date: Thu, 5 Aug 2010 15:08:40 -0700 Message-ID: Subject: Re: Update postreload.c to avoid long compilation time To: Bernd Schmidt Cc: gcc-patches X-System-Of-Record: true 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 Thu, Aug 5, 2010 at 1:08 PM, Bernd Schmidt wrote: > On 08/04/2010 08:39 PM, Martin Thuresson wrote: > >> I updated the patch by introducing SET_REGNO_RAW and updated the >> postreload.c, caller-save.c and ira.c. >> >> I saw no new test failures. > > Thanks for the patch! > > Some general rules for patch submission: state exactly on which target > you bootstrapped and regression tested.  You'll need a ChangeLog entry > which should be contained as plain text before the patch itself; see the > existing ChangeLog for examples, and >  http://www.gnu.org/prep/standards/standards.html > for exactly how to write them. Thanks for the pointer. I'm reattaching the patch below. It was bootstrapped and tested on x86_64-unknown-linux-gnu. > Do you have commit access?  I'm assuming Google has some kind of blanket > assignment in place. I do not have commit access, but the Google copyright assignment does cover me. Thanks, Martin 2010-08-05 Martin Thuresson * postreload.c (reload_cse_simplify_operands): Use SET_REGNO_RAW instead of SET_REGNO. * caller-save.c (reg_save_code): Use SET_REGNO_RAW instead of SET_REGNO. * ira.c (setup_prohibited_mode_move_regs): Use SET_REGNO_RAW instead of SET_REGNO. * rtl.h (SET_REGNO_RAW): New macro. Index: gcc/postreload.c =================================================================== --- gcc/postreload.c (revision 162726) +++ gcc/postreload.c (working copy) @@ -528,7 +528,7 @@ reload_cse_simplify_operands (rtx insn, if (! TEST_HARD_REG_BIT (equiv_regs[i], regno)) continue; - SET_REGNO (testreg, regno); + SET_REGNO_RAW (testreg, regno); PUT_MODE (testreg, mode); /* We found a register equal to this operand. Now look for all Index: gcc/caller-save.c =================================================================== --- gcc/caller-save.c (revision 162726) +++ gcc/caller-save.c (working copy) @@ -124,7 +124,7 @@ reg_save_code (int reg, enum machine_mod /* Update the register number and modes of the register and memory operand. */ - SET_REGNO (test_reg, reg); + SET_REGNO_RAW (test_reg, reg); PUT_MODE (test_reg, mode); PUT_MODE (test_mem, mode); Index: gcc/ira.c =================================================================== --- gcc/ira.c (revision 162726) +++ gcc/ira.c (working copy) @@ -1219,9 +1219,9 @@ setup_prohibited_mode_move_regs (void) { if (! HARD_REGNO_MODE_OK (j, (enum machine_mode) i)) continue; - SET_REGNO (test_reg1, j); + SET_REGNO_RAW (test_reg1, j); PUT_MODE (test_reg1, (enum machine_mode) i); - SET_REGNO (test_reg2, j); + SET_REGNO_RAW (test_reg2, j); PUT_MODE (test_reg2, (enum machine_mode) i); INSN_CODE (move_insn) = -1; recog_memoized (move_insn); Index: gcc/rtl.h =================================================================== --- gcc/rtl.h (revision 162726) +++ gcc/rtl.h (working copy) @@ -1039,6 +1039,7 @@ enum label_kind be used on RHS. Use SET_REGNO to change the value. */ #define REGNO(RTX) (rhs_regno(RTX)) #define SET_REGNO(RTX,N) (df_ref_change_reg_with_loc (REGNO(RTX), N, RTX), XCUINT (RTX, 0, REG) = N) +#define SET_REGNO_RAW(RTX,N) (XCUINT (RTX, 0, REG) = N) /* ORIGINAL_REGNO holds the number the register originally had; for a pseudo register turned into a hard reg this will hold the old pseudo