This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH] Fix PR10060


On Sun, Jul 13, 2003 at 02:26:35PM -0400, Andrew Pinski wrote:
> Here is a fix for the ICE in PR10060 by using tail-recursion for the 
> common case of "ee" in reset_used_flags and copy_rtx_if_shared.

It's quite possible to do this without special-casing "ee".

Something like

  last_ptr = NULL;
  for (i = 0; i < length; i++)
    {
      switch (*format_ptr++)
 	{
 	case 'e':
	  if (last_ptr)
	    copy_rtx_if_shared_1 (last_ptr);
	  last_ptr = &XEXP (x, i);
	  break;

 	case 'E':
	  ...
	}
    }
  if (last_ptr)
    {
      orig = last_ptr;
      goto recurse;
    }



r~


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