This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Support for restrict
- From: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- To: <jon at beniston dot com>
- Cc: <gcc at gcc dot gnu dot org>
- Date: 24 Feb 2004 12:36:27 +0100
- Subject: Re: Support for restrict
- References: <001a01c3fac3$1c708a10$06bda8c0@Kindrogan>
"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