[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-27 Thread Erich Keane via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGeba69b59d1a3: Reimplement __builtin_unique_stable_name- (authored by erichkeane). Herald added a project: clang. Repository: rG LLVM Github

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. LGTM, thanks Erich! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103112/new/ https://reviews.llvm.org/D103112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/test/CodeGenSYCL/unique_stable_name.cpp:86-89 + // FIXME: Ensure that j is incremented because VLAs are terrible. + int j = 55; + puts(__builtin_sycl_unique_stable_name(int[++j])); + // CHECK: call spir_func void

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-27 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/test/CodeGenSYCL/unique_stable_name.cpp:86-89 + // FIXME: Ensure that j is incremented because VLAs are terrible. + int j = 55; + puts(__builtin_sycl_unique_stable_name(int[++j])); + // CHECK: call spir_func void @puts(i8

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/LangOptions.h:448 + + bool isSYCL() const { return SYCLIsDevice || SYCLIsHost; } }; erichkeane wrote: > aaron.ballman wrote: > > FWIW, we also have `SYCLVersion != SYCL_None` as a

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-27 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/include/clang/AST/Expr.h:2045 +// representation of the type (or type of the expression) in a way that permits +// us to properly encode information about the SYCL kernels. +class UniqueStableNameExpr final

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-27 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/include/clang/Basic/LangOptions.h:448 + + bool isSYCL() const { return SYCLIsDevice || SYCLIsHost; } }; FWIW, we also have `SYCLVersion != SYCL_None` as a possible way to express this. Perhaps we should

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. LGTM, thanks! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103112/new/ https://reviews.llvm.org/D103112 ___ cfe-commits mailing list

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 348142. erichkeane added a comment. Apply clang-format patch, except for the changes to IdentifierTable. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103112/new/ https://reviews.llvm.org/D103112 Files: clang/docs/LanguageExtensions.rst

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 348121. erichkeane marked 4 inline comments as done. erichkeane added a comment. Ok, this should get me up to date! Fixed a bunch of the comments referring to 'expression', added LangOpts::isSYCL, and changed it to DiscriminatorOverride. CHANGES SINCE

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Thanks, that seems to work out cleanly. Comment at: clang/include/clang/AST/Expr.h:2045 +// representation of the type (or type of the expression) in a way that permits +// us to properly encode information about the SYCL kernels. +class

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 348109. erichkeane added a comment. Woops! Last update was JUST the changes, and I forgot to squash. Here is the whole patch. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103112/new/ https://reviews.llvm.org/D103112 Files:

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 348108. erichkeane added a comment. Herald added subscribers: phosek, aheejin, dschuff. Replace the DeviceLambdaManglingNumber mechanism with the callback mechanism. Hopefully this is what you were thinking @rjmccall. CHANGES SINCE LAST ACTION

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 348060. erichkeane added a comment. Remove 'expression' form per suggestion. Still need to do the device-mangling-number removal/rewrite business. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103112/new/ https://reviews.llvm.org/D103112

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2443 + // Computes a unique stable name for the type of the given expression. + constexpr const char * __builtin_unique_stable_name( expression ); + rjmccall wrote: > These need to

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2443 + // Computes a unique stable name for the type of the given expression. + constexpr const char * __builtin_unique_stable_name( expression ); + These need to be updated for the

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane updated this revision to Diff 348025. erichkeane marked 7 inline comments as done. erichkeane added a comment. Fix comments from aaron. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103112/new/ https://reviews.llvm.org/D103112 Files: clang/docs/LanguageExtensions.rst

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2413 +(or type of the expression) that is stable across split compilations, mainly to +support SYCL/Data Parallel C++ language. + rjmccall wrote: > The semantics here seem specific

[PATCH] D103112: Reimplement __builtin_unique_stable_name as __builtin_sycl_unique_stable_name

2021-05-26 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2408 +``__builtin_sycl_unique_stable_name`` + + Underlines look off now, so this likely causes Sphinx warnings. Comment at: