This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: rtlopt loop unroller question
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: Daniel Jacobowitz <drow at mvista dot com>
- 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: Thu, 23 Oct 2003 22:12:59 +0200
- Subject: Re: rtlopt loop unroller question
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <Pine.LNX.4.44.0310220837200.20729-100000@www.eyesopen.com> <3F96F8EA.6000704@moene.indiv.nluug.nl> <20031023025051.GA3009@nevyn.them.org>
Daniel Jacobowitz wrote:
On Wed, Oct 22, 2003 at 11:38:50PM +0200, Toon Moene wrote:
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 ...
Well, that suggests that ARM may be a good target to try related
benchmarks on:
ldr r3, [ip, pc]!
is "load [ip + pc] into r3 and update ip to ip + pc". #8 works in
place of pc, too.
Yeah, but that isn't the problem. The problem is that the piece of code
that Zdenek disabled takes [pseudo-code]
(PLUS (PLUS REG 4) 4)
and then says:
1. This is a {PRE|POST}_INCREMENT target.
2. The inner constant (4) is equal to the outer constant (4).
3. And those are of the form 2^n.
-> Therefore I won't CSE these expressions as auto-increment will make
efficient code out of it.
BUT:
Auto-increment doesn't work here, because
LD Rx,4(Ry)+
is not allowed, only
LD Rx,(Ry)+
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc.gnu.org/fortran/ (under construction)