This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] [autovect patch] Implement vectorization hints
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Devang Patel <dpatel at apple dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 25 Feb 2005 10:14:57 +0100
- Subject: Re: [RFC] [autovect patch] Implement vectorization hints
- References: <B397FD6A-85F5-42B2-8F66-E2BF57641F31@apple.com>
- Reply-to: Richard Guenther <richard dot guenther at gmail dot com>
On Thu, 24 Feb 2005 16:27:39 -0800, Devang Patel <dpatel@apple.com> wrote:
>
> This patch implements two #pragmas that developers can use to give
> hints to auto vectorization pass. These pragmas are inserted in the
> source file before the loop. They are effective only on the very next
> loop in the source file.
>
> "#pragma novector" instructs compiler to not vectorize the loop.
> Programmer may decide to do so for various reasons.
>
> "#pragma ivdep" instructs compiler to ignore possible data dependence
> when data dependence analyzer is not able determine it. This is useful
> in a situation where compiler does not have enough information to prove
> data independence, but developer knows about it.
Where should I place the #pragma ivdep if I have a nested loop?
#pragma ivdep
for (;;)
for (;;)
;
or
for (;;)
#pragma ivdep
for (;;)
;
or even before both loops?
Thanks,
Richard.