[SYCL] Forbid declaration of static non-const variable inside kernel.#1133
Closed
[SYCL] Forbid declaration of static non-const variable inside kernel.#1133
Conversation
Fznamznon
reviewed
Feb 17, 2020
clang/lib/Sema/SemaDecl.cpp
Outdated
Contributor
There was a problem hiding this comment.
Suggested change
| // Varification, that if a static variable has been declared, then it is | |
| // Static variables declared inside SYCL device code must be const or constexpr |
clang/lib/Sema/SemaDecl.cpp
Outdated
Contributor
There was a problem hiding this comment.
Suggested change
| // constant |
clang/lib/Sema/SemaDecl.cpp
Outdated
Contributor
There was a problem hiding this comment.
Suggested change
| !R.isConstant(Context)) { | |
| !R.isConstant(Context)) |
clang/lib/Sema/SemaDecl.cpp
Outdated
Contributor
There was a problem hiding this comment.
Suggested change
| ret_arr(); | |
| ret_arr(); |
Contributor
There was a problem hiding this comment.
Suggested change
| template <typename name, typename Func> | |
| template <typename Name, typename Func> |
e25a4ac to
7db72a0
Compare
…ernel, ifthe variable is not const. Signed-off-by: Aleksander Fadeev <aleksander.fadeev@intel.com>
7db72a0 to
8b5af68
Compare
vmaksimo
pushed a commit
to vmaksimo/llvm
that referenced
this pull request
Sep 1, 2021
The BuiltIn variable/call name in SPV-IR should stick to "__spirv_BuiltIn*", no matter what the SPIR-V linkage name is. This is a regression of PR intel#1133. Signed-off-by: Yilong Guo <yilong.guo@intel.com> Original commit: KhronosGroup/SPIRV-LLVM-Translator@894f95b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding the error, that forbid declaration of static variable inside kernel, if the variable is not const.
Signed-off-by: Aleksander Fadeev aleksander.fadeev@intel.com