https://github.com/tahonermann requested changes to this pull request.

Thanks @elizabethandrews, I very much like this approach! It hadn't occurred to 
me that the builtin function could just declare the extern unsized local memory 
array and have that just work. It's a very elegant solution that avoids what I 
expected to be potentially frustrating changes elsewhere in the front end!

I think we should (quickly, if possible) determine whether this approach works 
the same for CUDA and HIP (it looks to me like it should) and, if so, consider 
giving the builtin a more generic name (even if we don't expose it for other 
offload languages right away).

It would be great if we can diagnose (likely unintended) use of the builtin in 
host code. I realize that might mean having to test with actual kernel entry 
points rather than `SYCL_EXTERNAL` functions (or adding `#ifdef` cases to 
handle the host-side diagnostics), but I think that might be a good thing 
anyway since it looks like the builtin will have to be used in the same TU as 
the kernel is defined anyway.

I added some minor suggestions for the tests, but I think they already cover 
what needs to be.

https://github.com/llvm/llvm-project/pull/244373
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to