About Regmove !!
Michael Matz
matz@suse.de
Tue Nov 12 04:20:00 GMT 2002
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.
More information about the Gcc
mailing list