[orc-rt] Rename CommandLineParser to OptionParser. (#220461)
"OptionParser" better describes what the class does: it parses a list of
option strings, which need not come from a command line (e.g. options
read from a config file, or constructed in a unit test).
[RISCV] Fix instruction combine of vwaddu.wv and vabd[u].vv (#220143)
The existing combination of `vwaddu.wv` and `vabd.vv/vabdu.vv` may
trigger a stack dump: The source operands of `vwaddu.wv` are not
commutative. Swapping these operands can generate an invalid `VWABDA_VL`
node and cause ISel to panic. This PR fixes the issue and only allows
the instruction with same `mask` and `vl` to be combined.
[ValueTracking][RISCV] Derive range and pow2 for vlenb CSR reads (#219924)
__riscv_vlenb() lowers to a read of the RISC-V vlenb CSR via
llvm.read_register("vlenb"), which returns VLEN/8. Teach
ValueTracking to recognize that read on a RISC-V target and reason
about its result:
* getRangeForIntrinsic() reports the value range of VLENB. RVV
requires VLEN to be a power of two in [32, 65536] (Zvl32b is
the smallest vector extension), so VLENB is in [4, 8192]
regardless of any attribute. This stays sound for Zvl32b,
whose VLEN (32) is not representable as an integer vscale
(VLEN / RVVBitsPerBlock). When the function carries a
vscale_range attribute the subtarget's VLEN is a multiple of
RVVBitsPerBlock (64), so VLENB = vscale * RVVBytesPerBlock
tightens the range.
* isKnownToBeAPowerOfTwo() reports that VLENB is a power of two.
This lets InstCombine fold vlenb comparisons such as
[11 lines not shown]
lang/babashka: Update to 1.13.220
Changes since 1.13.219:
1.13.220 (2026-08-31)
Read the release blog post:
https://blog.michielborkent.nl/babashka-ffi.html
FFI:
* Add experimental babashka.ffi
(https://github.com/babashka/ffi): call C functions in shared
libraries straight from babashka and JVM Clojure! See the guide:
https://github.com/babashka/ffi/blob/main/doc/guide.md
* Linux: dynamic binaries require glibc 2.28. The install script
selects the static binary on older systems
* On Linux, the install script installs the dynamic binary by
default. It installs the static binary on musl systems and on
[86 lines not shown]
[ADT][SelectionDAG] Unique SDNodes in a UniquingSet (#220195)
CSEMap keys SDNodes by a serialized FoldingSetNodeID. Every lookup
profiles the opcode, the VT list and the operands into a buffer, and
every probe rebuilds the candidate's whole profile to compare against
it.
UniquingSet compared a key against Info::getKey(*N), building a key from
the candidate on every probe. Add isEqual to the Info contract,
defaulting to that comparison, and expose a FoldingSetNodeID's
accumulated words as a FoldingSetNodeIDRef so an Info that carries one
can hash it.
Key nodes by SDNodeKey, which holds those fields directly and leaves
only what AddNodeIDCustom contributes serialized in a tail, which is
empty for most opcodes. A lookup site keeps its ID.AddXxx lines: the key
forwards them to the tail. isEqual matches the key against a candidate's
fields and builds only the tail; an assertions build cross-checks the
result against the profile both would have had.
Aided by Opus 5
Revert "[IR] `replaceUsesWith` when aliasing a GV and the use is `dso_local_equivalent`" (#220450)
Reverts llvm/llvm-project#220336
Breaks tests after #220339 and supposedly there are still other
outstanding issues.
ufshci: skip the reinit when the new link works
UFSHCI_QUIRK_REINIT_AFTER_MAX_GEAR_SWITCH always rebuilt the
link after the gear switch. It threw away a working HS link and
ended up in PWM. The reinit is only needed for a dead link.
There the local side reports HS and the peer never answers. A
local readback cannot tell the two apart. Peer traffic can.
Probe the peer with DME_PEER_GET after the switch. Skip the
reinit when the probe succeeds. Log it when the probe fails.
Reviewed by: imp (mentor)
Sponsored by: Samsung Electronics
Differential Revision: https://reviews.freebsd.org/D59299
ufshci: set HS series per platform and adapt type per gear
The driver always asked for Rate-B. It never set the adaptation
type. The Snapdragon X Elite firmware tunes the PHY for Rate-A.
A Rate-B link dies at every gear there. HS-G4 and above need
initial adaptation. This is a UniPro rule. It applies to
every host.
Add an hs_series field to the device tables. Use Rate-A on the
Snapdragon X Elite. Keep Rate-B on the PCI hosts. A table entry
without an HS series fails to attach. Set PA_TxHsAdaptType to
initial adaptation at HS-G4 and above. Leave it alone below
that. Hosts before UniPro 1.8 do not have it. The Galaxy Book
4 Edge now links at HS-G5 Rate-A.
fio results (128k sequential, 4k random, posixaio):
QD | SEQ_R(MiB/s) | SEQ_W(MiB/s) | RND_R(kIOPS) | RND_W(kIOPS)
----+--------------+--------------+--------------+-------------
[10 lines not shown]
ufshci: fix the Snapdragon X Elite reference clock
The driver's ACPI table set bRefClkFreq to 19.2 MHz. The
Snapdragon X Elite feeds the device 38.4 MHz from its CXO. The
firmware has no property for it. The device ran its PLL from
the wrong base. Every HS mode failed. PWM still worked. The
attribute is persistent. The wrong value survived reboots.
Set 38.4 MHz in the table. Read the attribute first. Write it
only when the value differs or the read fails. Log a changed
value and a failed read. Verified on the Galaxy Book 4 Edge.
Reviewed by: imp (mentor)
Sponsored by: Samsung Electronics
Differential Revision: https://reviews.freebsd.org/D59297
[AMDGPU] Fix user SGPR accounting when parsing MIR
Count privateSegmentSize and LDSKernelId as user SGPRs to preserve the kernel
descriptor count across MIR round trips.
Fixes LCOMPILER-2700.
[orc-rt] Don't parse program name in CommandLineParser::parse (#220454)
The iterator-based CommandLineParser::parse method expected a program
name as the first argument in the list, but did not do anything with its
value (it was simply skipped). Update it to expect argument strings only
(no program name as first element) and document the new expectation.
The (argc, argv) overload of parse is renamed to parseAsMainArgs. It
still expects a program name as the first argument and will return an
Error if it is not present.
This allows CommandLineParser::parse to be used in contexts where there
is no natural program name (e.g. in unit tests, and options read from
config files).
ng_bridge: do not move hosts from learnMac=0 hooks
ng_bridge(4) says the node does not learn MAC addresses on uplink
hooks. However, learnMac was only checked when inserting a new
host. A host already known on a link hook was still moved if a
packet with that source address arrived on an uplink hook.
The nature of this is that inbound unicast to that host then
never arrives (the destination is known on the incoming hook).
Unknown unicast after timeout is still sent only to uplink, so
the host is not re-learned. The interface stays up and outbound
may still work. This can last minutes or weeks until reboot or
NGM_BRIDGE_MOVE_HOST.
Connecting ng_ether(4) lower to an uplink hook is enough: the
host's own transmit can appear on the uplink and the table entry
moves.
Use the same learnMac test for data-path move as for insert.
[5 lines not shown]
[orc-rt] Rename test/unit/utils -> test/unit/tools. (#220408)
This aligns the unit test directory with the corresponding header
directory (orc-rt-internal/tools).
git-arc: SC2223 DoS-via-glob hardening
Quote LOCALBASE and ARC_CMD default assignments so a poisoned
value cannot glob into :'s argv.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D59130
[C++20] [Modules] merge the type for anony enum from import and #include (#214121)
Close https://github.com/llvm/llvm-project/issues/213299
Ideally, we shall merge the new enum with the old enum when we creating
the new enum. But the enum is anonymous and the typedef's name come
after the enum body, it is too late to merge them. This is the choice 10
years ago: a523022b5384d7a0901beea7a5f36ee9c09ba339. Actually what we're
merging is the typedef decls.
Then https://github.com/llvm/llvm-project/pull/114240 removes the logic
to remove the new ED. This the direct trigger for the above issue of
ambiguous look ups.
We choose to fix the problem by setting the type of new enum to the type
of the old enum to fix the ambiguous lookup issue.
[flang][runtime] Use CONVERT='SWAP' in endian.f90 test (#220185)
Follow-up to #218302.
The test currently uses CONVERT='BIG_ENDIAN'.
On big-endian systems such as PPC/AIX, this does not actually
exercise endian conversion.
Switch the test to CONVERT='SWAP' so that byte swapping is
performed regardless of the host byte order.
[lld][MachO] Support Objective-C class stubs
Teach Mach-O objc stubs to synthesize class-message stubs that load the class object, selector, and objc_msgSend target.
lld already supports the Apple clang _objc_msgSend$<selector> stub form, even though upstream clang does not currently expose a driver or cc1 flag for emitting it. Apple clang also emits _objc_msgSendClass$<selector>$_OBJC_CLASS_$_<class>; handling that form completes the existing selector-stub support.
Cover local classes, dylib classes, archives, dynamic lookup via -U, missing class symbols, malformed names, unsupported architectures, and dead stripping.
IANA has allocated a non-vendor codepoint for ssh-mldsa44-ed25519,
so use it instead of the vendored "@openssh.com" name.
Note: this replaces the vendored name, which was only marked as
experimental and not enabled by default.cw
If you have ssh-mldsa44-ed25519 at openssh.com keys manually configured
in sshd, then you will need to remove them from sshd_config and
restart.