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


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

I don't know if SH has a similar addressing mode.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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