This is the mail archive of the gcc-patches@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: [patch, rfc] Make store motion use alias oracle


On 1/30/07, Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> wrote
Hello,

> > would make us replace "n" with a local variable, but not to move the
> > invariants out of the loop).  I will try to prepare a patch that fixes
> > these problems.
>
> We have seen another case where alias oracle can help vectorizer and
> provide significant improvement. Here is a simplified example:
>
>   1 struct
>   2 {
>   3   int x;
>   4   int y;
>   5 } S[100];
>   6
>   7 int z[100];
>   8
>   9 void
>  10 foo (void)
>  11 {
>  12   int i;
>  13   int x, y;
>  14
>  15   S[5].x = 0;
>  16   S[5].y = 0;
>  17
>  18   x = S[5].x;
>  19   y = S[5].y;
>  20
>  21   x = x + z[0];
>  22   y = y + z[0];
>  23
>  24   S[5].x = x;
>  25   S[5].y = y;
>  26
>  27 }
>
> If STORE_CCP can use extra aliasing info, it should be able
> with help of DSE to get rid of stores and loads in lines 15-19.

I think Richard Guenther used to have a patch to fix this?

You probably mean this:


http://gcc.gnu.org/ml/gcc-patches/2006-02/msg00669.html

and indeed that should have fixed it.

Richard.


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