[PATCH] D60455: [SYCL] Add support for SYCL device attributes
Mariya Podchishchaeva via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 9 07:49:29 PDT 2019
Fznamznon added inline comments.
================
Comment at: clang/include/clang/Basic/Attr.td:1000
+def SYCLDevice : InheritableAttr {
+ let Spellings = [GNU<"sycl_device">];
+ let Subjects = SubjectList<[Function, Var]>;
----------------
aaron.ballman wrote:
> Is there a reason to not also introduce a C++11 and C2x style spelling in the `clang` namespace? e.g., `[[clang::sycl_device]]`
I don't think that it makes sense because these attributes not for public consumption. These attributes is needed to separate code which is supposed to be offloaded from regular host code. I think SYCLDevice attribute actually doesn't need a spelling because it will be added only implicitly by compiler.
================
Comment at: clang/include/clang/Basic/Attr.td:1003
+ let LangOpts = [SYCL];
+ let Documentation = [Undocumented];
+}
----------------
aaron.ballman wrote:
> No new, undocumented attributes, please.
As I said, these attributes are not for public consumption. Should I add documentation in this case too?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60455/new/
https://reviews.llvm.org/D60455
More information about the cfe-commits
mailing list