Convert kmip plugin to typesafe pattern
This commit adds changes to convert the kmip plugin from the legacy dict-based ConfigService/CompoundService to the typesafe GenericConfigService pattern, with a ConfigServicePart, Pydantic models, and the internal ZFS/SED key-management machinery extracted into plain functions backed by an in-memory KMIPKeyStore. Since kmip.config now returns a model, in-process consumers in failover, the pykmip mako, pool encryption and the kmip pseudo-service are switched to attribute access, and the KMIP port delegate hands the base a dict so port validation keeps working.
[LV] Add `-vplan-print-before=<pass-regex>` (#203933)
This can be helpful for debugging and for VPlan check tests (showing
before/after a specific transform).
This also adds `-vplan-print-before-all` for parity with
`-vplan-print-after-all`.
[clang][bytecode] Add more checks around _Complex values (#204076)
Check the actual source type when converting a pointer to an rvalue. We
otherwise allow converting form a two-element primitive array.
[VPlan] Recognize lshr in getSCEVExprForVPValue. (#203496)
When lshr v, const occurs and const is less than the type's bitwidth, it
can be treated as udiv v, (1 << const). This enables vectorizer to
convert more gathers into strided loads.
Pre-commit test #203488
[MLGO][EmitC] Scalarize single-element tensor returns (#199686)
Add an EmitC-owned preparation pass,
`mlgo-scalarize-single-element-tensor-return`, that rewrites private
functions returning a statically-shaped ranked tensor with exactly one
element into functions returning the element type directly.
Assisted-by: Codex (refine implementation + tests). I reviewed all code
and tests before submission.
## Example
Before:
```mlir
func.func private @rank1(%arg0: tensor<1xi64>) -> tensor<1xi64> {
return %arg0 : tensor<1xi64>
}
```
[44 lines not shown]
[mlir][LLVM] Add the `byte` type to the LLVM dialect (#203795)
This PR ports the newly added `byte` type from LLVM IR to mlir's LLVM
dialect. The simplest motivation for the byte type is being able to
implement `memcpy` in LLVM IR. This was previously not possible: Due to
rules around conversions between integers and pointers (which e.g.
implicitly happen during loads), partial-poisons and pointer provenance
were not preserved. No alterantive types to integers existed that one
could use to have poison and provenance preserving SSA-values. The byte
type solves exactly this issue. Frontends are encouraged to use it when
needed for better optimization capabilities.
Currently, the only operation that has changed semantics around `byte`
is `bitcast`. Is now allows casting between `byte` and `ptr` (unlike
integers and pointers).
Corresponding LLVM commit:
https://github.com/llvm/llvm-project/commit/80f2ef70f592
[4 lines not shown]
NAS-141401 / 27.0.0-BETA.1 / Convert FTP plugin to typesafe pattern (#19139)
## Context
The `ftp` plugin was still dict-based: a `SystemServiceService` with a
string `datastore_extend`, a `do_update` returning a plain dict, and
consumers/mako templates reading config via `cfg['key']`. This moves it
to the typesafe pattern (lean service class delegating to a
`SystemServicePart`, `generic = True`, typed `config()`/`do_update`,
`check_annotations=True`, `call2`), matching the converted `ups` plugin.
## Solution
- **New `plugins/ftp/` package** replacing `plugins/ftp.py` and
`plugins/ftp_/`: `__init__.py` holds the lean `FTPService` (registered
in `main.py`'s `ServiceContainer`), `config.py` holds `FTPModel` +
`FTPServicePart` (extend/validate/do_update), and the port/cert
attachment delegates plus the `connection_count` helper move in
alongside. The old compound `ftp_/status.py` service is folded into
`connection_count` as a `@private` method.
- **API models** (`api/v27_0_0/` only): split the legacy
[17 lines not shown]
[LoongArch] Add DAG combine for horizontal widening add/sub
Add a DAG combine to recognize horizontal widening add/subtract patterns
and lower them to the corresponding LSX/LASX instructions.
The following pattern is matched for both signed and unsigned variants:
```
ADD/SUB(SEXT/ZEXT(BUILD_VECTOR(extract_elt(vj, 1), extract_elt(vj, 3), ...)),
SEXT/ZEXT(BUILD_VECTOR(extract_elt(vk, 0), extract_elt(vk, 2), ...)))
```
This covers the following instructions:
```
LSX: VHADDW.H.B, VHADDW.W.H, VHADDW.D.W
VHADDW.HU.BU, VHADDW.WU.HU, VHADDW.DU.WU
VHSUBW.H.B, VHSUBW.W.H, VHSUBW.D.W
VHSUBW.HU.BU, VHSUBW.WU.HU, VHSUBW.DU.WU
[10 lines not shown]
Reject and normalize non-colon NIC MAC addresses
## Problem
A custom NIC MAC entered with dash, no-separator, or mixed separators (e.g. `10-66-6A-1F-F1-B1`) passed the permissive `mac` pattern but libvirt's `defineXML` only parses colon-separated MACs, so the container/VM saved fine and then failed to start with `XML error: unable to parse mac address`. The colon-only `MACAddr(separator=':')` guard the VM plugin used through electriceel was dropped when devices moved to the pydantic models at fangtooth, and containers (26.0+) never had it, so these values can already be sitting in `vm_device` and `container_device`.
## Solution
- Tightened the shared `MACAddress` type to colon-only with a clear message, and switched the v27 VM and Container NIC `mac` fields to use it (removing the duplicated permissive inline pattern). Frozen API versions are left as-is.
- Added a migration that normalizes existing NIC MACs in both `vm_device` and `container_device` to libvirt's canonical lowercase colon form, regenerating the rare value that isn't a real MAC. This is required because `*.device.query` re-validates rows through the model, so an un-normalized non-colon MAC would otherwise make `query` fail once the pattern is tightened. Normalization preserves the user's intended address and heals instances that were stuck failing to start.
[llubi] Update the implementation of assume align operand bundle (#203775)
This PR updates the implementation for the `"align"(ptr %p, i64 %align,
i64 %offset)` operand bundle of `@llvm.assume`: The old implementation
reduced align/offset to the largest shared power of two. But LangRef
requires checking %alloc - %offset in this case.
build/plugins: handle vendor plugins due to PLUGIN_ABI ambiguity
They use the ABI in the package repository configuration and thus
they need to be rebuilt for business versions.
[MLIR][EmitC] Add optional pure attribute to CastOp (#202749)
In general, C++ cast expressions cannot always be assumed to be pure: they may
invoke user-defined conversions or be affected by floating-point environment
settings. However, in many practical cases, such as integer casts without
operator overloading, the cast is pure and can be treated as speculatable and
side-effect-free. For such cases, the newly added `pure` attribute may be used.
When `pure` attribute is set, `getSpeculatability()` returns `Speculatable` and
`getEffects()` reports no effects. It is UB if the `pure` attribute is set and
the actual conversion is not pure, e.g. when the user-defined conversion has
memory effects.
[LLD] Allow all output-section-commands in OVERLAYS. (#203524)
The GNU ld grammar for overlays is:
secname1
{
output-section-command
output-section-command
...
}
secname2
...
The output-section-commands are the same as in an OutputSection. At
present we have a stripped down parser that only supports
InputSectionDescriptions, this does not permit other useful commands
such as defining symbols.
Due to recent refactoring it is now simple to reuse the parser for an
Output Section command rather than using a custom one.
[5 lines not shown]
Pull up the following revisions, requested by jdc in ticket #311:
external/mit/expat/dist/lib/libexpat.map.in up to 1.1.1.1
external/mit/expat/dist/lib/random_arc4random.c up to 1.1.1.1
external/mit/expat/dist/lib/random_arc4random.h up to 1.1.1.1
external/mit/expat/dist/lib/random_arc4random_buf.c up to 1.1.1.1
external/mit/expat/dist/lib/random_arc4random_buf.h up to 1.1.1.1
external/mit/expat/dist/lib/random_dev_urandom.c up to 1.1.1.1
external/mit/expat/dist/lib/random_dev_urandom.h up to 1.1.1.1
external/mit/expat/dist/lib/random_getentropy.c up to 1.1.1.1
external/mit/expat/dist/lib/random_getentropy.h up to 1.1.1.1
external/mit/expat/dist/lib/random_getrandom.c up to 1.1.1.1
external/mit/expat/dist/lib/random_getrandom.h up to 1.1.1.1
external/mit/expat/dist/lib/random_rand_s.c up to 1.1.1.1
external/mit/expat/dist/lib/random_rand_s.h up to 1.1.1.1
external/mit/expat/dist/coverage.sh up to 1.1.1.1
external/mit/expat/dist/cmake/autotools/expat__linux.cmake.in up to 1.1.1.1
external/mit/expat/dist/cmake/autotools/expat__macos.cmake.in up to 1.1.1.1
external/mit/expat/dist/cmake/autotools/expat__windows.cmake.in up to 1.1.1.1
[100 lines not shown]
[OpenACC] Add emit-independent-loops-as-unstructured flag
Add a flag (default true) to bypass the TODOs in `loopWillBeIndependent`
that fired for unstructured do loops inside independent OpenACC loop and
combined constructs, lowering them as `acc.loop` instead. Existing TODO
tests are extended to exercise both the default (lowered) path and the
explicit `=false` path that still reports the TODO.
Co-Authored-By: Claude <noreply at anthropic.com>
[DropUnnecessaryAssumes] Fix iterator invalidation. (#203765)
registerAssumption() below can append to (and reallocate) the cache's
assumption vector. Use integer index for indexing instead of using the
iterator. Stop at the original count, so we don't reprocess assumes
created during the loop.
PR: https://github.com/llvm/llvm-project/pull/203765