[flang][NFC] Split the OpenACC construct lowering into two lanes (#227706)
genFIR(OpenACCConstruct) decided twice, in three places, whether the
construct it lowers is structured, and reassigned the evaluation it
works from halfway through: before the descent that evaluation is the
construct, after it the loop the directive absorbs. Everything
downstream had to know which one it was holding.
Give each form its own function and leave genFIR to choose between them.
One lane allocates the exit selector, lowers the evaluations the
construct holds, and emits the jump table; the other reads the collapse
clauses, descends to the absorbed depth, and lowers what is inside it.
The prologue and epilogue are short enough to state in both rather than
share.
[RISCV][P-ext] Prevent accidental matches in riscv_packed_simd.c. NFC (#227830)
The function name is printeded multiple times in the output. We need to
make sure we are matching an instruction mnemonic. The way other
existing test cases do this is by checking for a space after the
instruction name. We don't need to do this if the mnemonic contains a
period since those are replaced with underscores in the function name.
[CIR][EH] Fix scope for partial array cleanup (#227838)
There was a bug in CIR where if an array whose elements required
destruction was initialized with an ILE, we weren't properly closing the
EH cleanup scope after the initialization completed, so it enclosed the
rest of the function. The result was that if anything later in the
function threw an exception, it would trigger both the normal
destruction of the array and the leftover EH "partial" cleanup, leading
to a double-free.
This change fixes that problem by introducing a CleanupDeactivationScope
around the init list processing (where we already had a MissingFeature
marker saying this was needed). The EH cleanup scope is now closed when
the CleanupDeactivationScope object goes out of scope.
This change also caused some observable changes to existing tests where
we were previously behaving incorrectly.
Assisted-by: Cursor / various models
Drop the pass-through promote wrapper from zfs.resource ops
## Problem
`zfs.resource.promote` called a module-level `promote` in resource_ops that did nothing but call back into the service's `promote_impl`, adding an extra hop with no logic of its own.
## Solution
The API method now calls `promote_impl` directly through `call_sync2` and the wrapper is removed. The call still goes through the service so `promote_impl` gets its thread-local handle and sends its change event.
fix the bit length of ML-DSA 44/Ed25519 keys that was being
incorrectly reported as 256. The private key length for these
composite keys is 512 bits. This value is only used for display.
Spotted by Yiyue Wang
Match pool.dataset's volsize headroom and thick re-reserve rules in zfs.resource
## Problem
The volume headroom checks in `zfs.resource` matched neither `pool.dataset` on master nor ZFS. Create measured the refreservation, so sparse volumes were exempt. Set measured the refreservation growth against the zvol's free space, with a 100% cap under `force_size`, which ignored metadata overhead and data already written: a thick grow could go further than master allowed, a sparse zvol with data less, and `force_size` refused grows ZFS accepts. Set also only checked when volsize actually changed, where master checked whenever volsize was sent.
The thick re-reserve on grow also differed from master: it re-reserved any volume whose refreservation sat between the old and new size and skipped received reservations, where master only did so when the refreservation equals the volsize.
## Solution
- **Headroom**: create and set both refuse a volsize above 80% of the base with master's message, thick or sparse. On create the base is the nearest existing ancestor's `available`, and a missing immediate parent without `create_ancestors` skips the check so the missing-parent error is reported, as on master; on set it is the immediate parent's `available` plus the zvol's `used`, and the check runs whenever volsize is in the request. `force_size` skips it and leaves the rest to ZFS. The `force_size` descriptions say so, and `pool.dataset`'s go back to master's text.
- **Thick re-reserve**: a grow asks for `refreservation=auto` only when the current refreservation equals the volsize and none is sent, as master did. libzfs already grows a reservation it computed itself. Read-only and locked volumes are refused before this matters, as before.
The unit and integration tests follow the new rules; the create test that only checked the refreservation attribute is gone.
[flang][OpenACC] Preserve DO CONCURRENT independence in kernels loops (#227775)
`DO CONCURRENT` asserts that its iterations may execute independently.
When it is directly associated with a combined OpenACC `KERNELS LOOP`,
Flang currently lowers the loop as `auto`, unless an explicit `seq`,
`auto`, or `independent` clause is present. This patch adds a
default-enabled extension that preserves the `DO CONCURRENT`
independence assertion by lowering the loop as `independent`. This
behavior is OpenACC-conforming. Explicit loop parallelism clauses
continue to take precedence.
The extension can be disabled with:
`-fno-openacc-acc-kernels-do-concurrent-independent`
This patch also documents the extension and adds lowering tests for its
enabled and disabled behavior.
x11/glcapsviewer: allow to build with future CMake versions
Drop cmake_policy(VERSION) as cmake_minimum_required(VERSION)
command implicitly calls it too.
[LV] Use SCEV loop-uniformity for outer-loop branch legality (#199632)
This patch refactors the outer-loop vectorization branch legality checks
to reason about conditional branches directly instead of using the old
recursive inner-loop shape check.
The new check allows conditional branches when their condition is
either:
- loop-invariant with respect to the vectorized outer loop, or
- a compare whose operands are both SCEV loop-uniform with respect to
the vectorized outer loop.
Divergent conditional branches are still rejected, now with a more
specific diagnostic.
[KnownFPClass][NFC] Update ATTR values for atan2 tests (#224797)
Ran the following command since it was not run for
https://github.com/llvm/llvm-project/pull/223176
```
llvm/utils/update_test_checks.py \
--opt-binary build/bin/opt \
llvm/test/Transforms/Attributor/nofpclass-atan2.ll
```
[mlir][arith] Handle unsigned moduli in int-range optimizations (#224933)
`DeleteTrivialRem` reads constant moduli as signed values, causing
`remui` operations with sign-bit-set moduli to be rejected. Keep the
modulus as an `APInt` and apply signedness according to the remainder
operation.
Fixes #224630
Accept only canonical ZFS values in zfs.resource, handle none mountpoints on destroy and send the iSCSI extent event on readonly resync
## Problem
zfs.resource create/set accepted the backward-compat aliases ZFS keeps for acltype (disabled, noacl, posixacl), aclinherit (secure) and xattr (on), but ZFS always reports these back under the canonical name. Anything comparing the requested value with what ZFS reports gets it wrong, e.g. setting acltype=posixacl on a posix dataset hosting SMB shares was refused as an acltype change. Separately, destroying a dataset with mountpoint=none skipped attachment teardown and the TrueSearch pause because its mountpoint resolved to nothing. Also, the iSCSI extent readonly resync writes the extent row directly rather than through iscsi.extent.update, so the iscsi.extent.query CHANGED event master sent on that path was lost.
## Solution
- **Canonical values only:** the acltype, aclinherit and xattr choices now list just the names ZFS reports, and the posix/off acltype set used by the acl rules drops the aliases with them. No internal caller or the pool.dataset shim sends an alias. The compression spellings gzip-6 and zstd-fast-1 stay since pool.dataset still forwards them.
- **none mountpoint:** destroy now resolves it to the default /mnt/<name> path the same way pool.dataset intended, so shares, tasks and mounted descendants under it are torn down; legacy still resolves to no path.
- **Extent event:** the readonly resync sends iscsi.extent.query CHANGED with the extent's get_instance fields after updating the row, whether or not iscsitarget is running.
Report crash-looping app containers as crashed
## Problem
A container that keeps crashing under the catalog's default `unless-stopped` restart policy is reported by Docker as `restarting`, not `exited`. The container state mapping had no case for it, so it fell through to `exited`. 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
Map `restarting` to the existing `crashed` container state, so the app is reported as Crashed through the existing aggregation. Added a unit test for the Docker status to container state mapping, which had no coverage.
[RISCV][P-ext] Remove riscv_pmulh(u)intrinsics. (#227846)
These are redundant with the llvm.smulh/umulh intrinsics that were added
recently.
Strangely we don't have clang IRgen tests for these intrinsics/builtins,
but we do have a cross-project test for assembly.
[flang][openacc] Erase unused stack allocations in compute regions (#227807)
ACCEraseUnusedKernelAllocations only deleted unused fir.allocmem. A
dynamic fir.alloca, memref.alloca, or memref.alloc inside
acc.compute_region has the same problem: fir.declare's debug effect and
the matching free keep it alive through ordinary dead-code elimination,
and lowering turns it into a checked device malloc.
Delete those allocations when they have no uses, or when every use is
fir.freemem, memref.dealloc, a view such as fir.convert, or fir.declare.
A load, store, or other memory use still keeps the allocation.
This can happen when using stack arrays flags which replace the
fir.allocmem
sftp: be stricter in accepting paths returned by the server for
SSH_FXP_REALPATH or SSH2_FXP_READDIR replies, as these can be
used in some situations to decide the destination path for recursive
transfers.
Report and patch from Junghoon Cho
[AMDGPU] Use isGFX125xOnly as the assembler predicate for tensor load/store (#227887)
The VIMAGE_TENSOR gfx1250 real instructions are only available on
GFX125x, so predicate the assembler on isGFX125xOnly rather than on the
HasTDMInsts feature.
[Attributor][NFC] rename fadd_double --> fadd_self (#227931)
I have renamed `fadd_double` to `fadd_self` in `nofpclass-fadd-fsub.ll`
to make it clear that it refers to doubling `x += x` and **not** the
`double` type.
This makes it consistent with other tests that use the name
`fadd_double` to refer to the `double` type.