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]

Support for restrict


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



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