[ORC] Fix testcase after SymbolNameSpec migration. (#224302)
Interface names were migrated to SymbolNameSpec in 6136762db198, but
some names in testcases were missed, triggering build failures on MSVC
bots (see https://lab.llvm.org/buildbot/#/builders/2/builds/62444)
Update interface names in SPSProxySpecTest.cpp to SymbolNameSpecs.
[lldb] Guarded GDBRemoteCommunicationServerLLGS::m_saved_registers_map (#219431)
m_saved_registers_map and m_next_saved_registers_id were guarded by a
dedicated std::mutex. This replaces the manual locking logic with
`Guarded`.
This also fixes the missing lock in the Handle_QSaveRegisterState
assert which was previously a race condition.
WebAssembly: Remove -wasm-enable-eh cl::opt in favor of -exception-model=wasm
The -wasm-enable-eh backend flag was redundant with -exception-model=wasm:
every caller paired the two, and the model already carries the intent.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
WebAssembly: Respect target-abi module flag
Previously this relied on the TargetABI MCOptions field and ignored
the IR flag.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[lld][MachO] Fix --reproduce paths for non-global symbol lists and SDK libraries/frameworks (#223687)
`--reproduce` currently has two path-rewriting problems:
1. Non-global symbol lists are included in the archive, but their paths
in the response file are not
relativized.
2. SDK roots and library/framework search paths are relativized
independently. Since the driver does not
reroot relative search paths, replay can fail to find libraries or
frameworks inside the SDK.
This patch fixes both by relativizing non-global symbol-list paths and
resolving SDK prefixes before
relativizing library/framework search paths.
---------
Co-authored-by: Vy Nguyen <1762963+oontvoo at users.noreply.github.com>
[SLP]Drop auxiliary subtrees to pass the VF=2 instruction-count veto
The veto rejected the whole VF=2 tree when an optional splat gather
root or gathered loads subtree tipped the vector instruction count
over the scalar count. Drop the reused auxiliary subtrees while the
tree exceeds the budget; the surviving gathers re-materialize their
scalars.
Assisted-by: Cursor
Reviewers: bababuck, RKSimon
Pull Request: https://github.com/llvm/llvm-project/pull/224108
WebAssembly: Partially clean up subtarget construction
There should be just one getSubtargetImpl(Function&) override like every
other target, but this is relying on the global subtarget. Remove the
argumentless form since it's unnecessary.
WebAssemblyCoalesceFeaturesAndStripAtomics doesn't really need to construct
a full new subtarget for its purpose and can directly take the global subtarget
feature bits. This pass is also doing quite a lot of other bad things, like
mutating the TargetMachine.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
*/*: Deprecate python2 consumers
lang/python2 and lang/python27 have been deprecated since 2020-01-01 and their
EXPIRATION_DATE of 2020-12-31 passed nearly six years.
Set the same expiration date on the remaining python:2.7 consumers so that
python2 and python27 can be removed on 2026-11-01
The date was chosen to fall after the 2026Q4 branch is created, so that the
removal happens on main only and the quarterly branch keeps python2 for its
full lifetime.
Approved by: portmgr
[libc] Add support for SYS_fchmodat2 in fchmodat (#223997)
### Summary
Linux kernel 6.6 introduced the `SYS_fchmodat2` system call, which
accepts a 4th `flags` argument (`int fchmodat2(int dirfd, const char
*pathname, mode_t mode, unsigned int flags)`). This allows flags like
`AT_SYMLINK_NOFOLLOW` and `AT_EMPTY_PATH` to be passed directly to the
kernel.
Following the discussion on #223165, this patch adds support for
`SYS_fchmodat2` in `fchmodat`, while providing fallbacks when
`SYS_fchmodat2` is not supported.
Fixes #223953
Formatted using Gemini.
---------
Co-authored-by: Pavel Labath <pavel at labath.sk>
clang-linker-wrapper: Set the host DataLayout on the offload wrapper module (#224280)
The offload wrapper module was created with only a target triple, and
the datalayout wasn't set until later, where it was copied from the
TargetMachine, after the wrapping code already ran.
The wrapping code did query the datalayout for the pointer size, so this
was broken for host and devices with different pointer sizes. queries the
DataLayout (e.g. the size_t / intptr type via getSizeTTy), so on a
host whose pointer size differs from the default layout (e.g. a 32-bit
host) it used the wrong integer width for image offsets.
This removes a use of TargetMachine::createDataLayout, which I am trying
to remove.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
Add middleware support for LIO ALUA HA
Wire up the middleware side of LIO ALUA high-availability: load
lio_ha.ko with per-node addresses on service start, manage ALUA
state across failover events, clean up STANDBY configfs on pool
export, and add pre-flight validation that targets have static
initiator ACLs before ALUA can be enabled.
For each target, create a portal-less phantom TPG carrying the peer
node's controller group so that a single RTPG response from any
connected port lists both ALUA groups. Write tpgt_N/rtpi explicitly
before enable so that relative target port IDs in RTPG match the
tag formula (portal.tag on Node A, portal.tag + 32000 on Node B)
rather than being auto-assigned sequentially by the kernel.
ALUA group states are driven by role and ha_state:
MASTER + synced local=OPTIMIZED remote=NONOPTIMIZED
MASTER + connected local=OPTIMIZED remote=TRANSITIONING
[4 lines not shown]
[SLP]Model or-reduction of masked shifted lanes as a bitfield pack
An or reduction of and(shl(x, s), m) lanes that each cover a disjoint
contiguous byte field of the result is a repacking of the per-lane field
contents, not a shift and reduce. Prove the fields disjoint from the
per-lane possibly-set bits (a saturating numeric upper bound combined with
known bits), then emit the pack as a trunc, an optional per-lane lshr, a
byte shuffle and a bitcast. A plain byte reversal becomes a bswap, an
identity byte order needs no shuffle, and byte-zext lanes compact for free.
Fixes #175446
Assisted-by: Cursor
Reviewers: bababuck
Pull Request: https://github.com/llvm/llvm-project/pull/219731
[RISCV] Account for VL toggle cost when splitting VP memory intrinsics (#223992)
Not an alternative to #222836 since this doesn't handle all cases, but
something we should do anyway in the TTI to be accurate.
For vp.load/vp.gather/vp.strided.load and their store counterparts, when
they're split they introduce extra vl toggles which involve computation
on the evl, e.g.
vsetvli a2, zero, e8, mf4, ta, ma
vmv1r.v v8, v0
csrr a2, vlenb
srli a3, a2, 3
vslidedown.vx v0, v0, a3
sub a3, a1, a2
sltu a4, a1, a3
addi a4, a4, -1
slli a5, a2, 3
and a3, a4, a3
[12 lines not shown]
kernel - Fix lost wakeup in fifo_open()
* fifo_open() tests fi_readers, drops the fifo and vnode locks, then
tsleeps. A peer opening in that window bumps the counter and issues
its wakeup before the sleeper is queued, so open(2) blocks forever
with a peer already attached. Both paths are affected.
* Queue with tsleep_interlock() before releasing the locks and sleep
with PINTERLOCKED.
Reviewed-by: @dillon