This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: #pragma GCC unroll support
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: Joseph Myers <joseph at codesourcery dot com>, Jason Merrill <jason at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>, gcc-patches Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 5 Mar 2015 18:31:53 -0700
- Subject: Re: #pragma GCC unroll support
- Authentication-results: sourceware.org; auth=none
- Newsgroups: gmane.comp.gcc.patches
- References: <0596944B-9DDC-4299-8CBC-9B6EB06BEF68 at comcast dot net> <CAFiYyc2nFsKByeNc70nDJj=eL3e33Biz+M-fkBNC1J69=LwYHg at mail dot gmail dot com> <9FE5AF27-EB8A-4CC3-A345-A69C2BFD8F30 at comcast dot net> <alpine dot DEB dot 2 dot 10 dot 1501292310061 dot 14904 at digraph dot polyomino dot org dot uk> <EFDD2A4E-F705-45E9-B9B1-8F22A3670B35 at comcast dot net> <alpine dot DEB dot 2 dot 10 dot 1501301535370 dot 29419 at digraph dot polyomino dot org dot uk> <E298CABB-4D38-4009-8876-3EB7B48D4AE5 at comcast dot net> <50C46965-AAA5-4F52-B4B8-2C12EA8D3864 at comcast dot net>
On 03/05/2015 04:12 PM, Mike Stump wrote:
Ping?
Just commenting on the documentation part:
Index: doc/extend.texi
===================================================================
--- doc/extend.texi (revision 220084)
+++ doc/extend.texi (working copy)
@@ -17881,6 +17881,18 @@ void ignore_vec_dep (int *a, int k, int
@}
@end smallexample
+@table @code
+@item #pragma GCC unroll @var{n}
+@cindex pragma GCC unroll @var{n}
+
+With this pragma, the programmer informs the optimizer how many times
+a loop should be unrolled. A 0 or 1 informs the compiler to not
+perform any loop unrolling. The pragma must be immediately before
+@samp{#pragma ivdep} or a @code{for}, @code{while} or @code{do} loop
+and applies only to the loop that follows. @var{n} is an
+assignment-expression that evaluates to an integer constant.
+
+@end table
@node Unnamed Fields
@section Unnamed struct/union fields within structs/unions
User documentation shouldn't refer to the reader as "the programmer";
either use the second person "you" or the imperative. I'd also
rearrange the paragraph slightly to put the two sentences about the
parameter together, something like:
Use this pragma to inform the compiler how many times a loop should be
unrolled. The pragma must be immediately before
@samp{#pragma ivdep} or a @code{for}, @code{while} or @code{do} loop
and applies only to the loop that follows. @var{n} is an
assignment-expression that evaluates to an integer constant.
A 0 or 1 informs the compiler to not perform any loop unrolling.
-Sandra