[AArch64][NeoverseV1/V2] Fix FMULX scalar latency (#224540)
The "ASIMD FP multiply" InstRW regex required a "v" suffix, so the
scalar register-register forms FMULX16, FMULX32 and FMULX64 fell back to
a generic class with latency 2.
Measured on Neoverse V1 and V2 hardware with a single dependency chain:
3 cycles, the same as the vector forms and as FMUL, matching the SOG
row.
[flang] disable cf canonicalization patterns at O0 to preserve line location (#227770)
This patch is a follow up to #202065 and intends to preserve at least one loop
header instructions for each expanded array expressions at O0 so that breakpoint
set on array expression statements that are expanded inline fire once (an not at
each iteration which happens when the only instruction with the statement line
location is in the loop body). CF canonicalization patterns may remove branch
instructions that are the only valid breakpoint position for an array expression
statement from the source.
To solve this, this patch adds a new canonicalization pass that allows skipping
ControlFlow dialect pattern registration at O0.
This replaces #227306 approach that was using a debug pattern filtering
approach instead of using a new pass.
Assisted-by: AI
[LoopIdiom] Don't convert `memset.inline` into `memset` (#227650)
Also remove an old and invalid FIXME and reword comments to clarify why we
don't turn inline intrinsics into non-inline versions.
There were 2 places where we check for `memcpy.inline`:
1. `processLoopMemCpy`
2. `processLoopStoreOfLoopLoad`
(1) calls (2). Because (1) didn't properly check for inline intrinsics (2)
needed to check for them as well. With (1) fixed, (2) doesn't need to check. So
the check is made an assertion.
A copy of (1) exists for `memset.inline` as well, in `processLoopMemSet`, but
(2) didn't exist in `processLoopStridedStore`, causing the bug where we convert
a `memset.inline` into `memset`.
Update `processLoopMemSet` checks the same way as (1) and add the same
[7 lines not shown]
Report crash-looping app containers as crashed
## Problem
A container that exits with an error under the catalog's default `unless-stopped` restart policy is reported by Docker as `restarting`, not `exited`. The container state mapping only checked the exit code for `exited`, so the same failure was reported as crashed without a restart policy but as exited with one. A multi-container app with a healthy sibling then showed as Running, and a single-container app showed as Stopped, which hid its workloads and blocked logs, upgrade and rollback.
## Solution
Apply the existing abnormal exit code check to `restarting` containers too, since Docker keeps the last exit code while it waits to restart them. A container restarting after a clean exit is still reported as exited. Added a unit test for the Docker status to container state mapping, which had no coverage.
Tie webshare lifecycle to TrueNAS Connect state
## Problem
Webshare's Caddy only picks up its TLS certificates when it starts, but middleware never stopped, started or restarted webshare on any TrueNAS Connect transition. Setting up TNC and webshare, then unsetting TNC left webshare running, and setting TNC up again left it serving zero or stale certificates until someone restarted it by hand. At boot systemd could also start webshare before middleware was ready, so it came up with no certificates at all.
## Solution
Webshare now only runs when the WEBSHARE entitlement is granted and TNC is configured, regardless of product type.
- **Start gate**: `before_start` refuses START and RESTART with a `CallError` explaining why, so a restart or failover restart can't bypass it either.
- **Following TNC**: webshare subscribes to the existing `tn_connect.config` event. When TNC stops being configured (disable or 401 auto-unset) webshare is stopped; when it becomes configured again and webshare is enabled, it is started; a certificate renewal restarts a running webshare. A restart is used rather than a reload because a reload does not make every webshare listener re-read its certificates.
- **Boot**: on `system.ready` (non-HA) a running webshare is restarted so it loads the right certificates.
- **Licence changes**: the license reconcile framework could only render, reload or restart, so it had no way to stop a service that lost its entitlement or start one that regained it. Delegates can now resolve their action at runtime and return START or STOP, and each delegate decides for itself whether that makes sense for its service. Webshare registers a delegate on top of this instead of its own licence hook, using the same decision as its TNC and boot handling.
The persisted enable flag is never touched, so the user's intent survives TNC or the licence going away and webshare comes back by itself once both are in place again.
Revert "[AArch64] Add CSEL for canCreateUndefOrPoisonForTargetNode (#226946)" (#227992)
This reverts commit 1e8550c234507ef5b70d508f18b98f9bb0ebc07b due to
buildbot / bootstrap failures not seen in other testing.
[mlir][tosa] Lower AVG_POOL2D_ADAPTIVE to Linalg (#225637)
Register the adaptive average-pool canonicalization with the named
TOSA-to-Linalg conversion and mark the operation illegal so constant
shape operands lower through the established avg_pool2d path.
Add coverage for padding-aware floating-point pooling and quantized
integer pooling with nonzero zero points.
Assited-by: Codex
[MLIR][Remark] Make remark reporting thread-safe and order final remarks by source position
Passes nested under the multithreaded pass manager report into the same
RemarkEngine from worker threads, but nothing in the engine or the
policies was synchronized. RemarkEmittingPolicyFinal inserted into its
set from several threads at once, and under RemarkEmittingPolicyAll the
streamer, including the LLVM remark serializer, was called from several
threads at once. ThreadSanitizer reports both races in the new unit tests.
RemarkEngine::report() now takes a lock, the same recursive
llvm::sys::SmartMutex the DiagnosticEngine uses. For the All policy the
streamer and the diagnostic printer run under it too, so custom policies
and streamers need no lock of their own. finalize() stays unlocked; it
runs once the pipeline has returned, as mlir-opt and the engine
destructor do.
With the race fixed, the final policy's creation order still depended on
which thread created a remark first. finalize() now sorts root remarks by
source position: the file position the diagnostic printer shows, remarks
[15 lines not shown]
interfaces: add a new 'updateip' hook
'newwanip' is misused sometimes and never called in static configurations.
The only consumer is the RFC2136 plugin but maybe that changes in the
future. The plugin also listens on "bootup" and "local" so simply making
a global event for use at the spots where it exists is enough.
Firewall: NAT: Destination NAT - add safety guards for calculated port ranges, closes https://github.com/opnsense/core/pull/10945
As normalizedPort() is only used to pass values in nat rules, it's more consistent to replace 'any' with empty as that's what the firewall parser would also do.
Next we need to make sure only numeric values are being used in calculations and the upper bound [65535] is respected in all cases.
dns/rfc2136: subscribe to "updateip" event
interface_configure() was still calling newwanip:rfc2136 but this meant
it had knowledge about this specifc plugin. By adding this consumer we
can hide the actual plugins using it and perhaps add updateip to all
relevant code paths as well. newwanip is only called for dynamic addressing.
[ADT] Share relocateBucket across DenseMap.h (NFC) (#227970)
This patch moves relocateBucket from SmallDenseMapStorage into namespace
densemap::detail and uses it in DenseMapBase::moveFrom and
DenseMapBase::eraseFromFilledBucket as well.
Assisted-by: Antigravity
Tie webshare lifecycle to TrueNAS Connect state
## Problem
Webshare's Caddy only picks up its TLS certificates when it starts, but middleware never stopped, started or restarted webshare on any TrueNAS Connect transition. Setting up TNC and webshare, then unsetting TNC left webshare running, and setting TNC up again left it serving zero or stale certificates until someone restarted it by hand. At boot systemd could also start webshare before middleware was ready, so it came up with no certificates at all.
## Solution
Webshare now only runs when the WEBSHARE entitlement is granted and TNC is configured, regardless of product type.
- **Start gate**: `before_start` refuses START and RESTART with a `CallError` explaining why, so a restart or failover restart can't bypass it either.
- **Following TNC**: webshare subscribes to the existing `tn_connect.config` event. When TNC stops being configured (disable or 401 auto-unset) webshare is stopped; when it becomes configured again and webshare is enabled, it is started; a certificate renewal restarts a running webshare. A restart is used rather than a reload because a reload does not make every webshare listener re-read its certificates.
- **Boot**: on `system.ready` (non-HA) a running webshare is restarted so it loads the right certificates.
- **Licence changes**: the license reconcile framework could only render, reload or restart, so it had no way to stop a service that lost its entitlement or start one that regained it. Delegates can now resolve their action at runtime and return START or STOP. Those go through a new private `service.converge_verb`, which only starts a service that is stopped, enabled and allowed on this node, and only stops one that is running. Webshare registers a delegate on top of this instead of its own licence hook, and its TNC/boot handling uses the same guard.
The persisted enable flag is never touched, so the user's intent survives TNC or the licence going away and webshare comes back by itself once both are in place again.
[LLVM] Skip non-overlapping subranges (#227852)
Add guard to skip subranges that not live in the interval.
fix to: https://github.com/llvm/llvm-project/pull/227252
Passed local libc tests:
```
Total Discovered Tests: 814
Passed: 814 (100.00%)
```
assisted by: cursor
[lldb] Reject thread until targets outside of an inline frame's function (#227800)
`thread until -f N <line>` rejects a line outside of the function of
frame N.
Before this patch, for an inline frame, it checked the concrete
function, not the inlined function, so it accepted lines of other
inlined functions. The until plan then ignored a hit of such a target,
because it is not in the scope of frame N.
This commit changes GetStepUntilAddresses to only accepts an address if
its innermost inlined function is the one of frame N, as it does for a
regular frame.
As a before/after example, consider this backtrace:
```
frame #0: 0x00000001000003c0 deep`sink(x=81) at deep.c:4:6 [opt]
frame #1: 0x0000000100000418 deep`level3(a=48) at deep.c:11:3 [opt] [inlined]
[10 lines not shown]