[MemProf] Update metadata verification for a single string tag (#172543)
The memprof metadata verifier supported multiple string tags, but in
reality, the other code (e.g. addCallStack) only supports a single such
tag. Update the verifier to reflect that limitation, and the associated
tests.
Fixes #157217
[NFC][llvm-ir2vec] llvm_ir2vec.cpp breakup to extract a reusable header for IR2VecTool, and MIR2VecTool classes (#172304)
Refactor llvm-ir2vec: Extract reusable header for Python bindings
Separated the IR2Vec/MIR2Vec tool implementation into a header file
(`llvm-ir2vec.h`) and implementation file (`llvm-ir2vec.cpp`) to enable
reuse in Python bindings and other projects.
Changes
- **Created `llvm-ir2vec.h`**: Contains `IR2VecTool` and `MIR2VecTool`
class definitions with all implementations, making it a standalone
header-only library
- **Simplified `llvm-ir2vec.cpp`**: Now contains only command-line
interface code (options, main function, and helper functions)
Motivation
The original monolithic `.cpp` file made it impossible to use
IR2Vec/MIR2Vec functionality in Python bindings without compiling the
entire command-line tool. This refactoring enables clean separation
[5 lines not shown]
[CodeGen][NPM] Update MPDT similar to MDT after unreachable BB elimination (#172421)
After unreachable machine basic blocks are removed, MPDT should also be
updated with the latest block numbers alongside MDT.
[CodeGenPrepare][NPM] Remove incorrect LoopAnalysis preservation in CodeGenPrepare (#172418)
CodeGenPrepare modifies and restructures loops & control flow. So, it
shouldn't preserve LoopAnalysis.
The test `llvm/test/CodeGen/AMDGPU/cf-loop-on-constant.ll` shows
CodeGenPrepare modifying loop structure, hence we cannot preserve
LoopAnalysis.
NAS-138985 / 26.04 / Allow importing an offline pool which already is in the database (#17848)
This PR adds changes to introduce a new endpoint which allows
reimporting a zfs pool which exists in the database but hasn't been
imported during boot stage on ZFS side. The use case currently is to
allow reimporting SED based pools which for some reason might not have
unlocked at boot (that should not be the case ideally speaking) but the
same endpoint could also be used to import pools for which for some
reason maybe the disks were not there or something similar and at boot
time the import had failed. Right now the only way to make this happen
would be remove that pool first and then import pool which will then
create a new entry in the database.
NAS-138988 / 26.04 / Make sure to umount docker on docker stop (#17851)
When an attachment delegate runs docker stop action, we stop docker
service but do not umount the ix-apps dataset which should be done as
well as that can cause problems. On docker start, it is already handled
to make sure that the dataset is mounted.
[DirectX] Move memset and memcpy handling to a new pass. NFC (#172921)
This introduces the DXILMemIntrinsics pass and moves memset and memcpy
handling from DXILLegalize to here. We need to do this so that we can
handle memory intrinsics before the DXILResourceAccess pass so that we
can properly deal with arrays and large structures in resources.
sigtimedwait(2): Return EINTR, not zero, if interrupted.
sigtimedwait(2) should never return zero: zero is not a valid signal
number, and sigtimedwait(2) is only supposed to return a valid signal
number (one of the signals in the input set) or -1.
Previously, if there was a timeout and the call was interrupted with
ERESTART/EINTR for a signal other than one we're waiting for, the
logic would call copyout to update the timeout -- and overwrite the
error code we were supposed to return (ERESTART/EINTR) with the error
code of copyout, even if copyout succeeds, leading the syscall to
return the zero-initialized value of ksi.ksi_signo. This also had
the effect of completely neutering the ERESTART logic: instead of
restarting, it would just return 0.
Now we overwrite the error code only if copyout fails.
PR standards/59586: sigwaitinfo() returns ECANCELED instead of EINTR
- POSIX compliance violation
sigtimedwait(2): Return EINTR, not ECANCELED.
The return value ECANCELED was a vestige of the logic to implement
sigtimedwait(2) in the SA (scheduler activations) era of NetBSD
multithreading. It was meant to be used purely internally to
libpthread, not meant to leak outside to the caller of
sigtimedwait(2). But in the removal of SA in the newlock2 branch,
something got lost in translation and we wound up having
sigtimedwait(2) return ECANCELED when it should return EINTR when it
is interrupted by an unblocked signal that was not in the signal set
passed as an argument to wait for.
POSIX.1-2024 sigtimedwait(2) spec:
https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/functions/sigtimedwait.html
PR standards/59586: sigwaitinfo() returns ECANCELED instead of EINTR
- POSIX compliance violation
t_sigtimedwait: Spruce up and add tests for interruption by signal.
PR standards/59586: sigwaitinfo() returns ECANCELED instead of EINTR
- POSIX compliance violation