[flang][OpenMP][NFC] Hoist variant match-info construction into Semantics (#204387)
Replace the lowering-only `makeVariantMatchInfo` helper with a single
shared `semantics::omp::MakeVariantMatchInfo`. It builds the
VariantMatchInfo from a parsed context selector and returns the optional
non-constant user condition (as before). Update metadirective lowering
to use it and drop the duplicated Lower/OpenMP copy.
Selector features that variant selection cannot yet honour
(target_device selectors, and clause/extension trait properties) are not
match-info concerns, so they are kept out of `MakeVariantMatchInfo`.
Detection lives in a separate, pure helper
`FindUnsupportedSelectorFeature`; the caller diagnoses the feature in
its own terms (metadirective lowering emits a TODO) before building the
match info. `MakeVariantMatchInfo` checks the precondition. NFC for
metadirective.
Co-authored-by: Cursor
[2 lines not shown]
Skip individual domains that vanish while gathering libvirt state
## Problem
`gather_pylibvirt_domains_states` wraps its whole loop in one try/except. If a queried domain is destroyed between `list_domains()` and reading its state (a TOCTOU race), libvirt raises `VIR_ERR_NO_DOMAIN` and the exception unwinds the entire loop, so every still-running domain after it is dropped from the result and reported as STOPPED/`pid: null` until the next poll. It also logged a full WARNING traceback for what is a benign, self-correcting race, and masked genuine errors (e.g. a bug in the per-domain factory) behind that same generic warning.
## Solution
Moved the try/except inside the loop so a vanished domain is skipped individually while the rest of the batch is still reported correctly (a missing entry falls back to STOPPED via `get_pylibvirt_domain_state`). The failure is classified using the new `is_no_domain_error` helper from truenas_pylibvirt: the no-domain race is logged at DEBUG, anything else at ERROR with `exc_info` so genuine bugs stay visible and no longer poison sibling domains.
(cherry picked from commit 883b0dda76b2c7acaf9853fe3cf48cca15955403)
NAS-141503 / 27.0.0-BETA.1 / Skip individual domains that vanish while gathering libvirt state (#19174)
## Problem
`gather_pylibvirt_domains_states` wraps its whole loop in one
try/except. If a queried domain is destroyed between `list_domains()`
and reading its state (a TOCTOU race), libvirt raises
`VIR_ERR_NO_DOMAIN` and the exception unwinds the entire loop, so every
still-running domain after it is dropped from the result and reported as
STOPPED/`pid: null` until the next poll. It also logged a full WARNING
traceback for what is a benign, self-correcting race, and masked genuine
errors (e.g. a bug in the per-domain factory) behind that same generic
warning.
## Solution
Moved the try/except inside the loop so a vanished domain is skipped
individually while the rest of the batch is still reported correctly (a
missing entry falls back to STOPPED via `get_pylibvirt_domain_state`).
The failure is classified using the new `is_no_domain_error` helper from
truenas_pylibvirt: the no-domain race is logged at DEBUG, anything else
at ERROR with `exc_info` so genuine bugs stay visible and no longer
poison sibling domains.
[Allocator] Drop the fast-path null check via a sentinel End (#205485)
Follow-up to #203718. Store `End` as the slab end plus 1 (and 0 for an
empty or moved-from allocator). This removes one condition from the fast
path.
For lld/ELF SymbolTable.cpp (clang++ -O3), the inlined `make<T>()` fast
path loses its `test rax, rax; je` pair; the whole TU's .text shrinks
from 14037 to 13800 bytes.
Aided by Claude Opus 4.8
Move our auto-mode-alist tweak to default.el
This is the Right Way to do it according to the emacs docs. Users can
then ignore this custom file with emacs -q if it becomes an issue. Also
using default.el avoids possible patch conflicts when upgrading to newer
emacs releases.
Initial version from Timo Myyra, thanks!
[FIR] Route embox + projected complex slice through shapeVec (#205042)
When the array_coor base is a fir.embox with a projected complex %re/%im
slice, take the shapeVec path instead of the descriptor (fir.box_dims)
path. The descriptor path iterates source-rank dims while querying the
rank-reduced embox result box, which miscompiles slices that collapse
dims (e.g. complex(:,k)%re). For embox-derived boxes the underlying
storage is contiguous, so the shape-derived layout is both correct and
the natural place to encode that static shape is available. Non-embox
boxes (rebox, assumed-shape) still go through fir.box_dims.
Co-Authored-By: Claude Sonnet 4.6 <noreply at anthropic.com>
Co-authored-by: Claude Sonnet 4.6 <noreply at anthropic.com>
[AArch64][SVE] Use ADD/ADR instead of MUL/MLA for x*N (#198566)
Avoid `MUL`/`MLA` for all-active multiplies by small constants when
cheaper `ADD`/`ADR` sequences are available.
Vector multiplication (int32_t/uint32_t base types) by 2, 3, 5, 9 can be
done with ADD (for 2) ADR (for 3,5,9).
Similarly, operations of the form a + x * {1,2,4,8} can use ADR.
[SCEV] Infer addrec nowrap flags during range analysis (#202964)
When we're computing the range of the addrec, we already have to reason
about whether it wraps, so we may as well determine the nowrap flags at
the same time.
This is more precise than the previous logic that took the addrec range
and checked whether adding a step to it does not wrap. For example, an
`{0,+,1}` addrec with a full range can still be non-wrapping.
Note that I removed some assertions in the SCEV printed that predicated
exit counts actually have predicates. Due to SCEV's query order
dependence, this can happen, also prior to this change, see for example
https://llvm.godbolt.org/z/cWK1MMEqv. While this indicates suboptimal
results, it's not a bug, and we should not assert.
Fixes https://github.com/llvm/llvm-project/issues/200788.
[flang][OpenMP] Check that IF clause applies to at most one leaf (#205164)
This also allows placing the IF clause in the "allowedClauses" set for
all directives, instead of having it in "allowedOnceClauses" for some
directives and in "allowedClauses" for others.
The emitted diagnostic will show which constituent has multiple IF
clauses applying to it:
```
if.f90:4:35: error: At most one IF clause can apply to each directive constituent
!$omp & if(target teams: x > 0) if(teams distribute: y > 0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
if.f90:4:11: Previous IF clause applying to the TEAMS constituent
!$omp & if(target teams: x > 0) if(teams distribute: y > 0)
^^^^^^^^^^^^^^^^^^^^^^^
```
PR 60360: make the default /boot partition on evbarm 64MB if we need
the dtb set (the newer dtb files overflow the old 32mb default).
In ACPI environments where we do not need dtb installed, do not select
the set by default.