Support for restrict

Falk Hueffner falk.hueffner@student.uni-tuebingen.de
Tue Feb 24 11:55:00 GMT 2004


"Jon Beniston" <jon@beniston.com> writes:

> 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?

I think this did generally not work in 3.3. It definitely works with
tree-ssa for me, though.

By the way, if you're interested in improvement scheduling in loops,
you might want to check the "Swing Modulo Scheduling" patch:
http://gcc.gnu.org/ml/gcc/2004-02/msg00071.html

-- 
	Falk



More information about the Gcc mailing list