[PATCH] Add support for CUDA unroll pragma
Mark Heffernan
meheff at google.com
Wed Jun 25 13:28:13 PDT 2014
Hi aaron.ballman, eliben, TylerNowicki,
This patch adds support for the loop unroll pragma syntax defined in the CUDA c/c++ language:
// Fully unroll loop.
#pragma unroll
for (...) { }
// Unroll loop N times.
#pragma unroll N
for (...) { }
This pragma is only supported when compiling in CUDA mode (-x cuda). The "#pragma unroll" and "#pragma unroll N" have identical semantics to "#pragma clang loop unroll(enable)" and "#pragma clang loop unroll_count(N)" respectively.
Mark
http://reviews.llvm.org/D4297
Files:
docs/ReleaseNotes.rst
include/clang/Basic/Attr.td
include/clang/Basic/AttrDocs.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Basic/TokenKinds.def
include/clang/Parse/Parser.h
include/clang/Sema/CudaUnrollHint.h
lib/CodeGen/CGStmt.cpp
lib/CodeGen/CodeGenFunction.h
lib/Parse/ParsePragma.cpp
lib/Parse/ParseStmt.cpp
lib/Sema/SemaStmtAttr.cpp
test/CodeGen/cuda-pragma-unroll.cu
test/Misc/ast-print-cuda-pragmas.cu
test/PCH/cuda-pragma-unroll.cu
test/Parser/cuda-pragma-unroll.cu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4297.10856.patch
Type: text/x-patch
Size: 26914 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140625/7e8ef035/attachment.bin>
More information about the cfe-commits
mailing list