Commit Graph

4 Commits

Author SHA1 Message Date
John McCall cec49a5836 Revert "[SYCL] Implement __builtin_unique_stable_name."
This reverts commit b5a034e771.

This feature was added without following the proper process.
2020-10-12 01:10:09 -04:00
Alexey Bader 9263931fcc [SYCL] Assume SYCL device functions are convergent
SYCL device compiler (similar to other SPMD compilers) assumes that
functions are convergent by default to avoid invalid transformations.
This attribute can be removed if compiler can prove that function does
not have convergent operations.

Reviewed By: Naghasan

Differential Revision: https://reviews.llvm.org/D87282
2020-09-29 15:23:50 +03:00
Erich Keane f89abd6923 [SYCL] Update __builtin_unique_stable_name for other backends.
The CUDA backend (and other downstreams) have trouble with the tilde and
arrow delimiter, so replace these with 'm' (for macro) and '_'.  Since
these are in the normal lambda ID location, the format of these should
not conflict with anything else.
2020-04-17 07:54:18 -07:00
Erich Keane b5a034e771 [SYCL] Implement __builtin_unique_stable_name.
In order to support non-user-named kernels, SYCL needs some way in the
integration headers to name the kernel object themselves. Initially, the
design considered just RTTI naming of the lambdas, this results in a
quite unstable situation in light of some device/host macros.
Additionally, this ends up needing to use RTTI, which is a burden on the
implementation and typically unsupported.

Instead, we've introduced a builtin, __builtin_unique_stable_name, which
takes a type or expression, and results in a constexpr constant
character array that uniquely represents the type (or type of the
expression) being passed to it.

The implementation accomplishes that simply by using a slightly modified
version of the Itanium Mangling. The one exception is when mangling
lambdas, instead of appending the index of the lambda in the function,
it appends the macro-expansion back-trace of the lambda itself in the
form LINE->COL[~LINE->COL...].

Differential Revision: https://reviews.llvm.org/D76620
2020-03-25 07:01:50 -07:00