On Wednesday, May 14, 2003, at 08:09 AM, Diego Novillo wrote:
- We disable the ability to treat non-aliased pointer
dereferences as if they were variables. We would lose the
ability to do some optimizations like:
Please forgive me if I'm way off base here, but one example on PPC
that your code snippet reminded me of was int->float conversion. On
PPC this happens by building storing a pair of 32-bit constructed ints
on the stack, loading them as a double and then doing some more
contortions with this.
The current problem is that if you have float conversion in a loop:
void convert(int *input, float *output, unsigned int count)
{
while (count--)
*output++ = *input++;
}
both words of the double on the stack are written on each loop even
though the one 32-bit portion is always the same. This store should
be hoisted outside the loop (in the degenerate case above this can by
a pretty big performance win). I don't have a 3.3 compiler right now,
but on Mac OS X 10.2 (3.1-based):