This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Followup on previous inheritance fix
- To: Jeffrey A Law <law at cygnus dot com>
- Subject: Re: Followup on previous inheritance fix
- From: Bernd Schmidt <crux at pool dot informatik dot rwth-aachen dot de>
- Date: Fri, 30 Oct 1998 21:30:49 +0100 (MET)
- cc: egcs-patches at cygnus dot com
On Thu, 29 Oct 1998, Jeffrey A Law wrote:
>
> In message <Pine.GSO.4.02A.9810261307040.29793-100000@colt.informatik.rwth-aa
> chen.de>you write:
> > The second problem with using reg_reloaded_dead in that condition is that
> > it seems wrong. Consider the situation where we store hard reg A from
> > pseudo B, and B dies. Then, in the following insn, reg_reloaded_dead is 1
> > for A, so the condition above does not apply. This means the compiler
> > could try to use A for an in-out reload in the circumstances described
> > above, _even if there is a store to another pseudo that has hard reg A_ in
> > the same insn.
> >
> > I believe that we should not test reg_reloaded_dead here, just avoid this
> > optimization whenever reg_used_by_pseudo is nonzero.
> But shouldn't this case have been kicked out as invalid via the call to
> reload_reg_free_for_value_p earlier in that same function?
>
> The other changes make sense and I'll go ahead and install them.
>
> It would be wise in the future to include testcases with your bugfixes so
> that we can look at them under the debugger too to help understand what is
> happening.
>
I'll try to do that. However, the testcase I had (glibc-2.0.98:
md5-crypt/md5-crypt.c, compiled with -O99 -fomit-frame-pointer -fPIC), only
showed the two obvious problems for which you installed the fixes. I have no
test case that is miscompiled due to the test for reg_reloaded_dead; this just
seems incorrect due to the reasons described above. It's possible that the
problem is avoided elsewhere; however reload_reg_free_for_value_p does not
seem to check for it, it only verifies that no other reloads cause a conflict.
It will not notice if the reload reg is allocated to a pseudo that's born
in the current insn.
Bernd