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: Support for restrict


"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


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