llvm-capstone/libc
Joseph Huber 1b823abea7 [libc] Add support for global ctors / dtors for AMDGPU
This patch makes the necessary changes to support calling global
constructors and destructors on the GPU. The patch in D149340 allows the
`lld` linker to create the symbols pointing us to these globals. These
should be executed by a single thread, which is more difficult on the
GPU because all threads are active. I chose to use an atomic counter to
sync every thread on the GPU. This is very slow if you use more than a
few thousand threads, but for testing purposes it should be sufficient.

Depends on D149340 D149363

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D149398
2023-04-29 08:40:20 -05:00
..
AOR_v20.02
benchmarks [NFC][TargetParser] Replace uses of llvm/Support/Host.h 2023-02-10 09:59:46 +00:00
cmake/modules [libc] Add a new target named LibcHermeticTestMain. 2023-04-26 23:10:16 +00:00
config [libc] Implement exit for the GPU partially 2023-04-27 20:32:00 -05:00
docs [libc] Support the abs functions in the GPU libc. 2023-04-27 20:31:59 -05:00
examples Revert "Revert "Revert "[CMake] Bumps minimum version to 3.20.0.""" 2023-04-15 20:12:24 +02:00
fuzzing [libc] add exception to atof differential fuzz 2023-04-28 13:50:40 -07:00
include [libc] Support the string conversion methods on the GPU 2023-04-27 20:31:58 -05:00
lib [libc] Build two different static archives libc.a and libm.a under full build. 2023-01-31 21:45:08 +00:00
spec [LIBC] Implement remainder of posix 'sched.h' minus SCHED_SPORADIC 2023-04-20 14:53:41 -05:00
src [libc] Fix printing on the GPU when given a cpp::string_ref 2023-04-28 21:32:01 -05:00
startup [libc] Add support for global ctors / dtors for AMDGPU 2023-04-29 08:40:20 -05:00
test [libc] Add support for global ctors / dtors for AMDGPU 2023-04-29 08:40:20 -05:00
utils [libc] Fix printing on the GPU when given a cpp::string_ref 2023-04-28 21:32:01 -05:00
.clang-tidy [libc][NFC] Clean up clang-tidy warnings for src/__support and src/math. 2023-03-15 18:47:31 -04:00
.gitignore
CMakeLists.txt [libc][Obvious] Enable hermetic tests only under full build. 2023-04-24 23:21:43 +00:00
common_libc_tuners.cmake [libc][NFC] Make tuning macros start with LIBC_COPT_ 2023-02-15 10:00:16 +00:00
LICENSE.TXT
README.txt

LLVM libc
=========

This directory and its subdirectories contain source code for llvm-libc,
a retargetable implementation of the C standard library.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.