This is the mail archive of the gcc@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: [tree-ssa] RFC: Dropping INDIRECT_REF variables


On Wednesday, May 14, 2003, at 08:31 AM, Timothy J. Wood wrote:
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):

3.3 does the same thing. I have tried to fix it and given up, as have some
other people.



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