]> granicus.if.org Git - clang/commit
[cuda] Allow using integral non-type template parameters as launch_bounds attribute...
authorArtem Belevich <tra@google.com>
Tue, 21 Apr 2015 22:55:54 +0000 (22:55 +0000)
committerArtem Belevich <tra@google.com>
Tue, 21 Apr 2015 22:55:54 +0000 (22:55 +0000)
commit9f539454a35198c2e8d99ddde3e8a44314fb87f2
treef5d1cf408dd3cd687a01c87ee225e7ee347c18c7
parente582d0c81e0f7e9a4838f7c6a925743bffb628f8
[cuda] Allow using integral non-type template parameters as launch_bounds attribute arguments.

 - Changed CUDALaunchBounds arguments from integers to Expr* so they can
   be saved in AST for instantiation.
 - Added support for template instantiation of launch_bounds attrubute.
 - Moved evaluation of launch_bounds arguments to NVPTXTargetCodeGenInfo::
   SetTargetAttributes() where it can be done after template instantiation.
 - Added a warning on negative launch_bounds arguments.
 - Amended test cases.

Differential Revision: http://reviews.llvm.org/D8985

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@235452 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/Attr.td
include/clang/Basic/DiagnosticSemaKinds.td
include/clang/Sema/Sema.h
lib/CodeGen/TargetInfo.cpp
lib/Sema/SemaDeclAttr.cpp
lib/Sema/SemaTemplateInstantiateDecl.cpp
test/CodeGenCUDA/launch-bounds.cu
test/SemaCUDA/launch_bounds.cu