This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: patch to remove reload_reg_free_before_p applied
- To: drepper at cygnus dot com
- Subject: Re: patch to remove reload_reg_free_before_p applied
- From: Joern Rennecke <amylaar at cygnus dot co dot uk>
- Date: Tue, 17 Nov 1998 16:08:15 +0000 (GMT)
- Cc: law at cygnus dot com, wilson at cygnus dot com, egcs-patches at cygnus dot com
> Ulrich Drepper <drepper@cygnus.com> writes:
>
> > I try to come up with an analysis.
>
> Here it comes. I've appended a file which compiled using
>
> gcc -c -O3 i.i
>
> produces a bug. Here is the beginning of the diff of the output of
Here is a fix:
Mon Nov 16 21:02:52 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* reload1.c (reload_reg_free_for_value_p): When considered reload
has an output, matching inputs are not sufficient to avoid conflict.
Index: reload1.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/reload1.c,v
retrieving revision 1.99
diff -p -r1.99 reload1.c
*** reload1.c 1998/11/16 13:04:01 1.99
--- reload1.c 1998/11/17 16:05:25
*************** reload_reg_free_for_value_p (regno, opnu
*** 5152,5158 ****
&& i != reloadnum)
{
if (! reload_in[i] || ! rtx_equal_p (reload_in[i], value)
! || reload_out[i])
{
int time2;
switch (reload_when_needed[i])
--- 5152,5158 ----
&& i != reloadnum)
{
if (! reload_in[i] || ! rtx_equal_p (reload_in[i], value)
! || reload_out[i] || out)
{
int time2;
switch (reload_when_needed[i])
*************** reload_reg_free_for_value_p (regno, opnu
*** 5246,5253 ****
default:
return 0;
}
! if (time1 >= time2
! || (out && time2 >= MAX_RECOG_OPERANDS * 4 + 4))
return 0;
}
}
--- 5246,5255 ----
default:
return 0;
}
! if ((time1 >= time2
! && (! reload_in[i] || reload_out[i]
! || ! rtx_equal_p (reload_in[i], value)))
! || (out && time2 >= MAX_RECOG_OPERANDS * 4 + 3))
return 0;
}
}