This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Alias analysis - does base_alias_check still work ?
I wrote:
> Richard Henderson wrote:
> > Yes. The fact that the scheduler doesn't understand register
> > pressure means that pre-register-allocation scheduling generally
> > sucks eggs on x86.
>
> Thanks. Independently from your message and David Edelsohn's (showing the
> comment that gives the rationale for turning this option off on ix86) I
> came to the same conclusion while having dinner (nothing helps better than
> give the grey cells some rest :-)
>
> Now the 64K question is: How can it be that I came around going through all
> this trouble because I saw the same "mis-optimization" on the Alpha, where
> - given what Daniel showed us - -fschedule-insns is on ?
>
> I'm switching machines as we speak to test this ...
Well, it obviously doesn't work on the Alpha. First of all I have to
specify -fno-rerun-loop-opts to get any loop unrolling at all, and then the
unrolled loop looks like this:
$L6:
lds $f12,0($17)
lds $f10,0($18)
lda $1,-3($5)
lda $5,-4($5)
lds $f11,-4($3)
addl $1,$31,$4
muls $f12,$f10,$f10
adds $f11,$f10,$f11
sts $f11,-4($2)
lds $f10,4($18)
lds $f11,0($3)
muls $f12,$f10,$f10
adds $f11,$f10,$f11
sts $f11,0($2)
lds $f10,8($18)
lds $f11,4($3)
muls $f12,$f10,$f10
adds $f11,$f10,$f11
sts $f11,4($2)
lds $f13,12($18)
lds $f10,8($3)
lda $18,16($18)
lda $3,16($3)
muls $f12,$f13,$f12
adds $f10,$f12,$f10
sts $f10,8($2)
lda $2,16($2)
bge $4,$L6
It's obvious that no scheduling has taken place, as all four operations are
still in sequence (lds, muls, adds, sts).
--
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
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)