[tree-ssa] -fgcse and friends useless
Richard Guenther
rguenth@tat.physik.uni-tuebingen.de
Fri Feb 6 12:41:00 GMT 2004
On Fri, 6 Feb 2004, Richard Guenther wrote:
> even used inside the loop, but just stored to. The above is result of
> leafified C++ math kernel with a triple nested loop, roughly equivalent to
>
> void foo(double *a, int o, int f0, int e0, int f1, int e1,
> int f2, int e2, int s0, int s1, int s2)
> {
> for (int i2=f2; i2<=e2; ++i2)
> for (int i1=f1; i1<=e1; ++i1)
> for (int i0=f0; i0<=e0; ++i0)
> a[o + i0*s0 + i1*s1 + i2*s2] = 0.0;
> }
>
> optimizing the above c-loop doesn't produce the useless stack slots, but
> can't optimize the address calculation of the innermost loop, too.
Note that gcc 3.4 is able to do this optimization (not for the C++ case,
but for the simple equivalent above)! PR14046.
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/
More information about the Gcc
mailing list