llvm-project/clang/lib/Sema
Yaxun Liu a4005e13f7 [CUDA][HIP] Allow function-scope static const variable
CUDA 8.0 E.3.9.4 says: Within the body of a __device__ or __global__
function, only __shared__ variables or variables without any device
memory qualifiers may be declared with static storage class.

It is unclear how a function-scope non-const static variable
without device memory qualifier is implemented, therefore only static
const variable without device memory qualifier is allowed, which
can be emitted as a global variable in constant address space.

Currently clang only allows function-scope static variable with
__shared__ qualifier.

This patch also allows function-scope static const variable without
device memory qualifier and emits it as a global variable in constant
address space.

Differential Revision: https://reviews.llvm.org/D49931

llvm-svn: 338188
2018-07-28 03:05:25 +00:00
..
AnalysisBasedWarnings.cpp Implement cpu_dispatch/cpu_specific Multiversioning 2018-07-20 14:13:28 +00:00
CMakeLists.txt Compile SemaTemplate.cpp with /bigobj on MSVC 2018-07-28 01:29:31 +00:00
CodeCompleteConsumer.cpp Optionally add code completion results for arrow instead of dot 2018-05-25 12:56:26 +00:00
CoroutineStmtBuilder.h Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
DeclSpec.cpp [NFC] Rename clang::AttributeList to clang::ParsedAttr 2018-07-13 15:07:47 +00:00
DelayedDiagnostic.cpp [Sema] Make deprecation fix-it replace all multi-parameter ObjC method slots. 2018-03-29 17:34:09 +00:00
IdentifierResolver.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
JumpDiagnostics.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
MultiplexExternalSemaSource.cpp [clang-cl] Don't emit dllexport inline functions etc. from pch files (PR37801) 2018-06-25 13:23:49 +00:00
ParsedAttr.cpp [NFC] Rename clang::AttributeList to clang::ParsedAttr 2018-07-13 15:07:47 +00:00
Scope.cpp Revert r335019 "Update NRVO logic to support early return (Attempt 2)" 2018-06-19 05:35:30 +00:00
ScopeInfo.cpp [coroutines] Pass coro func args to promise ctor 2018-01-24 22:15:42 +00:00
Sema.cpp Implement cpu_dispatch/cpu_specific Multiversioning 2018-07-20 14:13:28 +00:00
SemaAccess.cpp [CodeComplete] Fix accessibilty of protected members from base class. 2018-07-19 13:32:00 +00:00
SemaAttr.cpp [NFC] Rename clang::AttributeList to clang::ParsedAttr 2018-07-13 15:07:47 +00:00
SemaCUDA.cpp [NFC] Rename clang::AttributeList to clang::ParsedAttr 2018-07-13 15:07:47 +00:00
SemaCXXScopeSpec.cpp Check returned type is valid before using it. 2018-07-07 00:17:25 +00:00
SemaCast.cpp [AST] Sink 'part of explicit cast' down into ImplicitCastExpr 2018-07-27 07:27:14 +00:00
SemaChecking.cpp Fold -Wreturn-stack-address into general initialization lifetime 2018-07-23 21:21:22 +00:00
SemaCodeComplete.cpp Refactor checking of switch conditions and case values. 2018-07-26 18:41:30 +00:00
SemaConsumer.cpp
SemaCoroutine.cpp Add caching when looking up coroutine_traits 2018-07-14 18:21:44 +00:00
SemaDecl.cpp [CUDA][HIP] Allow function-scope static const variable 2018-07-28 03:05:25 +00:00
SemaDeclAttr.cpp [RISCV] Add support for interrupt attribute 2018-07-26 17:37:45 +00:00
SemaDeclCXX.cpp [ARM64] [Windows] Follow MS X86_64 C++ ABI when passing structs 2018-07-26 22:18:28 +00:00
SemaDeclObjC.cpp AttributeList de-listifying: 2018-07-12 21:09:05 +00:00
SemaExceptionSpec.cpp PR38141: check whether noexcept-specifications are equivalent in redeclarations 2018-07-12 21:11:25 +00:00
SemaExpr.cpp Add missing temporary materialization conversion on left-hand side of . 2018-07-27 17:13:18 +00:00
SemaExprCXX.cpp Add missing temporary materialization conversion on left-hand side of . 2018-07-27 17:13:18 +00:00
SemaExprMember.cpp [Sema][ObjC] Do not DiagnoseUseOfDecl in LookupMemberExpr 2018-05-24 01:01:43 +00:00
SemaExprObjC.cpp [Sema][ObjC] Do not propagate the nullability specifier on the receiver 2018-07-26 17:51:13 +00:00
SemaFixItUtils.cpp [Sema] Revert r329346 because of memory sanitizer failures. 2018-04-05 22:15:42 +00:00
SemaInit.cpp Add missing temporary materialization conversion on left-hand side of . 2018-07-27 17:13:18 +00:00
SemaLambda.cpp Change \t to spaces 2018-07-20 08:19:20 +00:00
SemaLookup.cpp Change \t to spaces 2018-07-20 08:19:20 +00:00
SemaObjCProperty.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
SemaOpenMP.cpp [OPENMP] Fix PR38256: Fix locations of the artificial conditional op. 2018-07-25 14:40:26 +00:00
SemaOverload.cpp Add missing temporary materialization conversion on left-hand side of . 2018-07-27 17:13:18 +00:00
SemaPseudoObject.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
SemaStmt.cpp Refactor checking of switch conditions and case values. 2018-07-26 18:41:30 +00:00
SemaStmtAsm.cpp Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00
SemaStmtAttr.cpp [NFC] Rename clang::AttributeList to clang::ParsedAttr 2018-07-13 15:07:47 +00:00
SemaTemplate.cpp [Sema] Use a TreeTransform to extract deduction guide parameter types 2018-07-27 21:23:48 +00:00
SemaTemplateDeduction.cpp [clang:sema] de-duplicate getDepthAndIndex helpers 2018-07-25 18:11:01 +00:00
SemaTemplateInstantiate.cpp [clang:sema] de-duplicate getDepthAndIndex helpers 2018-07-25 18:11:01 +00:00
SemaTemplateInstantiateDecl.cpp AttributeList de-listifying: 2018-07-12 21:09:05 +00:00
SemaTemplateVariadic.cpp [clang:sema] de-duplicate getDepthAndIndex helpers 2018-07-25 18:11:01 +00:00
SemaType.cpp [ASTImporter] Fix poisonous structural equivalence cache 2018-07-17 12:39:27 +00:00
TreeTransform.h Refactor checking of switch conditions and case values. 2018-07-26 18:41:30 +00:00
TypeLocBuilder.cpp [Sema] Fix bug in TypeLocBuilder::pushImpl 2016-02-18 21:05:09 +00:00
TypeLocBuilder.h Remove \brief commands from doxygen comments. 2018-05-09 01:00:01 +00:00