[orc-rt] Add C API for Errors, plus ORC_RT_C_ABI macro. (#178794)
This commit introduces a C interface for the ORC runtime's Error
handling system, enabling C clients and language bindings to work with
ORC errors.
The ORC_RT_C_ABI macro applies __attribute__((visibility("default")))
(on platforms that support it), ensuring C API symbols are exported when
building the ORC runtime as a shared library. In the future I expect
that this will be extended to support other platforms (e.g. dllexport on
Windows).
[AMDGPU] Replace AMDGPUISD::FFBH_I32 with ISD::CTLS (#178420)
Per CDNA4 ISA:
V_FFBH_I32
Count the number of leading bits that are the same as the sign bit of a
vector input and store the result into a vector register. Store -1 if
all input bits are the same.
which matches CTLS semantics.
Addresses: https://github.com/llvm/llvm-project/issues/177635
[libc] provide str to float build configs (#178780)
The str to float code path offers options which can reduce code bloat.
Expose them as build config options. Disable Eisel Lemire for avoiding
code bloat caused by DETAILED_POWERS_OF_TEN look up table.
Simplify ALUA reset and eliminate overhead
Make iscsi.alua.reset_active a simple wrapper around the dlm job
of the same name. This will reduce overhead when called by
standby_after_start because it does not operate on the ACTIVE
node's cluster_mode.
Furthermore, remove iscsi.alua.active_elected entirely as it
duplicates functionality that will now be handled by reset_active.
We can also remove the chaining with activate_extents as it is
the STANDBY that needs to check that reset_active has completed,
which it now does in standby_after_start (via has_active_jobs).
[BOLT] Drop -znow requirement for PLT optimization on x86-64 (#178758)
On x86-64, PLT optimization does not require the binary to be linked
with -znow because indirect calls through GOT work correctly with lazy
binding. At runtime, the dynamic linker's resolver will populate the GOT
entry on the first call, just like with a regular PLT call.
This change removes the -znow requirement specifically for x86-64 while
keeping it for other architectures. I haven't checked RISV-V, but it's
still necessary on AArch64.
NAS-139413 / 26.0.0-BETA.1 / Improve resiliency in the NFS ci tests. (#18080)
Some of the NFS CI tests have demonstrated instability. It's been common
to see many failures in CI runs.
The failures are not due to an actual problem with the code under test.
It's the test infrastructure and other artificial conditions around the
CI test bed.
This PR addresses many of those problems by improving the resilience of
the tests.
This addresses issues that can be resolved within the CI tests
themselves.
Tested against single and HA VMs.
[lldb] Fix a compile error that came up with some compilers
Some versions will construct the DataExtractorSP here,
it seems. Others need it explicitly created.
firmware: Fix inverted FIRMWARE_GET_NOWARN logic
The try_binary_file() function has inverted logic for the
FIRMWARE_GET_NOWARN flag. When the flag is set (meaning "don't warn"),
the code sets warn=true and makes noise anyway.
Invert the assignment to warn to correctly suppress warnings when
FIRMWARE_GET_NOWARN is set.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D54955
[libc++][test] Make `EvilContainer` a sequence container (#178626)
In tests for flat container adaptors, the `EvilContainer` type doesn't
have sufficient constructors to meet the requirements for sequence
containers ([sequence.reqmts]). Also, assignment from an
`initializer_list` doesn't have correct return type.
This patch makes `EvilContainer` inherit constructors from `vector<int>`
and add a correct assignment operator from `initializer_list<int>`.
[lldb][NFC] Module, ModuleSpec, GetSectionData use DataExtractorSP (#178347)
In a PR last month I changed the ObjectFile CreateInstance etc methods
to accept an optional DataExtractorSP instead of a DataBufferSP, and
retain the extractor in a shared pointer internally in all of the
ObjectFile subclasses. This is laying the groundwork for using a
VirtualDataExtractor for some Mach-O binaries on macOS, where the
segments of the binary are out-of-order in actual memory, and we add a
lookup table to make it appear that the TEXT segment is at offset 0 in
the Extractor, etc. Working on the actual implementation, I realized we
were still using DataBufferSP's in ModuleSpec and Module, as well as in
ObjectFile::GetModuleSpecifications.
I originally was making a much larger NFC change where I had all
ObjectFile subclasses operating on DataExtractors throughout their
implementation, as well as in the DWARF parser. It was a very large
patchset. Many subclasses start with their DataExtractor, then create
smaller DataExtractors for parts of the binary image - the string table,
the symbol table, etc., for processing.
[26 lines not shown]
[CIR] Add lowering for BlockAddressOp, IndirectBrOp and LabelOp (#178106)
This PR introduces lowering support for gcc `labels-as-values` by
handling `LabelOp`, `BlockAddressOp` and `IndirectBrOp`.
Block tags are emitted to mark the target location in the IR,while block
address users may be created before their corresponding tag is
available. `LLVMBlockAddressInfo` is used to record unresolved
references and resolve them once all block tags have been emitted.
This enables a two phase lowering where block address users are first
materialized with placeholders and later updated with the resolved block
tag information.
SCHED_4BSD: maybe_resched() cannot schedule ast() for curthread
maybe_resched() needs to schedule TDA_SCHED for curthread, but this
requires taking curthread lock while owning some other thread lock.
To avoid introducing the order:
- Use a scheduler-private TDP flag.
- Register an unconditional TDA_SCHED_PRIV for 4BSD.
When an AST needs to be scheduled, i.e. the current thread must do
context switch in the return to userspace path, set the flag.
Then the ast handler calls ast_scheduler(), which gives the same
effect as scheduling TDA_AST.
The overhead is a single function call on each userspace return, for
4BSD case.
Reported and tested by: pho (previous version)
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D54945