Alias analysis - does base_alias_check still work ?

Toon Moene toon@moene.indiv.nluug.nl
Sun Jul 21 07:44:00 GMT 2002


Richard Henderson wrote:

> On Fri, Jul 19, 2002 at 03:35:14PM -0700, Richard Henderson wrote:

> > The remaining sts/lds pairs are writes then reads from SY.
> > We've lost track of the fact that the write is to index I
> > and the read from index I+1, and so cannot overlap.
> 
> This appears to be the unroller doing stupid things.  The attached
> patch1 should cure this.  If this patch can be shown to be a win,
> we can axe this section of code properly rather than goto out of it.

I combined your MEM_EXPR patch and patch1, but now I get (-O2
-funroll-loops -fno-rerun-loop-opt):

$L6:
        lds $f10,0($18)
        lds $f14,-4($5)
        lda $2,4($5)
        lda $3,8($5)
        lda $18,4($18)
        lda $4,12($5)
        lda $1,-3($7)
        lda $7,-4($7)
        lds $f11,0($18)
        addl $1,$31,$6
        lda $18,4($18)
        lds $f12,0($18)
        lda $18,4($18)
        muls $f15,$f10,$f10
        lds $f13,0($18)
        lda $18,4($18)
        muls $f15,$f11,$f11
        muls $f15,$f12,$f12
        adds $f14,$f10,$f14
        muls $f15,$f13,$f13
        sts $f14,-4($5)
        lda $5,16($5)
        lds $f10,-4($2)
        adds $f10,$f11,$f10
        sts $f10,-4($2)
        lds $f11,-4($3)
        adds $f11,$f12,$f11
        sts $f11,-4($3)
        lds $f10,-4($4)
        adds $f10,$f13,$f10
        sts $f10,-4($4)
        bge $6,$L6

which is worse than you showed for the MEM_EXPR patch alone 32 insns vs
27).

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



More information about the Gcc-patches mailing list