Go to file
Matt Arsenault c65f966d76 Try to make builtin address space declarations not useless
The way address space declarations for builtins currently work
is nearly useless. The code assumes the address spaces used for
builtins is a confusingly named "target address space" from user
code using __attribute__((address_space(N))) that matches
the builtin declaration. There's no way to use this to declare
a builtin that returns a language specific address space.
The terminology used is highly cofusing since it has nothing
to do with the the address space selected by the target to use
for a language address space.

This feature is essentially unused as-is. AMDGPU and NVPTX
are the only in-tree targets attempting to use this. The AMDGPU
builtins certainly do not behave as intended (i.e. all of the
builtins returning pointers can never compile because the numbered
address space never matches the expected named address space).

The NVPTX builtins are missing tests for some, and the others
seem to rely on an implicit addrspacecast.

Change the used address space for builtins based on a target
hook to allow using a language address space for a builtin.
This allows the same builtin declaration to be used for multiple
languages with similarly purposed address spaces (e.g. the same
AMDGPU builtin can be used in OpenCL and CUDA even though the
constant address spaces are arbitarily different).

This breaks the possibility of using arbitrary numbered
address spaces alongside the named address spaces for builtins.
If this is an issue we probably need to introduce another builtin
declaration character to distinguish language address spaces from
so-called "target address spaces".

llvm-svn: 338707
2018-08-02 12:14:28 +00:00
clang Try to make builtin address space declarations not useless 2018-08-02 12:14:28 +00:00
clang-tools-extra Replace hardcoded format styles in a few tools with the default style in libFormat. 2018-08-02 10:30:56 +00:00
compiler-rt Add header guard to asan_report.h 2018-08-02 11:05:07 +00:00
debuginfo-tests [DWARF] Change a test to ensure the creation of a __debug_ranges section. 2018-07-31 19:37:29 +00:00
libclc atom: Use volatile pointers for cl_khr_{global,local}_int32_{base,extended}_atomics 2018-06-21 19:27:39 +00:00
libcxx Implement P1023: constexpr comparison operators for std::array 2018-08-02 02:11:06 +00:00
libcxxabi Update version to 8.0.0svn 2018-08-01 14:25:03 +00:00
libunwind Bump version number to 8.0.0svn 2018-08-01 15:22:27 +00:00
lld [lld] Make tests calling llvm-ar more robust 2018-08-02 11:33:54 +00:00
lldb Unit test for Symtab::InitNameIndexes 2018-08-02 10:13:18 +00:00
llgo
llvm [llvm-ar] Correct help text 2018-08-02 11:27:38 +00:00
openmp [OMPT,tests] Fix taskloop testcase scheduling effects 2018-08-01 16:15:18 +00:00
parallel-libs
polly [JSONExporter] Print instead of ignoring parser error. 2018-08-02 00:11:14 +00:00
README.md

README.md

Low Level Virtual Machine (LLVM)

This directory and its subdirectories contain source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and runtime environments.