[patch, rfc] Make store motion use alias oracle
Zdenek Dvorak
rakdver@atrey.karlin.mff.cuni.cz
Tue Jan 30 14:45:00 GMT 2007
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?
Zdenek
More information about the Gcc-patches
mailing list