This is the mail archive of the
mailing list for the GCC project.
Re: Improvement for update_equiv_regs (fwd)
- To: Jeffrey A Law <law at cygnus dot com>
- Subject: Re: Improvement for update_equiv_regs (fwd)
- From: Bernd Schmidt <bernds at redhat dot co dot uk>
- Date: Thu, 14 Sep 2000 09:16:42 +0100 (BST)
- cc: gcc-patches at gcc dot gnu dot org
On Wed, 13 Sep 2000, Jeffrey A Law wrote:
> 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.
As far as I understood Joern, the problem are insns of the form
(set (reg X) (plus (frame pointer) (constant)))
which don't have a REG_EQUAL note. I really doubt we want to carry a
redundant REG_EQUAL note through all the optimization passes for every
insn that could possibly be used to make an equivalence.
The only reason we need a REG_EQUAL note at that point is that the code
immediately below looks for one in order to turn it into a REG_EQUIV note.
So generating one on the spot if it seems worthwhile seems like a pretty
reasonable approach to me. It's equivalent to generating the REG_EQUIV
note on the spot instead of converting an existing REG_EQUAL note.