[PATCH] D60455: [SYCL] Add sycl_kernel attribute for accelerated code outlining

Alexey Bader via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 2 00:24:32 PST 2019


bader marked 5 inline comments as done.
bader added inline comments.


================
Comment at: clang/test/SemaSYCL/kernel-attribute.cpp:4-5
+
+__attribute((sycl_kernel)) void foo() {
+}
----------------
aaron.ballman wrote:
> aaron.ballman wrote:
> > Missing some tests:
> > * test that both attributes can be applied to whatever subjects they appertain to
> > * test that neither attribute can be applied to an incorrect subject
> > * test that the attributes do not accept arguments
> > * test that the attribute is ignored when SYCL is not enabled
> > 
> > Are there situations where the attribute does not make sense, such as member functions, virtual functions, etc? If so, those are good test cases (and diagnostics) to add as well.
> Still missing a test that the attribute is ignored when SYCL is not enabled.
> Still missing a test that the attribute is ignored when SYCL is not enabled.

I think clang/test/SemaSYCL/kernel-attribute-on-non-sycl.cpp should check that. Please, let me know if you mean something else.

> This test should be on a templated function (we already demonstrated it only applies to templated functions, so the check for the argument is not what is failing).

Nice catch. Thanks!


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