[mlir][bufferization] Skip read collection when no writes exist (#231771)
Collect aliasing writes before reads in the One-Shot Bufferization RaW
interference check. When there are no in-place writes, return without
collecting aliasing reads.
This avoids unnecessary read scans during pre-bufferization checks and
other cases without writes.
Rework how license changes are applied
This PR adds changes to replace the license reconcile delegates and the post_license_update hook with a single apply path driven by the entitlement matrix. Every install path (upload, TNC heartbeat, HA peer propagation, legacy sync) snapshots entitlements before and after the change, diffs them and runs only the delegates of the features that actually flipped, so unaffected services are no longer reloaded/restarted on every license change.
Delegates are defined next to their plugins on top of a small base (converge, workload and custom kinds) which owns the service control flags, running/active node checks and failure reporting. Revoking a feature now revokes running functionality as well: VMs and containers are shut down (autostart ones come back on re-grant), docker is stopped while keeping its pool, webshare is stopped and masked, NFS snapshot exposure and DS auth are gated at render time (DS auth is left alone if no usable local admin exists), FC/RDMA targets are converged and KMIP keys are pulled back locally. STIG/FIPS, dedup, NVMe-oF SPDK and network FEC are alert-only. A single alert lists features which are not licensed but still in use, including revokes which did not complete.
On HA, uploads are refused on the standby, during failover and when they would drop HA on a configured pair, and the newer license is pushed to the peer when it reconnects. The pending changes are journalled in /run so a middlewared restart between install and apply does not lose them.
[orc-rt] Merge split target_link_libraries calls. NFC. (#232166)
Each shipped library set its PUBLIC and PRIVATE link libraries in
separate target_link_libraries calls. Use one call per library.
[LoongArch] Support memcmp expansion for vectors and combine for i128/i256 setcc
This commit enables memcmp expansion for lsx/lasx. After doing
this, i128 and i256 loads which are illegal types on LoongArch
will be generated. Without process, they will be splited to
legal scalar type.
So this commit also enable combination for `setcc` to bitcast
i128/i256 types to vector types before type legalization and
generate vector instructions.
Inspired by x86 and riscv.
[CIR] Lay out allocas in the order classic codegen does (#231974)
At -O0 the order of a function's entry-block allocas is its stack frame
layout. CIR now creates the return value's alloca before the
parameters', and keeps hoisted block-scope allocas after the function's
own, matching classic codegen.
CIRGen creates `__retval` before the parameters, as classic's
StartFunction does, and the implicit `return 0` store for `main` moves
into emitFunctionProlog, where classic emits it. HoistAllocas places
each hoisted alloca after the allocas already at the start of the
destination block instead of in front of them.
Assisted-by: Cursor / claude-opus-5.5
---------
Co-authored-by: Andy Kaylor <akaylor at nvidia.com>
[libc++] Make usage of python3 work as intended on macOS benchmark runners (#232151)
Homebrew stops providing unversionned commands like `python3` in their
versionned formulae (`python at 3.14`) whenever it stops being the default.
As a result, the `python3` symlink moved from `<...>/bin` to
`<...>/libexec/bin` when the Python 3.15 formula was introduced,
displacing Python 3.14.
As a result, the macOS jobs started falling back to the system Python
3.9. Since llvm-lnt does not support Python 3.9 (which is EOL'd), that
failed the macOS benchmarking jobs (see for example [1]).
Fix this by adding <...>/libexec/bin to the path instead of just <...>/bin.
[1]: https://github.com/llvm/llvm-project/actions/runs/38039547247/job/114176935620
[PowerPC] Prefix option names with ppc-, turn disable- to positive options (#230393)
Rename the PowerPC CodeGen options so that they start with ppc-, and
turn the -disable-* options into positive options with the default
flipped. -enable-ppc-gen-scalar-mass becomes -ppc-scalar-mass and
-disable-ppc-ctrloops becomes -ppc-ctr-loops, since -ppc-gen-scalar-mass
and -ppc-ctrloops are pass names.
Preparatory for migrating to LibraryOptions.
Aided by Opus 5.5
[ORC] Set target triple on ReOptimizeLayer's orc-rt-lite module. (#232088)
addOrcRTLiteSupport created its helper module without a triple. An empty
triple defaults to ELF, so since #228429 (AsmPrinter reads the triple
from the Module, not the TargetMachine) the AArch64 AsmPrinter took its
ELF path on Mach-O hosts and called through a null
AArch64TargetStreamer.
Use the ExecutionSession's triple.
rdar://189983111
Co-authored by: Claude Sonnet 5.5
[libc++] Extract LNT benchmark validation into a reusable workflow (#232155)
This allows sharing the logic for validating the LNT machines definition
between the libc++ and the libstdc++ benchmarking jobs. As part of that,
I noticed that these jobs only used a subset of the fields in
machines.json, so this PR regroups them into a sub-entry. There are now
two aspects in machines.json: "when" we measure something, and "how" we
measure something, and both are sub-objects.
test: remove volatile to restore old behavior (#231722)
PR #230426 makes the memory access volatile. but it was pointed out in
review of PR #221870, volatile may break the test point. Remove the
volatile and use command line option to disable possible alloca
promotion.
iwm: add return status to set/clear prph bits
This brings these functions inline with OpenBSD
Locally tested:
* 3160, STA mode
* 7260, STA mode
* 8260, STA mode
* 9260, STA mode
Obtained from: OpenBSD a6e25c727a2214219715b51ba6af2221d7e0d674
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D60211
iwm: update phy context routines; add HT channel width parameter
Update the phy context routines to match what the openbsd snapshot
is doing. This involves some HT channel width stuff which although
I am not doing HT right now, it was juts easier to sync these
entirely versus just a partial sync.
* Update the phy context routines to match what openbsd is doing
* Although the openbsd driver has an iwm_phy_ctxt_update() routine
instead of add and modify, I'm leaving it as-is for now.
A bunch of refactoring is going to need to be done to properly
use an iwm_phy_ctxt_update() call and I didn't want to tackle
that in here.
* Add a UHB firmware capability phy context call; I can't test it
but it's mostly copy/paste.
* Add in a util to turn ieee80211_channel into the 'sco' variable
(the HT low/hi parameter) since it's done in openbsd in a
slightly different way.
[10 lines not shown]
iwm: bring IWM_CSR_HW_IF_CONFIG_REG programming in line with openbsd
bring the iwm_nic_config() / IWM_CSR_HW_IF_CONFIG_REG programming
in line with openbsd.
Locally tested:
* 3160 STA mode
* 7260 STA mode
* 8260 STA mode
* 9260 STA mode
Obtained from: OpenBSD a6e25c727a2214219715b51ba6af2221d7e0d674
Differential Revision: https://reviews.freebsd.org/D60081
iwm: add DQA (dynamic queue assignment)
This is the minimum set of DQA bits from iwm at the given openbsd
commit place.
* add a method to map ac to queue / ring
* use the DQA command queue if needed
* glue to wire it up
Locally tested:
* Intel 7260, STA mode
* Intel 9260, STA mode
* Intel 8260, STA mode
* Intel 3160, STA mode
Obtained from: OpenBSD a6e25c727a2214219715b51ba6af2221d7e0d674
Differential Revision: https://reviews.freebsd.org/D60080
[InstCombine] Fold select of pow into select of the differing operand
When both arms of a select are calls to `llvm.pow` with one use that
differ in exactly one operand, sink the select into that operand:
$$
\mathrm{select}(c,\ x^{y},\ x^{z}) \rightarrow x^{\mathrm{select}(c,\ y,\ z)}
$$
$$
\mathrm{select}(c,\ x^{z},\ y^{z}) \rightarrow \mathrm{select}(c,\ x,\ y)^{z}
$$
This removes one `pow` call. FMF are intersected and debug locations
are merged. The transform is skipped when a differing operand is a
constant, since that may enable a cheaper lowering (e.g.
$x^2 \rightarrow x \cdot x$).