[libc++][test] Fix construction and comparison for testing allocators (#212702)
Previously, there were several issues in the allocators provided by
`min_allocator.h` and `test_allocator.h`.
1. Some allocators did not support heterogenous rebinding construction,
and thus failed to meet the Cpp17Allocator named requirements.
2. Some allocators only had `operator==`. This was fine since C++20 but
not in C++17 where there were no rewritten candidates of `!=`.
3. Many equality operators were non-template and homogeneous. This
caused ambiguity since C++20 due to rewritten candidates.
This patch fixes these issues by
- adding missing constructors,
- adding missing `operator!=` (in pre-C++20 modes), and
- making `operator==` and some `operator!=` templates.
Note that it is intended that `operator==`'s for `test_allocator`
perform seemingly redundant constructions (via `static_cast<const
[3 lines not shown]
[libc++] Move lerp to its own header instead of <cmath> (#213111)
This moves <cmath> towards an umbrella header.
Co-authored-by: A. Jiang <de34 at live.cn>
[libc++] Refactor the conditions for enabling assertion tests (#213294)
Every hardening assertion test used to repeat a hand-rolled set of Lit
conditions like `has-unix-headers` and a bunch of others. Instead,
define a single Lit feature to handle all of them.
Assisted by Claude
Fixes #213148
[libc++] Add missing return 0 to main functions in tests (#214190)
The libc++ test suite requires main() to explicitly return a value,
since freestanding support requires it.
[AsmPrinter] Emit STT_OBJECT type and size for jump tables (#214170)
Before this change, jump tables placed in a separate section were
emitted with no symbol type, leaving them STT_NOTYPE, and with no size
in their ELF file.
This change annotates the jump tables with object type and a size when
the target supports type/size directives. Jump tables inlined into the
function's own section are already covered by that function's symbol, so
they are left as-is.
This helps when disassembling a file, to understand that the jump table
is a single complete object, rather than the symbol being purely a
location. I think this reflects the ELF semantics better.
[AMDGPU][GlobalISel] Pre-commit tests for readanylane merge regbank combine (NFC)
Add regbank-combiner tests covering a copy to vgpr whose source is a
merge or build_vector of G_AMDGPU_READANYLANE results and uniform
values. These currently keep the round trip through sgprs, and also
cover the cases where the merge has another user and where all merge
sources are uniform.
Co-authored-by: Cursor <cursoragent at cursor.com>
[ORC] Make ExecutionSession non-copyable / non-moveable. (#214231)
Many ORC classes capture references to the ExecutionSession -- it is not
intended to be moved or copied.
tests/lorder_test: Update test case description from copy/paste
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 5a674a0694836616eaaff448345823594742ad76)
tests/lorder_test: Update test case description from copy/paste
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit 5a674a0694836616eaaff448345823594742ad76)
libdtrace: Fix dt_print_sym() not printing symbols in non-oformat mode
dt_print_sym() fills the symbol string via snprintf() in non-oformat
mode but the guarding `dtp->dt_oformat != 0 &&` for the dt_printf()
call causes the symbol is computed but never emitted.
This fixes tests:
- common.profile-n.t_dtrace_contrib.tst_sym_ksh
- common.profile-n.t_dtrace_contrib.tst_func_ksh
Reviewed by: markj
Fixes: 93f27766a7e1 ("dtrace: Add the 'oformat' libdtrace option")
MFC after: 3 days
Event: Halifax Hackathon 202606
Location: Room 208, Computer Science Building, Dalhousie University
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57895
(cherry picked from commit 8e61d8707f8a10acc143210089fea2502a3f2922)
libdtrace: Fix dt_print_sym() not printing symbols in non-oformat mode
dt_print_sym() fills the symbol string via snprintf() in non-oformat
mode but the guarding `dtp->dt_oformat != 0 &&` for the dt_printf()
call causes the symbol is computed but never emitted.
This fixes tests:
- common.profile-n.t_dtrace_contrib.tst_sym_ksh
- common.profile-n.t_dtrace_contrib.tst_func_ksh
Reviewed by: markj
Fixes: 93f27766a7e1 ("dtrace: Add the 'oformat' libdtrace option")
MFC after: 3 days
Event: Halifax Hackathon 202606
Location: Room 208, Computer Science Building, Dalhousie University
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57895
(cherry picked from commit 8e61d8707f8a10acc143210089fea2502a3f2922)
rc.d/bthidd: Correct load_kld invocations
Pass a single module name to load_kld for kbdmux and vkbd, allowing
bthidd_prestart to load both modules successfully.
Fixes: cfe1962a1925 (rc: Fix improper use of load_kld)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit b5fe1bc5c6e4b483aacadddd8bdf37aa12c89982)
rc.d/bthidd: Correct load_kld invocations
Pass a single module name to load_kld for kbdmux and vkbd, allowing
bthidd_prestart to load both modules successfully.
Fixes: cfe1962a1925 (rc: Fix improper use of load_kld)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
(cherry picked from commit b5fe1bc5c6e4b483aacadddd8bdf37aa12c89982)
[flang][cuda] Delay box cuf.alloc past host association captures (#214347)
CUFAllocDelay treated the store of a descriptor into a host association
tuple as a use, so a device allocatable captured by an internal
procedure kept its descriptor allocation in the prologue. That allocates
managed memory before the program can call cudaSetDevice, binding a CUDA
context to the wrong device.
The store now sinks together with the allocation, constrained by the
tuple's readers, and the group is placed at the nearest common dominator
of all uses so it can sink into a later block.
devel/jenkins{,-lts}: Fix rc script output handling
- Add -f to daemon(8) so the service does not keep the caller's
terminal or pipe open. Before this, `service jenkins restart | tail`
hung forever.
- Let rc.subr handle the user switch instead of a custom start_cmd.
Sponsored by: The FreeBSD Foundation
[CIR][SYCL] Support SYCL kernel call statement in host codegen (#213728)
Add CIRGen support for lowering SYCLKernelCallStmt during host
compilation, emitting the kernel launch statement in place of the
`sycl_kernel_entry_point` function body (mirroring classic CodeGen).
Device compilation, were the offload kernel caller entry point
is emitted instead, is future work and thus marked as NIY.
[NPM] Make few more passes required - 2 (#213608)
as discussed in https://github.com/llvm/llvm-project/pull/203511, few of
these should not really be required (such as sink) with O0/opt-none, yet
we require this for consistency between legacy and NPM. We need to look
at the passes separately and selectively make strictly optimizing passes
optional.