More elimination of useless RTL generation

Jakub Jelinek jakub@redhat.com
Thu Jun 20 08:11:00 GMT 2002


On Tue, Jun 11, 2002 at 10:45:23AM -0600, law@redhat.com wrote:
> 	* loop.c (loop_regs_scan): Avoid useless generation of REG objects.
> 
> Index: loop.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/loop.c,v
> retrieving revision 1.407
> diff -c -3 -p -r1.407 loop.c
> *** loop.c	11 Jun 2002 12:21:55 -0000	1.407
> --- loop.c	11 Jun 2002 16:25:27 -0000
> *************** loop_regs_scan (loop, extra_size)
> *** 9661,9667 ****
>     if (LOOP_INFO (loop)->has_call)
>       for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
>         if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i)
> ! 	  && rtx_varies_p (gen_rtx_REG (Pmode, i), /*for_alias=*/1))
>   	{
>   	  regs->array[i].may_not_optimize = 1;
>   	  regs->array[i].set_in_loop = 1;
> --- 9661,9667 ----
>     if (LOOP_INFO (loop)->has_call)
>       for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
>         if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i)
> ! 	  && rtx_varies_p (regno_reg_rtx[i], 1))
>   	{
>   	  regs->array[i].may_not_optimize = 1;
>   	  regs->array[i].set_in_loop = 1;

Is reg_raw_mode[i] guaranteed to be Pmode for fp, hfp, argp and pic register
on all arches (even e.g. on 64-bit arches using ILP32 model)?

	Jakub



More information about the Gcc-patches mailing list