Fix TrueSearch times, service gates and system dataset handling
truesearch.query:
- A stat time that datetime cannot hold, such as a year after 9999,
is null. One such file no longer fails the query. A time is not
rounded into the next second.
- A list of the indexed datasets that was read across a configure or
a mount serves one query and is not kept.
- "/mnt/" is refused, as "/mnt" is.
- A recursive query as a user skips a directory that is gone. A user
who cannot reach the path gets a CallError with EACCES.
- A date filter gives a year of four digits. A date outside the years
1 to 9999 in UTC is a validation error.
- The method docstring no longer describes parameters. The username
field says that the user must be able to access path.
The service:
- configure() logs a start, restart, reload or stop that systemd
reports failed. It then does not wait for released datasets. It
[19 lines not shown]
[GlobalDCE] only mark a virtual function as live when its vtable is live (#232495)
Previously, when using virtual function elimination, a virtual call
would mark all implementations of that virtual function as live, even if
their vtable was never actually used. This can happen in C++, but is
much more common in Rust.
The change here is to only keep the implementation if:
1. there is a virtual call to the function
2. the vtable of the implementation is live
This change has knock-on effects where potentially there is now only one
vtable in a typeid and hence calls can be devirtualized. It also in
general helps with code size of course.
The gist of the change is that we store virtual functions (and their
caller) into a separate work list. Then in
`ScanTypeCheckedLoadIntrinsics` we only mark a virtual function as live
[22 lines not shown]
[OpenACC] NYI complex multiply reductions in recipe materialization (#240921)
A reduction whose operator is mul and whose type contains a complex
element cannot be lowered by reducing the real and imaginary parts
independently, because multiplication mixes the two components. Emit a
not-yet-implemented diagnostic when acc-recipe-materialization
materializes such a recipe, instead of producing silent wrong answers
downstream.
Attributor: Only look up the associated function of function interfaces
isValidIRPositionForUpdate only needs the associated function of
function interface positions, but computed it for every position,
which for call site positions looks for callback arguments.
attributor-light is up to 1.1% faster (callgrind).
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[LTO] Fix order dependence in the escaped-symbol IR name mismatch check (#240648)
LTO::addModuleToGlobalRes marks a symbol external when two copies of it
have different IR names, such as @"\01_foo" and @foo on Mach-O, which
name the same symbol but are separate IR globals (#57864). The check
compared against GlobalRes.IRName after the prevailing copy had already
replaced it with its own IR name, so it only caught the mismatch when
the prevailing definition was added before the differently named
reference. With the reference first, the definition could be
internalized and deleted as dead, leaving the reference undefined at
link time.
I came across this while working on a fix for Clang when you have an asm
label "_foo" and then a global "foo" and they don't lower to a single IR
symbol (the former gets "@_foo" and the latter "foo") but they do lower
to the same object symbol. This breaks things like linkonce odr
handling, internalizing, etc. I'm working on a Clang fix for this as
well (since this LTO fix won't address the single file case)
[AMDGPU] Price misaligned flat and LDS accesses with the LDS misaligned bug
In WGP mode on subtargets with the LDS misaligned bug, a flat access is
split into pieces no wider than its alignment and no narrower than 4
bytes, and an LDS access aligned below 4 bytes uses 8-byte pieces as one
aligned to 4 does.
[AMDGPU] Price buffer fat pointer memory operations
Price buffer fat pointer accesses as global accesses, except that an
aligned load is not widened and a vector of odd width elements is not
split element by element. Without relaxed buffer bounds checking, a
vector of elements that are a multiple of 32 bits wide is accessed in
pieces no wider than its alignment and no narrower than 4 bytes, and a
vector of other byte-sized or power of 2 wide elements in pieces of the
largest power of 2 bytes that divides the element size. The width comes
from buffer fat pointer lowering, which now exposes it. When the pointer
is a buffer resource plus a constant offset, the offset and a constant
number of records give the same bounds facts lowering uses to access it
in wider pieces.
[OpenMP][OMPIRBuilder] Propagate custom mapper errors from createTarget
When a custom mapper callback failed while emitting the kernel launch of a
target region, emitTargetCall wrapped the error in cantFail and crashed,
although createTarget already reports errors to its caller. MLIR
translation hits this when an omp.target uses a declare mapper that it
cannot translate yet, such as one with iterator map entries, while
omp.target_data reports the same mapper as not yet implemented.
Return the error from emitTargetCall and pass it on from createTarget, so
callers report it instead of crashing. When emitIfClause stops on such an
error, it now inserts the blocks it has not emitted yet into the function,
so they are not leaked.
Assisted with Claude Opus 5.5.
virtio_random: defer first enqueue until after DRIVER_OK
According to the virtio spec:
> The driver MUST NOT send any buffer available notifications to the
> device before setting DRIVER_OK.
DRIVER_OK isn't set until after attach completes, so defer the first
enqueue. We haven't found any problems as a result of this to the best
of my knowledge: q35 and other devices that we *have* been used with
will apparently check when we go DRIVER_OK.
Tested with q35 virtio-random, which still works.
Approved by: re (cperciva)
Reported by: llm-postcr
Reviewed by: kfv, markj
Fixes: f1c5a2e3a62505 ("virtio_random: Pipeline fetching the data")
Sponsored by: Stormshield
[4 lines not shown]
virtio_pci_modern: enable virtqueues before completing attach
Most of our drivers setup interrupt(s) and virtqueues are enabled at
that time, but nothing will currently enable them for devices that we're
only going to poll. This most notably affects virtio-random, and the
problem can be observed with qemu's q35 emulation and a random device
attached. The q35 implementation ignores the ring unless it's enabled,
so vtrnd_harvest() will consistently EAGAIN rather than contribute
anything of value, but with this patch it becomes functional.
This can be reproduced with a qemu invocation like so:
qemu-system-x86_64 -machine q35,accel=tcg -cpu max -smp 2 -m 2G \
-drive file=FreeBSD-16.0-CURRENT-amd64-ufs.qcow2,if=virtio \
-device pcie-root-port,id=rp1,bus=pcie.0,chassis=1 \
-object rng-random,id=rng0,filename=/dev/urandom \
-device virtio-rng-pci,rng=rng0,bus=rp1 \
-display curses
[7 lines not shown]
[SystemZ][z/OS] Reorder checks needConversion and shouldUseMmap. (#240900)
Reorder the two checks and also remove return false on z/OS in
shouldUseMmap, so binary files can be memory-mapped on z/OS.
This fixes llvm/unittests/Support/MemoryBufferTest.cpp which is
currently failing on z/OS.
Attributor: Fix build with older GCC after AAKindSet (#240975)
Older GCC versions cannot compare the addresses of distinct static
members in constant expressions, so computing the AAKindSet bits
failed. Compare the IDs as template arguments instead, and construct
the sets with AAKindSet::get from the IDs as template arguments.
Fixes cbc7d9da9b06.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[AMDGPU] Address review comments
Return ~0u from getWaitForScore for no wait, drop else after return,
brace the VA_VDST_WR dispatch, and assert that the ordered XDL count is
only queried for a pending write. Add CFG merge tests where the merge
lowers a count and where only one predecessor carries the pending write.
[AMDGPU] Model ordered XDL writes in expert scheduling
Use the VA_VDST ordering of qualifying XDL WMMA so expert scheduling can use
nonzero waits after out-of-order event mixes.
An XDL instruction with a destination register of 8 or more VGPRs decrements
VA_VDST after all instructions that were issued earlier.
This avoids pessimistically waiting for WMMAs to write their results when
interleaving LDS.
```
VALU def r0
TRANS
VALU
TRANS
WMMA
va_vdst(1) # previously this would require va_vdst(0)
DS_LOAD use r0
```
[AMDGPU] Explain why a scaled WMMA counts as one ordered XDL
A VOP3PX2 V_WMMA_SCALE increments VA_VDST twice, but only its WMMA half is
an ordered XDL write, so it advances the ordered XDL count once.
[OpenMP][OMPIRBuilder] Propagate custom mapper errors from createTarget
When a custom mapper callback failed while emitting the kernel launch of a
target region, emitTargetCall wrapped the error in cantFail and crashed,
although createTarget already reports errors to its caller. MLIR
translation hits this when an omp.target uses a declare mapper that it
cannot translate yet, such as one with iterator map entries, while
omp.target_data reports the same mapper as not yet implemented.
Return the error from emitTargetCall and pass it on from createTarget, so
callers report it instead of crashing. When emitIfClause stops on such an
error, it now inserts the blocks it has not emitted yet into the function,
so they are not leaked.
Assisted with Claude Opus 5.5.
kernel - New LWPs shouldn't inherit pending signals
* The creation of a new LWP thread should not inherit any signals
pending on the current thread.
* Fix by adjusting the copy set, moving lwp_cpumask and lwp_siglist
out of the set. Fixup lwp_cpumask, and allow lwp_siglist to be
left empty.
* This should fix rare races with certain thread-heavy applications.
Reported-by: tuxillo
PR: 3468
[lldb] Skip debugserver launch tests with a system debugserver (#240978)
TestDebugserverLaunchArch, added in 3e7841ef1d6f, exercises the
debugserver built from this tree. An out-of-tree debugserver that
predates that change launches the arm64e slice for arm64, so test_arm64
fails on bots using the system debugserver.
SafeStack: Take libcall declarations from RuntimeLibcallsInfo (#240445)
Stop declaring __stack_chk_fail and __safestack_pointer_address
manually and construct them with the correct type automatically.
A function with the variable's name is now reported as not being a
global variable, rather than a renamed copy of the variable being
inserted. -safestack-use-pointer-address now requires
__safestack_pointer_address to be available for the target, instead of
unconditionally emitting a call to it. The tests using it on
non-Android triples move to Android.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[AMDGPU] Ignore debug instructions when lowering a VGPR copy into a physical SGPR (#239751)
`SIInstrInfo::handleCopyToPhysHelper` scans the rest of the block for
the readers of a VGPR copied
into a physical SGPR: a call that takes the SGPR as an argument is
waterfalled, and any other reader
keeps the copy. A `DBG_VALUE` of the SGPR counted as such a reader, so
with debug info the illegal
VGPR-to-SGPR copy stayed in the loop. The scan now skips debug
instructions, and stops where the
register is clobbered, by a regmask as well as a def.