This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: ia64 performance regression


On Tue, Oct 09, 2001 at 01:53:37PM -0700, Steve Christiansen wrote:
> What is the purpose of the following code in loop.c (loop_regs_scan)?
> 
>   for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
>     {
>       regs->array[i].may_not_optimize = 1;
>       regs->array[i].set_in_loop = 1;
>     }

I don't know.  Paranoia, probably.

I'm pretty sure this ought to be

  /* Invalidate all hard registers clobbered by calls.  With one exception:
     a call-clobbered PIC register is still function-invariant for our
     purposes, since we can hoist any PIC calculations out of the loop.
     Thus the call to rtx_varies_p.  */
  if (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))
	{
	  ...
	}


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]