llvm-project/clang/lib/Serialization
Erich Keane eba69b59d1 Reimplement __builtin_unique_stable_name-
The original version of this was reverted, and @rjmcall provided some
advice to architect a new solution.  This is that solution.

This implements a builtin to provide a unique name that is stable across
compilations of this TU for the purposes of implementing the library
component of the unnamed kernel feature of SYCL.  It does this by
running the Itanium mangler with a few modifications.

Because it is somewhat common to wrap non-kernel-related lambdas in
macros that aren't present on the device (such as for logging), this
uniquely generates an ID for all lambdas involved in the naming of a
kernel. It uses the lambda-mangling number to do this, except replaces
this with its own number (starting at 10000 for readabililty reasons)
for lambdas used to name a kernel.

Additionally, this implements itself as constexpr with a slight catch:
if a name would be invalidated by the use of this lambda in a later
kernel invocation, it is diagnosed as an error (see the Sema tests).

Differential Revision: https://reviews.llvm.org/D103112
2021-05-27 07:12:20 -07:00
..
ASTCommon.cpp [Clang][RISCV] Define RISC-V V builtin types 2021-02-18 10:17:31 +08:00
ASTCommon.h [OPENMP 5.0]Add initial support for 'allocate' directive. 2019-03-07 17:54:44 +00:00
ASTReader.cpp [clang][AST] Improve AST Reader/Writer memory footprint 2021-05-20 15:34:29 -07:00
ASTReaderDecl.cpp Treat implicit deduction guides as being equivalent to their 2021-05-19 13:31:53 -07:00
ASTReaderInternals.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ASTReaderStmt.cpp Reimplement __builtin_unique_stable_name- 2021-05-27 07:12:20 -07:00
ASTWriter.cpp [clang][AST] Improve AST Reader/Writer memory footprint 2021-05-20 15:34:29 -07:00
ASTWriterDecl.cpp Treat implicit deduction guides as being equivalent to their 2021-05-19 13:31:53 -07:00
ASTWriterStmt.cpp Reimplement __builtin_unique_stable_name- 2021-05-27 07:12:20 -07:00
CMakeLists.txt [openmp] Base of tablegen generated OpenMP common declaration 2020-06-23 10:32:32 -04:00
GeneratePCH.cpp [pch] Honour -fallow-pch-with-compiler-errors for overall compilation status 2020-03-31 13:50:12 -07:00
GlobalModuleIndex.cpp [clang][NFC] Use SmallString instead of SmallVector<char 2020-11-17 13:02:58 +00:00
InMemoryModuleCache.cpp Revert "[modules] Do not cache invalid state for modules that we attempted to load." 2020-03-10 10:59:26 -07:00
ModuleFile.cpp clang/Modules: Move Serialization/Module.{h,cpp} to ModuleFile, NFC 2019-11-21 19:07:00 -08:00
ModuleFileExtension.cpp [clang][modules] Use extensible RTTI for ModuleFileExtension 2021-03-05 11:11:05 +01:00
ModuleManager.cpp Change Module::ASTFile and ModuleFile::File => Optional<FileEntryRef>, NFC 2020-11-02 15:11:51 -05:00
MultiOnDiskHashTable.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PCHContainerOperations.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00