Age | Commit message (Collapse) | Author | Files | Lines |
|
This is an implementation of floating point multiplication:
It will consist of
- `double x double -> float`
|
|
See Buildbot failure:
https://lab.llvm.org/buildbot/#/builders/138/builds/67337.
|
|
Part of #93566.
|
|
For baremetal targets that don't support FILE, this version of printf
just writes directly to a function provided by a vendor. To do this both
printf and vprintf were moved to /generic (vprintf since they need the
same flags and cmake gets funky about setting variables in one file and
reading them in another).
|
|
Summary:
The NVPTX build wasn't getting the `C++20` standard necessary for a few
files.
|
|
- addressed
https://github.com/llvm/llvm-project/pull/94317#issuecomment-2153103129
- added conditional in cmake file for exit_handler object library
Co-authored-by: Aaryan Shukla <aaryanshukla@google.com>
|
|
This adds:
- A ctor accepting a start and end iterator
- A ctor accepting a count and const T&
- size()
- subscript operators
- begin() and end() iterators
|
|
- added at_quick_exit function
- used helper file exit_handler which reuses code from atexit
- atexit now calls helper functions from exit_handler
- test cases and dependencies are added
---------
Co-authored-by: Aaryan Shukla <aaryanshukla@google.com>
|
|
functions (#94510)
#93566
|
|
(#94624)
|
|
Summary:
This reverts commit 574ab7e7b759a400ecf54c1141b1433bb2415e93.
|
|
bug. (#94569)
The conversion between _Float16 and long double will crash clang-11 on
aarch64. This is fixed in clang-12: https://godbolt.org/z/8ceT9454c
|
|
|
|
This is a mostly-target-independent variadic function optimisation and
lowering pass. It is only enabled for AMDGPU in this initial commit.
The purpose is to make C style variadic functions a zero cost
abstraction. They are lowered to equivalent IR which is then amenable to
other optimisations. This is inherently slightly target specific but
much less so than one might expect - the C varargs interface heavily
constrains the ABI design divergence.
The pass is primarily tested from webassembly. This is because wasm has
a straightforward variadic lowering strategy which coincides exactly
with what this pass transforms code into and a struct passing convention
with few cases to check. Adding further targets conventions is
straightforward and elided from this patch primarily to simplify the
review. Implemented in other branches are Linux X86, AMD64, AArch64 and
NVPTX.
Testing for targets that have existing lowering for va_arg from clang is
most efficiently done by checking that clang | opt completely elides the
variadic syntax from test cases. The lowering produces a struct for each
call site which can be inspected to check the various alignment and
indirections are correct.
AMDGPU presently has no variadic support other than some ad hoc printf
handling. Combined with the pass being inactive on all other targets
landing this represents strict increase in capability with zero risk.
Testing and refining will continue post commit.
In addition to the compiler tests included here, a self contained x64
clang/musl toolchain was constructed using the "lowering" instead of the
systemv ABI and used to build various C programs like lua and libxml2.
|
|
functions (#94535)
#93566
|
|
Implements fmaxf16 and fminf16, which are two missing functions listed
here: #93566
|
|
Summary:
The GPU needs both the loader utility and the architecture to be present
to run tests. This simply makes it easier to detect which is missing in
case of problems.
|
|
The epoll wait functions return structs via pointer, but those structs
need to be unpoisoned before return. This patch adds that unpoisoning.
|
|
|
|
{ceil,floor,round,roundeven,trunc}f16 (#94383)" (#94505)
This reverts commit fda1e4b01f723c31a36ad659564ae4a61365930e.
The commit caused Buildbot failures:
- https://lab.llvm.org/buildbot/#/builders/256/builds/14331
- https://lab.llvm.org/buildbot/#/builders/229/builds/27009
|
|
{ceil,floor,round,roundeven,trunc}f16 (#94383)
|
|
Summary:
These new tests fails on the GPU due to the exception testing. Disable
it for now because these aren't supported and can't be supported on
NVPTX.
|
|
#93566
|
|
- Implements forward iterators for `cpp::fixed_vector` to use in
https://github.com/llvm/llvm-project/pull/92009
|
|
#93566
|
|
#93566
|
|
|
|
|
|
functions (#94254)
https://github.com/llvm/llvm-project/issues/93566
|
|
|
|
|
|
math functions (#94218)
https://github.com/llvm/llvm-project/issues/93566
|
|
This manifests as `AddressSanitizer: stack-use-after-return` w/o this
change. The `~CheckFEnv()` method of checking fenv seems to only work
for test fixtures.
|
|
Summary:
These tools need to be built before we can do the library creation
stage. If they are generated in the same build then this is not
guaranteed so we should add explicit dependencies.
|
|
This is needed for the allocator implementation for malloc.
|
|
functions (#94001)
|
|
Summary:
You can build the GPU libc support in projects mode. There were some
issues with it not finding the correct binaries. This patch fixes that.
|
|
|
|
|
|
|
|
Summary:
Currently we just print the error as seen, this makes it difficult if
something goes wrong to know where it failed. This patch just adds in
line numbers to all the error handling routines so you can trace it
back.
|
|
forward fix for #93620
-GCC doesn't recognize [[clang:: ']] prefix, so restored the original
__attribute__ syntax
|
|
- In /libc/src/__support/ OSUtil, changed quick_exit to just exit, and
put in namespace
LIBC_NAMESPACE::internal.
- In /libc/src/stdlib added quick_exit
- Added test files for quick_exit
|
|
Needed to support i386 (#93709).
|
|
These changes slighly modify the output of the unittests so that they better
match GTest, so that utilities that parse the expected output from GTest (such
as Android's unit test harness) can read the output from our unit tests.
This allows our unit tests to be run on Android devices.
Add very primitive command line parsing to:
- support --gtest_color=no to disable printing terminal colors.
- recognize --gtest_print_time and print the test time in milliseconds.
- most of our unit tests run on the order of microseconds, so its useful to
preserve the existing behavior. But upsteram GTest ONLY prints time tests
in milliseconds, and Android's atest expects to be able to parse exactly
that. Atest always passes --gtest_print_time. The word `took` is removed as
that also differs from upstream GTest, tripping up parsers.
- ignore other --gtest_* flags
Do so so that atest can parse the output correctly.
Print the test number count before
each run, so that atest can parse this value correctly.
Link: https://android-review.googlesource.com/c/platform/external/llvm-libc/+/3107252
Link: https://google.github.io/googletest/advanced.html#colored-terminal-output
Link: https://google.github.io/googletest/advanced.html#suppressing-the-elapsed-time
|
|
cc @lntue
|
|
functions (#93622)
New pull request for https://github.com/llvm/llvm-project/issues/89443
The previous PR was reverted after breaking fullbuild due to a missing
struct declaration, which I forgot to commit.
Reverts revert and adds the missing pthread_rwlockattr_getkind_np /
pthread_rwlockattr_setkind_np functions and tests respecitvely.
|
|
Found while investigating #93709
|
|
This is the continuation of
https://github.com/llvm/llvm-project/pull/88674.
Fixes #88433, #90496.
---------
Co-authored-by: aniplcc <aniplccode@gmail.com>
|
|
|