diff mbox

#pragma GCC unroll support

Message ID F9073DC4-1F6C-473B-83DA-6D012AB6F08B@comcast.net
State New
Headers show

Commit Message

Mike Stump Jan. 26, 2015, 7:50 p.m. UTC
I missed including the documentation patch in the last set.  :-(  Here it is:

Comments

Joseph Myers Jan. 29, 2015, 11:06 p.m. UTC | #1
On Mon, 26 Jan 2015, Mike Stump wrote:

> +@item #pragma GCC unroll @var{"n"}
> +@cindex pragma GCC unroll @var{"n"}

@var contains the name of a metasyntactic variable; it doesn't make sense 
for quotes to be included in that name.  And as far as I can tell, the 
quotes aren't part of the syntax either.  That is, you should just have 
@var{n} there, and state explicitly in the text what @var{n} is (an 
assignment-expression that evaluates to an integer constant, it looks 
like).
Mike Stump Jan. 30, 2015, 2:50 a.m. UTC | #2
On Jan 29, 2015, at 3:06 PM, Joseph Myers <joseph@codesourcery.com> wrote:
> On Mon, 26 Jan 2015, Mike Stump wrote:
> 
>> +@item #pragma GCC unroll @var{"n"}
>> +@cindex pragma GCC unroll @var{"n"}
> 
> @var contains the name of a metasyntactic variable; it doesn't make sense 
> for quotes to be included in that name.  And as far as I can tell, the 
> quotes aren't part of the syntax either.  That is, you should just have 
> @var{n} there, and state explicitly in the text what @var{n} is (an 
> assignment-expression that evaluates to an integer constant, it looks 
> like).

Fixed.
diff mbox

Patch

Index: extend.texi
===================================================================
--- extend.texi	(revision 220084)
+++ extend.texi	(working copy)
@@ -17881,6 +17881,17 @@  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.
+
+@end table
 
 @node Unnamed Fields
 @section Unnamed struct/union fields within structs/unions