Hard register sharing + misc

law@redhat.com law@redhat.com
Sun Jun 16 12:31:00 GMT 2002



This temporarily turns off the automatic hard register sharing until
we can audit the various ports.  

It also removes a redundant conditional in rest_of_compilation.

Bootstrapped and regression tested i686-pc-linux-gnu.

	* emit-rtl.c (gen_rtx_REG): Temporarily turn off automatic
	sharing of hard registers.

	* toplev.c (rest_of_compilation): Remove redundant conditional.

Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.278
diff -c -3 -p -r1.278 emit-rtl.c
*** emit-rtl.c	13 Jun 2002 16:14:54 -0000	1.278
--- emit-rtl.c	16 Jun 2002 19:25:40 -0000
*************** gen_rtx_REG (mode, regno)
*** 533,546 ****
  	return stack_pointer_rtx;
      }
  
    /* If the per-function register table has been set up, try to re-use
!      an existing entry in that table to avoid useless generation of RTL.  */
    if (cfun
        && cfun->emit
        && regno_reg_rtx
        && regno < FIRST_PSEUDO_REGISTER
        && reg_raw_mode[regno] == mode)
      return regno_reg_rtx[regno];
  
    return gen_raw_REG (mode, regno);
  }
--- 533,553 ----
  	return stack_pointer_rtx;
      }
  
+ #if 0
    /* If the per-function register table has been set up, try to re-use
!      an existing entry in that table to avoid useless generation of RTL.
! 
!      This code is disabled for now until we can fix the various backends
!      which depend on having non-shared hard registers in some cases.   Long
!      term we want to re-enable this code as it can significantly cut down
!      on the amount of useless RTL that gets generated.  */
    if (cfun
        && cfun->emit
        && regno_reg_rtx
        && regno < FIRST_PSEUDO_REGISTER
        && reg_raw_mode[regno] == mode)
      return regno_reg_rtx[regno];
+ #endif
  
    return gen_raw_REG (mode, regno);
  }
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.653
diff -c -3 -p -r1.653 toplev.c
*** toplev.c	16 Jun 2002 15:50:12 -0000	1.653
--- toplev.c	16 Jun 2002 19:26:04 -0000
*************** rest_of_compilation (decl)
*** 2779,2787 ****
  	{
  	  timevar_push (TV_JUMP);
  
! 	  if (flag_delete_null_pointer_checks)
! 	    if (delete_null_pointer_checks (insns))
! 	      cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
  	  timevar_pop (TV_JUMP);
  	}
  
--- 2779,2786 ----
  	{
  	  timevar_push (TV_JUMP);
  
! 	  if (delete_null_pointer_checks (insns))
! 	    cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
  	  timevar_pop (TV_JUMP);
  	}
  





More information about the Gcc-patches mailing list