This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]