| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc][NFC] Remove all trailing spaces from libc (#82831) Summary: There are a lot of random training spaces on various lines. This patch just got rid of all of them with `sed 's/\ \+$//g'. | 2 年前 | |
[runtimes][GTest] LLVM-independent unittests (#164794) The LLVM-customized GTest has a dependency on LLVM to support llvm::raw_ostream and hence has to link to LLVMSupport. The runtimes use the LLVMSupport from the bootstrapping LLVM build. The problem is that the boostrapping compiler and the runtimes target can diverge in their ABI, even in the runtimes default build. For instance, Clang is built using gcc which uses libstdc++, but the runtimes is built by Clang which can be configured to use libcxx by default. Altough it does not use gcc, this issue has caused [flang-aarch64-libcxx](https://lab.llvm.org/buildbot/#/builders/89)) to break, and is still (again?) broken. This patch makes the runtimes' GTest independent from LLVMSupport so we do not link any runtimes component with LLVM components. Runtime projects that use GTest unittests: * flang-rt * libc * compiler-rt: Adds gtest-all.cpp with [GTEST_NO_LLVM_SUPPORT=1](https://github.com/llvm/llvm-project/blob/f801b6f67ea896d6e4d2de38bce9a79689ceb254/compiler-rt/CMakeLists.txt#L723) to each unittest without using llvm_gtest. Not touched by this PR. * openmp: Handled by #159416. Not touched for now by this PR to avoid conflict. The current state of this PR tries to reuse https://github.com/llvm/llvm-project/blob/main/third-party/unittest/CMakeLists.txt as much as possible, altough personally I would prefer to make it use "modern CMake" style. third-party/unittest/CMakeLists.txt will detect whether it is used in runtimes build and adjaust accordingly. It creates a different target for LLVM (llvm_gtest, NFCI) and another one for the runtimes (runtimes_gtest). It is not possible to reuse llvm_gtest for both since llvm_gtest is imported using find_package(LLVM) if configured using LLVM_INSTALL_GTEST. An alias default_gtest is used to select between the two. default_gtest could also be used for openmp which also supports standalone and [LLVM_ENABLE_PROJECTS](https://github.com/llvm/llvm-project/pull/152189) build mode. | 8 个月前 | |
[libc] Removed unused flags from baremetal cache files (#168942) These flags are not needed for building libc. | 8 个月前 | |
[libc] Implement pkey_alloc/free/get/set/mprotect for x86_64 linux (#162362) This patch provides definitions for pkey_* functions for linux x86_64. pkey_alloc, pkey_free, and pkey_mprotect are simple syscall wrappers. pkey_set and pkey_get modify architecture-specific registers. The logic for these live in architecture specific directories: * libc/src/sys/mman/linux/x86_64/pkey_common.h has a real implementation * libc/src/sys/mman/linux/generic/pkey_common.h contains stubs that just return ENOSYS. | 8 个月前 | |
[Clang] Gut the libc wrapper headers and simplify (#168438) Summary: These were originally intended to represent the functions that are present on the GPU as to be provided by the LLVM libc implementation. The original plan was that LLVM libc would report which functions were supported and then the offload interface would mark those as supported. The problem is that these wrapper headers are very difficult to make work given the various libc extensions everyone does so they were extremely fragile. OpenMP already declares all functions used inside of a target region as implicitly host / device, while these headers weren't even used for CUDA / HIP yet anyway. The only things we need to define right now are the stdio FILE types. If we want to make this work for CUDA we'd need to define these manually, but we're a ways off and that's way easier because they do proper overloading. | 8 个月前 | |
[libc] Fix broken links in libc (#145199) This PR fixes broken links in all files describing libc usage modes. Please let me know if there are any other places that need updating. --------- Co-authored-by: shubhp@perlmutter <shubhp@perlmutter.com> | 1 年前 | |
[libc] add an SVE implementation of strlen (#167259) This PR creates an SVE-based implementation for strlen by translating from the AOR code in tree. Microbenchmark shows improvements against NEON when N>=64. Although both implementations fall behind glibc by a large margin, this may be a good start point to explore SVE implementations. Together with the PR: 1. Added two more tests of strlen with special nul symbols. 2. Added strlen's fuzzer and fix a typo in previous heap fuzzer. === strlen(16 bytes) === libc: 1.56115 ns/call, 9.54499 GiB/s neon: 1.59393 ns/call, 9.34867 GiB/s sve: 1.66097 ns/call, 8.97134 GiB/s === strlen(64 bytes) === libc: 2.06967 ns/call, 28.7991 GiB/s neon: 2.59914 ns/call, 22.9325 GiB/s sve: 2.58628 ns/call, 23.0465 GiB/s === strlen(256 bytes) === libc: 3.74165 ns/call, 63.7202 GiB/s neon: 8.98243 ns/call, 26.5428 GiB/s sve: 7.36426 ns/call, 32.3751 GiB/s === strlen(1024 bytes) === libc: 10.5327 ns/call, 90.5438 GiB/s neon: 34.363 ns/call, 27.7529 GiB/s sve: 26.9329 ns/call, 35.4092 GiB/s === strlen(4096 bytes) === libc: 37.7304 ns/call, 101.104 GiB/s neon: 145.911 ns/call, 26.144 GiB/s sve: 103.208 ns/call, 36.9612 GiB/s === strlen(1048576 bytes) === libc: 9623.4 ns/call, 101.478 GiB/s neon: 36138.2 ns/call, 27.023 GiB/s sve: 26605.6 ns/call, 36.7051 GiB/s | 8 个月前 | |
| 8 个月前 | ||
[libc] Add missing dependencies for arpa/inet.h header. (#168951) Add dependency on headers with in_addr and in_addr_t type definitions to ensure that these headers will be properly installed by "install-libc" CMake target. | 8 个月前 | |
[libc] Fix building bitcode library for GPU (#100491) Summary: The GPU build provides a bitcode version of the library to mimic how NVIDIA and AMD provide their libraries. Previously we had the fatbinary archive that created the necessary dependency for this to actually build. Since it was removed we no longer had anything triggering this to build. I have no idea if there's a better way to force a custom command to actually be run in the same space as libraries, but the only thing I could come up with was a dummy target. | 1 年前 | |
[libc][NFC] Fix warnings in RPC server code | 8 个月前 | |
[libc][math] Add float-only implementation for atanf. (#167004) Algorithm: 1) atan(x) = sign(x) * atan(|x|) 2) If |x| > 1 + 1/32, atan(|x|) = pi/2 - atan(1/|x|) 3) For 1/16 < |x| < 1 + 1/32, we find k such that: | |x| - k/16 | <= 1/32. Let y = |x| - k/16, then using the angle summation formula, we have: atan(|x|) = atan(k/16) + atan( (|x| - k/16) / (1 + |x| * k/16) ) = atan(k/16) + atan( y / (1 + (y + k/16) * k/16 ) = atan(k/16) + atan( y / ((1 + k^2/256) + y * k/16) ) 4) Let u = y / (1 + k^2/256), then we can rewritten the above as: atan(|x|) = atan(k/16) + atan( u / (1 + u * k/16) ) ~ atan(k/16) + (u - k/16 * u^2 + (k^2/256 - 1/3) * u^3 + + (k/16 - (k/16)^3) * u^4) + O(u^5) With all the computations are done in single precision (float), the total of approximation errors and rounding errors is bounded by 4 ULPs. | 8 个月前 | |
[libc] Add support for MVE to Arm startup code (#167338) In order to have MVE support, the same bits of the CPACR register that enable the floating-point extension must be set. | 8 个月前 | |
[libc][math] Add float-only implementation for atanf. (#167004) Algorithm: 1) atan(x) = sign(x) * atan(|x|) 2) If |x| > 1 + 1/32, atan(|x|) = pi/2 - atan(1/|x|) 3) For 1/16 < |x| < 1 + 1/32, we find k such that: | |x| - k/16 | <= 1/32. Let y = |x| - k/16, then using the angle summation formula, we have: atan(|x|) = atan(k/16) + atan( (|x| - k/16) / (1 + |x| * k/16) ) = atan(k/16) + atan( y / (1 + (y + k/16) * k/16 ) = atan(k/16) + atan( y / ((1 + k^2/256) + y * k/16) ) 4) Let u = y / (1 + k^2/256), then we can rewritten the above as: atan(|x|) = atan(k/16) + atan( u / (1 + u * k/16) ) ~ atan(k/16) + (u - k/16 * u^2 + (k^2/256 - 1/3) * u^3 + + (k/16 - (k/16)^3) * u^4) + O(u^5) With all the computations are done in single precision (float), the total of approximation errors and rounding errors is bounded by 4 ULPs. | 8 个月前 | |
[Clang] Gut the libc wrapper headers and simplify (#168438) Summary: These were originally intended to represent the functions that are present on the GPU as to be provided by the LLVM libc implementation. The original plan was that LLVM libc would report which functions were supported and then the offload interface would mark those as supported. The problem is that these wrapper headers are very difficult to make work given the various libc extensions everyone does so they were extremely fragile. OpenMP already declares all functions used inside of a target region as implicitly host / device, while these headers weren't even used for CUDA / HIP yet anyway. The only things we need to define right now are the stdio FILE types. If we want to make this work for CUDA we'd need to define these manually, but we're a ways off and that's way easier because they do proper overloading. | 8 个月前 | |
[libc] fix readability-identifier-naming.ConstexprFunctionCase (#83345) Codify that we use lower_case for readability-identifier-naming.ConstexprFunctionCase and then fix the 11 violations (rather than codify UPPER_CASE and have to fix the 170 violations). | 2 年前 | |
[libc][Obvious] Add build folder to .gitignore. | 4 年前 | |
[libc] Fix Linux kernel headers being included on all OS's Summary: The changes in https://github.com/llvm/llvm-project/commit/43bd7e3bb903af5076a9552f4f64cfc5d58f76ce altered how we handled including headers, this included the system on the GPU target which poisoned the include path that was curated to not include any system headers. Change this to only apply is the target OS is Linux. | 8 个月前 | |
Rename top-level LICENSE.txt files to LICENSE.TXT This makes all the license filenames uniform across subprojects. Differential Revision: https://reviews.llvm.org/D98380 | 5 年前 | |
[libc] Add myself as maintainer for Public Headers / hdrgen (#135209) | 1 年前 | |
Add a director, along with README.txt and LICENSE.txt, for libc. llvm-svn: 372036 | 6 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 2 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 1 年前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 8 个月前 | ||
| 2 年前 | ||
| 4 年前 | ||
| 8 个月前 | ||
| 5 年前 | ||
| 1 年前 | ||
| 6 年前 |