This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Improvement for update_equiv_regs (fwd)
- To: Bernd Schmidt <bernds at redhat dot co dot uk>
- Subject: Re: Improvement for update_equiv_regs (fwd)
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Wed, 13 Sep 2000 19:01:27 -0600
- cc: gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <Pine.LNX.4.21.0009131804270.32438-100000@mahatma.cygnus.co.uk>you
write:
> This is an older patch from Joern Rennecke. The last time I tried, it made
> a small improvement for the sh target.
>
> Can I install this?
>
> Bernd
>
> ---------- Forwarded message ----------
> From: Joern Rennecke <amylaar@cygnus.co.uk>
>
> update_equiv_regs still misses a number of function invariants because
> they have no REG_EQUAL notes.
>
> Here is a fix:
>
> Fri Feb 5 09:13:41 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
>
> * local-alloc.c (update_equiv_regs): If there is no REG_EQUAL note
> on an insn and function_invariant_p returns nonzero for the
> source, add a REG_EQUAL note.
The concern I had with this patch, then and now,is that it seems to me that
passes creating these function invariants ought to be adding REG_EQUAL notes
for them.
The comment indicates that CSE is the culprit -- how hard would it be to have
CSE do the right thing?
jeff