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: rtlopt loop unroller question


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)


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