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 !!


On Wed, 13 Nov 2002, Michael Matz wrote:

> Hi,
> 
> On Tue, 12 Nov 2002, tm wrote:
> 
> > Is there a particular reference you have in mind which covers handling
> > addressing inheritance in GCSE?
> >
> > To me, it seems very awkward to have address inheritance handled by GCSE.
> >
> > In order to generate efficient address inheritance, the addressing mode of
> > an instruction may need to be changed. This implies GCSE will need to
> > understand all of the target CPU's addressing modes and allowable
> > displacements for each one.
> 
> I just want to mention that the current regmove doesn't have any of this
> information also, and still is effective enough (at least it seems so from
> your words).  What's more, it even only reduces the constants under some
> fairly narrow constraints (only when both operands have to match in some
> insn).  So any optimization doing this probably doesn't need to be _that_
> much more intelligent than the current regmove as far as target
> dependencies are concerned.

Yes, the current regmove is barely adequate for the SH.

1) It has problems optimizing SFmode read/writes because SFmode only has
two basic addressing modes: single-register indirect and dual-register
indirect where one register is required to be r0.

2) QImode and HImode have a displacement range of 0-15 and 0-30 in
increments of 2 respectively.

Basically no two addressing modes on the SH have the same range of
displacements. The current regmove only works well for SImode, and
optimizes poorly on SFmode, QImode, and HImode accesses.

Toshi




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