More useless RTL generation killed

Zack Weinberg zack@codesourcery.com
Mon Jun 10 09:50:00 GMT 2002


On Mon, Jun 10, 2002 at 10:38:55AM -0600, law@redhat.com wrote:
> 
> This patch eliminates a few instances of dumb RTL generation -- in all
> this eliminates around 15% of the RTL allocated for my 162 test files
> and improves compile time for them by around 1%.

...

> +   for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
> +     if (TEST_HARD_REG_BIT (argument_registers, i))
> +       static_reg_base_value[i]
> + 	= gen_rtx_ADDRESS (VOIDmode, gen_rtx_REG (Pmode, i));
> + 
> + 
> +   static_reg_base_value[STACK_POINTER_REGNUM]
> +     = gen_rtx_ADDRESS (Pmode, stack_pointer_rtx);
> +   static_reg_base_value[ARG_POINTER_REGNUM]
> +     = gen_rtx_ADDRESS (Pmode, arg_pointer_rtx);
> +   static_reg_base_value[FRAME_POINTER_REGNUM]
> +     = gen_rtx_ADDRESS (Pmode, frame_pointer_rtx);
> + #if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
> +   static_reg_base_value[HARD_FRAME_POINTER_REGNUM]
> +     = gen_rtx_ADDRESS (Pmode, hard_frame_pointer_rtx);
> + #endif

Any reason not to do this once per compilation?

zw



More information about the Gcc-patches mailing list