[PATCH] D76620: [SYCL] Implement __builtin_unique_stable_name.

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 13 09:19:25 PDT 2020


erichkeane added a comment.

In D76620#2327901 <https://reviews.llvm.org/D76620#2327901>, @rjmccall wrote:

> You know on both sides that a lambda is used as a kernel, yes?  Why not simply introduce that into the mangling of lambdas, so that the subset of lambdas used as kernels form a stable sequence?

Coming up with said stable sequence is somewhat difficult as well.  A strict integer ordering didn't end up being stable, as some of the kernel handling can cause instantiations to happen in a slightly different ordering, which messed that up, as would use of the builtin. We wanted to find a way that was dependent on the source code alone.  The "Quick and Dirty" solution was line/column numbers, though we considered a hash of that same information to at least make it shorter.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76620/new/

https://reviews.llvm.org/D76620



More information about the cfe-commits mailing list