This is the mail archive of the egcs@egcs.cygnus.com mailing list for the EGCS project. See the EGCS home page for more information.
> It also occurrs to me one could try to use all the dependency stuff built
> by the scheduler to find autoinc opportunities. Just something to ponder.
>
>
> Jeff
One problem I've observed is: pointer arithmetic (of which autoinc and
autodec are subsets) seems to limit the scheduler's freedom to move
instructions.
I see this type of code generated gcc for the SH4 fairly often:
mov.l @r0+,r1
mov.l @r0,r2
add r3,r2
Since the memory load latency is two, it would be nice to schedule this to:
mov.l @(4,r0),r2
mov.l @r0+,r1
add r3,r2
but it seems the scheduler is unable to move the 2nd load before the 1st
load due to the r0 post-increment dependency.
I think (with the current scheduler implementation) the usage
autoinc/autodec reduces code size, at the cost of performance on some
architectures due to this problem.
Toshi