No subject

Richard Kenner kenner@vlsi1.ultra.nyu.edu
Mon Dec 10 19:14:00 GMT 2001


    The improved memory aliasing stuff is interesting, but I see the
    following case still isn't done optimally.  The store to u.i[0]
    is loop invariant, and is not so recognized.  Is there enough
    info there now to figure this out, do you think?

       union {double d; int i[2]; } u;
       float s=0.0;
       while (count--)
         {
           u.i[0] = 0x4330;
           u.i[1] = *i++;
           s += u.d;
         }

Perhaps, but it will be hard.  What you'd need in this case is a tree
corresponding to were the variable case "ends" and an offset to there.
The first of those isn't hard, the second is trickier.



More information about the Gcc mailing list