This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR10060
- From: Richard Henderson <rth at redhat dot com>
- To: Andrew Pinski <pinskia at physics dot uc dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 30 Jul 2003 13:09:12 -0700
- Subject: Re: [PATCH] Fix PR10060
- References: <89347FBA-B55F-11D7-9ACD-000393A6D2F2@physics.uc.edu>
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~