Summary:
This improves performance by reducing the amount of RMW operations we
need to do to a single slot. This improves repeated allocations without
much contention about ten percent.
Fixes [#141505](https://github.com/llvm/llvm-project/issues/141505)
The main intention behind this PR is to update the
LibCTargetArchitecture for arm64 to use the implementation of aarch64
architecture and not arm32.
This is a historical issue , and is a blocker to issue #138407.
The intended fix is to set the `LibCTargetArchitecture` to aarch64 when
it matches arm64 , this in turn would help us run darwin/aarch64
specific code on our MacOs pipeline in the git actions.
Methods used to search and find "darwin/arm" directories was
1. "find . -type d -path "*/libc/*/darwin/arm" in a linux terminal to
check for arm specifically
2. "find . -type d -path "*/libc/*/darwin/*" to ensure there are no
directories that are named "*arm*" where star is a wildcard for any
character.
See PR #132823 for a previous change to sys/epoll tests, and prior
changes before that.
ErrnoCheckingTest ensures that errno is properly reset at the beginning
of the test case, and is validated at the end of it. This change removes
many instances of manual errno manipulation.
Summary:
This is the big patch that implements an efficient device-side `malloc`
on the GPU. This is the first pass and many improvements will be made
later.
The scheme revolves around using a global reference counted pointer to
hand out access to a dynamically created and destroyed slab interface.
The slab is simply a large bitfield with one bit for each slab. All
allocations are the same size in a slab, so different sized allocations
are done through different slabs.
Allocation is thus searching for or creating a slab for the desired
slab, reserving space, and then searching for a free bit. Freeing is
clearing the bit and then releasing the space.
This interface allows memory to dynamically grow and shrink. Future
patches will have different modes to allow fast first-time-use as well
as a non-RPC version.
These functions don't have a _time64 variant, so we can't use time_t
directly (since our time_t is a uint64_t). The workaround is to use
longs when doing the syscall and write back when necessary.
Some code paths normalize ".." and thus don't create the directory. But some execute in a
shell thus requiring the directory to exist to be able to take the parent directory.
This patch normalizes all the `TARGET_SUBDIR` variables to avoid this issue.
Previously, the test failed due to isnan() and isinf() not being
defined.
This patch follows other tests in the same directory and calls isnan and
isinf from the FBits class.
---------
Co-authored-by: OverMighty <its.overmighty@gmail.com>
This patch updates the riscv entrypoints with almost all functions that
are currently supported on x86. I left six functions commented, as I'll
send separate PRs to enable them:
* poll: needs a new syscall implementation
* utimes: needs a new syscall implementation
* setitimer: test never finished in rv32
* getitimer: test fails in rv32
* exp10m1f: test case doesn't build but it's an easy fix
* sqrtulk: needs to be implemented
I also added the 16-bit fp functions, however, they are not enabled due
to a cmake check in float16-macros.h. To enable 16-bit fp in riscv, we
need to update the buildbots with a clang version that includes the fix
from commit PR #119481
This patch fixes the following error on rv32 (and possibly other 32-bit
archs):
FPBits.h:760:40: error: implicit conversion loses integer precision:
'int' to 'size_t' (aka 'unsigned int')
[-Werror,-Wimplicit-int-conversion]
760 | result.set_significand(number >> -ep);
Fixes#138425.