diff mbox

Update postreload.c to avoid long compilation time

Message ID AANLkTikrd4D4LQ3dGVo1A7JWAgOifj4eQCGjtXm2qNA=@mail.gmail.com
State New
Headers show

Commit Message

Martin Thuresson Aug. 5, 2010, 10:08 p.m. UTC
On Thu, Aug 5, 2010 at 1:08 PM, Bernd Schmidt <bernds@codesourcery.com> 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  <martint@google.com>

       * 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.

Comments

Bernd Schmidt Aug. 5, 2010, 10:58 p.m. UTC | #1
On 08/06/2010 12:08 AM, Martin Thuresson wrote:
> 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.

I've committed it for you.  Thanks!


Bernd
diff mbox

Patch

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