llvm-project/libc/utils
Joseph Huber 55151e138d [libc] Add initial support for a libc implementation for the GPU
This patch contains the initial support for building LLVM's libc as a
target for the GPU. Currently this only supports a handful of very basic
functions that can be implemented without an operating system. The GPU
code is build using the existing OpenMP toolchain. This allows us to
minimally change the existing codebase and get a functioning static
library. This patch allows users to create a static library called
`libcgpu.a` that contains fat binaries containing device IR.

Current limitations are the lack of test support and the fact that only
one target OS can be built at a time. That is, the user cannot get a
`libc` for Linux and one for the GPU simultaneously.

This introduces two new CMake variables to control the behavior
`LLVM_LIBC_TARET_OS` is exported so the user can now specify it to equal
`"gpu"`. `LLVM_LIBC_GPU_ARCHITECTURES` is also used to configure how
many targets to build for at once.

Depends on D138607

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D138608
2022-11-29 14:51:54 -06:00
..
HdrGen [libc] Fix tablegen when using a runtimes build 2022-11-15 12:09:52 -06:00
IntegrationTest [libc] Add a simple implementation of the posix_spawn function. 2022-10-13 18:47:47 +00:00
LibcTableGenUtil [libc] Fix tablegen when using a runtimes build 2022-11-15 12:09:52 -06:00
MPFRWrapper [libc] Add a testing macro for MPFR matchers skipping `explainError` calls. 2022-10-26 18:11:45 -04:00
UnitTest [libc][math] Improve the performance and error printing of UInt. 2022-11-15 14:17:59 -05:00
buildbot
mathtools [libc][NFC] Add supporting class for atof implementation 2021-10-04 21:08:02 +00:00
testutils [libc] Specify rounding mode for strto[f|d] tests 2022-07-13 20:20:30 +00:00
tools [libc][cmake] Make `add_tablegen` calls match others 2022-01-24 18:36:37 +00:00
CMakeLists.txt [libc] Add initial support for a libc implementation for the GPU 2022-11-29 14:51:54 -06:00