[PATCH] Add support for unroll pragma
Mark Heffernan
meheff at google.com
Tue Jul 1 15:59:37 PDT 2014
Thanks all for your comments. This patch reduces much of the implementation duplication from the previous patch. Unroll and loop optimization hints now both share the same attribute.
Also, the loop unroll pragma now replaces the "#pragma clang loop unroll/unroll_count" directives which have been removed. The following unroll pragma forms are supported:
#pragma unroll
#pragma unroll N
#pragma unroll(N)
The parentheses around the unroll count argument are optional. The form with parentheses is included to maximize compatibility with existing compilers (Intel and IBM compiler use the form with parentheses, CUDA uses the form without).
http://reviews.llvm.org/D4297
Files:
docs/LanguageExtensions.rst
docs/ReleaseNotes.rst
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticParseKinds.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Parse/Parser.h
include/clang/Sema/LoopHint.h
lib/Parse/ParsePragma.cpp
lib/Parse/ParseStmt.cpp
lib/Sema/SemaStmtAttr.cpp
test/CodeGen/pragma-loop.cpp
test/PCH/pragma-loop.cpp
test/Parser/pragma-loop.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4297.11012.patch
Type: text/x-patch
Size: 44866 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140701/3e1a452f/attachment.bin>
More information about the cfe-commits
mailing list