Support for restrict
Jon Beniston
jon@beniston.com
Tue Feb 24 11:36:00 GMT 2004
How well is restrict supported in GCC? Can the compiler reorder loads
and stores? For example:
Can it rearrange:
for (i = 0; i < 8; i++)
{
*out++ = *in++;
*out++ = *in++;
}
To:
for (i = 0; i < 8; i++)
{
t1 = *in++;
t2 = *in++;
*out++ = t1;
*out++ = t2;
}
Allowing potentially better code to be scheduled? I ask, because it
doesn't appear to in the port I'm working on (which is based on the
3.3.2 source), but I was wondering if that was because I need to #define
something?
Cheers,
JonB
More information about the Gcc
mailing list