[PATCH] Add support for #pragma nounroll
Aaron Ballman
aaron.ballman at gmail.com
Thu Jul 24 08:38:44 PDT 2014
On Wed, Jul 23, 2014 at 5:23 PM, Mark Heffernan <meheff at google.com> wrote:
> Hi aaron.ballman,
>
> Following up on recently added "#pragma unroll" support, this patch adds support for "#pragma nounroll" which disables unrolling for a loop. Both xlc and icc support "#pragma nounroll". Compatibility with these compilers (along with CUDA) motivated the original "#pragma unroll" support.
>
> This patch was originally part of the patch which added support for "#pragma unroll" but was pulled out to make that patch more incremental.
>
> http://reviews.llvm.org/D4647
>
> Files:
> docs/ReleaseNotes.rst
> include/clang/Basic/Attr.td
> include/clang/Basic/AttrDocs.td
> include/clang/Parse/Parser.h
> include/clang/Sema/LoopHint.h
> lib/Parse/ParsePragma.cpp
> lib/Sema/SemaStmtAttr.cpp
> test/CodeGen/pragma-unroll.cpp
> test/PCH/pragma-loop.cpp
> test/Parser/pragma-unroll.cpp
One minor comment.
> Index: include/clang/Basic/AttrDocs.td
> ===================================================================
> --- include/clang/Basic/AttrDocs.td
> +++ include/clang/Basic/AttrDocs.td
> @@ -1051,7 +1051,7 @@
>
> def LoopHintDocs : Documentation {
> let Category = DocCatStmt;
> - let Heading = "#pragma clang loop, #pragma unroll";
> + let Heading = "#pragma clang loop, #pragma unroll, #pragma nounroll";
The #pragma nounroll should actually go with the unroll docs heading.
I just had to split these up today.
Otherwise, LGTM!
~Aaron
More information about the cfe-commits
mailing list