[AArch64][GlobalISel] Add implicit defs for returned phyregs. (#248399)
This fixes a verifier error where physregs for a returned [2 x i64]
argument were not marked as defs on the call, leading them to being
undefined at point of use. As the argument in returned, the register may
be the origin reg used to set up the call, so only physregs need to be
added.
[InstSimplify] Fold vector infinity arms of ninf selects
Reuse m_Inf() for vector constants. When every defined lane of an arm
is an infinity, selecting it yields poison in that lane, so the other
arm is a valid replacement. Keep the select if any lane is finite.
AI assisted.
filesdb: cope with a listing without any path
Sorting the entries of an empty listing passed a null pointer to qsort(3),
which the sanitisers catch, and an empty block was written as an empty zstd
frame, which cannot be read back as a raw archive.
Skip the sort when there is nothing to sort, store an empty block as nothing
at all, and accept a listing without any path on both sides. A repository
whose packages install no file has no listing at all: pkg repo --list-files
now simply does not ship one instead of failing.
[Driver][AMDGPU] Search include/hipccl for hipstdpar/rocThrust headers (#246125)
Newer ROCm installs rocThrust under include/hipccl/thrust. Prefer it with --hipstdpar,
falling back to include/thrust.
AI assisted.
Co-authored-by: Yaxun (Sam) Liu <yaxun.liu at amd.com>
repo: do not crash when a package cannot be read
Creating a catalogue computes the checksum of every package. When a file
cannot be read the checksum is NULL, and two things then went wrong:
pkg_printf() copied that NULL pointer to build the short checksum of the
%z specifier, which is undefined behaviour, and pkg_vsnprintf() returned
-1 without touching its destination when the result was empty, leaving the
caller with an uninitialised buffer.
Avoid the copy when there is no checksum, make pkg_vsnprintf() behave like
snprintf(3) for an empty result, and abort the creation of the catalogue
with an error instead of describing the package with a bogus checksum.
Reported by poudriere builds crashing with a segmentation fault after
"pkg_checksum_hash_blake2_file(read failed)".
DAG: Use poison instead of undef in SimplifyDemandedVectorElts
I left getKnownUndefForVectorBinop since I'm not sure
if it's correct to just replace with poison.
signing: Add slhdsa (SLH-DSA) signer.
Add a signer backed by OpenSSL's SLH-DSA (FIPS 205) implementation,
available when pkg is built against OpenSSL 3.5 or later.
The SLH-DSA parameter set is a property of the key, not of the signer:
signatures are tagged $PKGSIGN:slhdsa$ and verification uses the
parameter set of the trusted public key (from PUBKEY, or the cert
matched against FINGERPRINTS), never anything carried by the signature.
pkg key --create -t slhdsa generates SLH-DSA-SHA2-256s keys, but keys of
any of the twelve SLH-DSA parameter sets sign and verify, so the default
can change later without breaking repositories signed with older keys.
Keys that are not SLH-DSA keys are refused.
Keys may be generated with pkg key --create -t slhdsa or with:
openssl genpkey -algorithm SLH-DSA-SHA2-256s -out repo.key -outpubkey repo.pub
pkg key -t slhdsa <key> reports the parameter set of a key.
Like mldsa, the signer signs the hex-encoded SHA512 of the repository
[2 lines not shown]
fetch: close the progress bar when the size is unknown
A transfer whose size is not announced in advance (chunked transfer
encoding) never emitted any progress tick, so the bar stayed at 0% and was
never closed: the next event printed a stray newline and the message lost
its final state. Close the bar once the transfer is over.
repo: ship the file listing packed and indexed
The file listing of a repository is a plain text stream which has to be
decompressed and walked entirely to answer a rwhich lookup. Ship, next to
it, a packed form of the same listing: the paths are stored sorted, split
over blocks of 256k compressed independently, with an index giving the
first path of every block. A lookup is then a binary search in that index
followed by the decompression of a single block, and a pattern is answered
from the blocks covering the literal part it starts with.
The package identifiers are kept in a column of their own at the end of
each block, as 32 bit little endian values, instead of being written next
to the paths.
The packed listing is a member of the filesite archive of its own and is
signed separately. pkg update stores it as is instead of compressing it
again; clients and repositories which do not know about it keep using the
plain listing as before. See pkg-filesdb(5).
[3 lines not shown]
solve: stop the integrity check from scaling with the number of files
The paths of the packages to install were kept in a sorted vector, so
every file was inserted with a memmove of all the following entries: the
check of a plan was quadratic, minutes on a system with large packages.
Keep them in a hash table instead, and prepare the local database
statement once per package rather than for every file.
add: reuse the prepared statement to look up an installed path
pkg_add_common() asks the database whether every file it is about to
install is already owned, one path at a time, and the query was prepared
and finalised on each call. Use the prepared statement of the database,
prepared once per connection: measuring on a 400k file database goes from
7.7us to 4.1us per file.
[clangd] Show member names in structured binding inlay hints (#245943)
Show which member each structured binding refers to. For example,
`auto [.name=n: string, age: int] = person;`. The hint is omitted when
the binding has the same name as the member.
The hint is placed before the binding's name, consistent with the
existing
designator hints for aggregate initialization. It is controlled by the
existing `InlayHints.Designators` option.
Fixes clangd/clangd#2727
Assisted-by: Claude Code
Revert #247981 "[RISCV][MC] Diagnose symbol differences in instructions under relaxation" (#248804)
This reverts commit dc963db2bdd1166b5a6fb0fc0d95a6de1a86da4a.
The patch resolves `sym - .` in a PC-relative operand to `sym` by
comparing addresses, so identical lines assemble differently:
```
# llvm-mc -triple=riscv64 -mattr=+relax -filetype=obj a.s
nop
L:
beq a0, a1, X - L
beq a0, a1, X - L # error: unsupported symbol difference in instruction
nop
X:
ret
```
The diagnostic part will reland separately.
Update xenkernel420, xentools420 and xenstoretools to 20261204
Changes since 20261103:
- fix known security issues up to XSA-543
- bup version to 4.20.5
- minor improvements and bug fixes, including better support for some
hardware features.
[AArch64] Update the Olympus scheduling model as per the SWOG changes (#248907)
The Olympus SWOG
https://docs.nvidia.com/olympus-cpu-core-software-optimization-guide-dp12531-001v0-7.pdf
has been updated for some AArch64 instructions, summarised below. We
update the Olympus scheduling model with updated schedules for the
following instruction groups.
| SWOG group | Old | New |
|---|---|---|
| Reduction (logical) | Lat 6 | Lat 5 |
| Reduction (add, B form) | Lat 11 | Lat 10 |
| Reduction (add, H form) | Lat 9 | Lat 8 |
| Reduction (add, S form) | Lat 8 | Lat 7 |
| Reduction (min/max, B form) | Lat 9 | Lat 8 |
| Reduction (min/max, H form) | Lat 8 | Lat 7 |
| Reduction (min/max, S form) | Lat 6 | Lat 5 |
| Reduction (D form) | Lat 5 (`UADDV` D: n/a, new) | Lat 4 |
| FP reduction (F16) | Lat 8 | Lat 12 |
[4 lines not shown]
MachineScheduler: Fix PressureDiffs assuming single physreg uses
updatePressureDiffs assumed each physreg has a single use and
overestimated the pressure when there were multiple. Also report a
physreg unit read and redefined by the same instruction as live in
RegPressureTracker::recede with lane masks. Drop the AMDGPU workaround
for this problem.
Assisted-by: Claude