summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenSYCL/unique_stable_name_windows_diff.cpp
AgeCommit message (Collapse)Author
2025-07-08[NFC][clang] Fix CodeGenSYCL::unique_stable_name_windows_diff test (#146854)Mariya Podchishchaeva
The test checks x86 target in fsycl-is-device mode. x86 is not a valid offloading target and IMO test meant to check fsycl-is-host mode to make sure host invocations of __builtin_sycl_unique_stable_name work correctly. This also switches the test to use sycl_entry_point attribute instead of sycl_kernel because the intention for the future SYCL changes is to use sycl_entry_point and eventually remove sycl_kernel attribute when sycl_entry_point supports enough SYCL cases. Fixes https://github.com/llvm/llvm-project/issues/146566 --------- Co-authored-by: Tom Honermann <tom@honermann.net> Co-authored-by: Victor Lomuller <victor@codeplay.com>
2024-11-02[NFC] Simple typo correction. (#114548)c8ef
2022-11-19Fix incorrect cast in VisitSYCLUniqueStableNameExprAlex Richardson
Clang language-level address spaces and LLVM pointer address spaces are not the same thing (even though they will both have a numeric value of zero in many cases). LangAS is a enum class to avoid implicit conversions, but eba69b59d1a30dead07da2c279c8ecfd2b62ba9f avoided the compiler error by adding a `static_cast<>`. While touching this code, simplify it by using CreatePointerBitCastOrAddrSpaceCast() which is already a no-op if the types match. This changes the code generation for spir64 to place the globals in the sycl_global addreds space, which maps to `addrspace(1)`. Reviewed By: bader Differential Revision: https://reviews.llvm.org/D138284
2021-09-28Change __builtin_sycl_unique_stable_name to just use an Itanium manglingErich Keane
After significant problems in our downstream with the previous implementation, the SYCL standard has opted to make using macros/etc to change kernel-naming-lambdas in any way UB (even passively). As a result, we are able to just emit the itanium mangling. However, this DOES require a little work in the CXXABI, as the microsoft and itanium mangler use different numbering schemes for lambdas. This patch adds a pair of mangling contexts that use the normal 'itanium' mangling strategy to fill in the "DeviceManglingNumber" used previously by CUDA. Differential Revision: https://reviews.llvm.org/D110281
2021-06-02[SYCL] Fix __builtin_sycl_unique_stable_name to work on windows/spirErich Keane
In the case where the device is an itanium target, and the host is a windows target, we were getting the names wrong, since in the itanium case we filter by lambda-signature. The fix is to always filter by the signature rather than just on non-windows builds. I considered doing the reverse (that is, checking the aux-triple), but doing so would result in duplicate lambda mangling numbers (from linux reusing the same number for different signatures).