This is the mail archive of the
mailing list for the GCC project.
Re: rtlopt loop unroller question
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Cc: Roger Sayle <roger at eyesopen dot com>,Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>, gcc at gcc dot gnu dot org,Yossi Markovich <YOSSIM at il dot ibm dot com>,Dorit Naishlos <DORIT at il dot ibm dot com>, Andreas Jaeger <aj at suse dot de>
- Date: Wed, 22 Oct 2003 22:50:51 -0400
- Subject: Re: rtlopt loop unroller question
- References: <Pine.LNX.firstname.lastname@example.org> <3F96F8EA.email@example.com>
On Wed, Oct 22, 2003 at 11:38:50PM +0200, Toon Moene wrote:
> Roger Sayle wrote:
> >On Wed, 22 Oct 2003, Zdenek Dvorak wrote:
> >>As I suspected, my favourite piece of cse strikes again.
> >>With the patch below, the code produced is much better:
> >I've also been curious about the benefits of this piece of CSE.
> >It would be nice to get some benchmarking of your patch on several
> >platforms, and if things don't get significantly worse, remove this
> >section of code entirely.
> >What do others think?
> What I do not understand is why this part of the compiler thinks that:
> LD Rx,<const>(Ay)
> ADD 2^N,Ay ! sizeof(LD access) = 2^N
> can be replaced by
> LD Rx,<const>(Ay)+ ! Using autoincrement
> By far the most architectures that do support autoincrement/decrement do
> not do so when the address register is offset ...
> But presumably I'm missing something here.
Well, that suggests that ARM may be a good target to try related
ldr r3, [ip, pc]!
is "load [ip + pc] into r3 and update ip to ip + pc". #8 works in
place of pc, too.
I don't know if SH has a similar addressing mode.
MontaVista Software Debian GNU/Linux Developer