This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: About Regmove !!
- From: Michael Matz <matz at suse dot de>
- To: tm <tm at mail dot kloo dot net>
- Cc: <joern dot rennecke at superh dot com>, <gcc at gcc dot gnu dot org>
- Date: Tue, 12 Nov 2002 11:47:33 +0100 (CET)
- Subject: Re: About Regmove !!
Hi,
On Mon, 11 Nov 2002, tm wrote:
> Erm. Regmove does more than simple register-to-register copy elimination.
Yes.
> It also optimizes for address inheritance, which is critical for many
> processors with short displacement addressing, such as the SH4.
Are you talking about the combine_stack_adjustment() which just happens to
be implemented in regmove.c also, or about the transformation of
pX <= pA + N
...
pX <= pA + M
into
pX <= pA + N
...
pX <= pX + (M - N)
?
I guess you meant the latter. Interestingly it isn't done generally, but
only applies when pX and pA need to match in an insn. I.e. in that
context it isn't used at all for shortening immediate constants. If it's
an important optimization it should be implemented more generally,
although this might not be easy if one want to take register pressure into
account.
> Does new-regalloc do address inheritance optimization?
No (t yet?).
> If not, can we retain the portion of regmove which implements this
> optimization?
Of course.
Ciao,
Michael.