This is an archive of the discontinued LLVM Phabricator instance.

Change __builtin_sycl_unique_stable_name to just use an Itanium mangling
ClosedPublic

Authored by erichkeane on Sep 22 2021, 12:33 PM.

Details

Summary

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.

Diff Detail

Event Timeline

erichkeane created this revision.Sep 22 2021, 12:33 PM
erichkeane requested review of this revision.Sep 22 2021, 12:33 PM

@rjmccall : We were able to get the SYCL committee to change the rules to make this feature 'implementable' now based on your feedback, so here it is. This has been baking in our downstream for a while, so my hope is that this is sufficiently validated to be 'done' for a while.

bader added a comment.Sep 23 2021, 5:08 AM

LGTM, just one typo in addition to linter reports and I'd like John to take a look.

clang/docs/LanguageExtensions.rst
2524–2526

"a nd" -> "and"

fix typo that @bader found

rjmccall accepted this revision.Sep 27 2021, 8:58 PM

Oh, well, that's a huge simplification! Thank you for pushing on this with the language group. This LGTM.

This revision is now accepted and ready to land.Sep 27 2021, 8:58 PM
This revision was landed with ongoing or failed builds.Sep 28 2021, 6:41 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 28 2021, 6:41 AM