[ADT] Remove zombie-instance handling from SmallDenseMapStorage (NFC) (#228925)
This patch removes the redundant storage.Large.NumBuckets == 0 check
and the two dead stores to the field from SmallDenseMapStorage, and
simplifies DenseMapStorage::maybeMoveFast to use direct assignment
instead of swap.
SmallDenseMapStorage used to have a zombie state:
!Small && storage.Large.NumBuckets == 0
in grow() so that ~DenseMapBase(), which calls deallocateBuckets(),
could safely destruct the moved-from temporary DenseMapBase instance.
Likewise, DenseMapStorage::maybeMoveFast used swap(Other) so that the
temporary instance would not deallocate the moved-from buffer upon
destruction.
With #228802, grow() directly uses StorageT for the temporary storage,
which has a trivial destructor, so neither workaround is needed.
Assisted-by: Antigravity
[llvm-objcopy][COFF] Keep COMDAT section definition symbols when stripping (#228783)
--strip-unneeded and --discard-all removed the section definition symbol of
a COMDAT section if no relocation referenced it directly, which is the
common case since relocations target the COMDAT leader. The aux record of
that symbol carries the COMDAT selection; without it lld discards the
section as a leaderless COMDAT and silently drops relocations against it.
This broke e.g. .refptr.* sections in MinGW objects, producing executables
that load garbage instead of the referenced pointer.
Assisted-by: Claude Opus 5.5
[mlir][tblgen] Warn about the deprecated multi-result fold form
The legacy form `LogicalResult fold(FoldAdaptor,
SmallVectorImpl<OpFoldResult> &)` will be removed. This patch makes
`mlir-tblgen -gen-op-decls` warn when a dialect keeps `useOpFoldResults`
at 0 and has an op with `hasFolder` that does not have exactly one fixed
result. The warning points at the dialect definition. A note names the
op that uses the legacy form and comes first in name order.
The warning comes once for each dialect in one `-gen-op-decls` run. A
dialect with ops in more than one `.td` file can warn once for each file
that contains such an op. `-gen-op-defs` does not warn.
No in-tree dialect warns, because each in-tree dialect with such an op
already sets the bit.
The diagnostic follows the `-on-deprecated` option: `none` silences it,
`warn` (the default) warns, and `error` reports an error and fails the
run. `MlirTblgenMain.h` exposes the option value through
[6 lines not shown]
[mlir] Deprecate the legacy fold APIs with a results vector
The legacy `Operation::fold` overloads with a
`SmallVectorImpl<OpFoldResult> &` parameter drop partial folds. The
overloads that return `OpFoldResults` keep them.
This patch moves every in-tree caller of the legacy overloads to the
overloads that return `OpFoldResults`, except the unit tests of the
legacy APIs. `OpFoldResultsTest.cpp` suppresses the deprecation warnings
for these tests. The test dialect keeps a legacy fold trait for the fold
tests, so `TestOps.cpp` suppresses the warning too. Then the patch marks
these APIs as deprecated: the two legacy `Operation::fold` overloads,
the legacy general `foldTrait` form, the legacy fold hook overloads of
`DynamicOpDefinition`, and the `DynamicOpDefinition::LegacyFoldHookFn`
alias. ODS cannot put an attribute on an interface method, so only the
documentation marks the legacy `DialectFoldInterface::fold` method as
deprecated.
The new code in `cir::CastOp::fold` also fixes a crash. The fold
[22 lines not shown]
[mlir][CIR] Use OpFoldResults for the cir.scope fold
The CIR dialect now sets the `useOpFoldResults` bit. ODS then declares
`OpFoldResults fold(FoldAdaptor)` for each CIR op that does not have
exactly one fixed result. `cir.scope` is the only such op with a fold.
Its fold now returns the yielded value directly. The behavior does not
change. The existing test `clang/test/CIR/Transforms/canonicalize.cir`
covers this fold.
Signed-off-by: Víctor Pérez Carrasco <victor.pc.upm at gmail.com>
irc/eggdrop: Update 1.10.1 => 1.10.2
Changelog:
- Added the ability to implement extended bans.
- Added initial handling of arbitrary modes via 005 messages.
- Fixed compile warnings when using openssl 4.0.0.
- Fixed a type error when compiling with Tcl 9.
- Fixed an issue where rehashing causes an issue releasing and reopening
a listen port, causing Eggdrop to quit.
- Added option for unique systemd unit naming to autobotchk.
- Added support for declaring a python virtual environment when starting
with autobotchk.
https://github.com/eggheads/eggdrop/blob/v1.10.2/NEWS
PR: 299130
Approved by: osa, vvd (Mentors, implicit)
MFH: 2026Q4
(cherry picked from commit 6a92577cfa187a158294ae0cc1292cc8a78ec297)
[mlir] Use OpFoldResults in more upstream dialects
The scf, shape, sparse_tensor, gpu, math, and builtin dialects now set
the `useOpFoldResults` bit. ODS then declares `OpFoldResults
fold(FoldAdaptor)` for each of their ops that does not have exactly one
fixed result. This patch moves the seven folds of such ops to the new
form: `scf.if`, `shape.split_at`, `sparse_tensor.crd_translate`,
`gpu.memcpy`, `gpu.memset`, `math.sincos`, and
`builtin.unrealized_conversion_cast`.
The behavior of the folds does not change, except in the case below.
Each fold builds the same normalized `OpFoldResults` object that the
legacy adapter built from the old return. The current tests of each
dialect cover these folds.
In a graph region or in an unreachable block, an operand that
`unrealized_conversion_cast` or `sparse_tensor.crd_translate` forwards
can be another result of the same op that the same fold replaces. The
new form drops the replacements of such a fold. For a forward chain, the
[25 lines not shown]
[mlir][linalg] Use OpFoldResults for linalg folds
The linalg dialect now sets the `useOpFoldResults` bit. ODS then
declares `OpFoldResults fold(FoldAdaptor)` for each linalg op that does
not have exactly one fixed result. This patch moves the eleven folds of
such ops in `LinalgOps.cpp` to the new form. It also changes the fold
template of `mlir-linalg-ods-yaml-gen`, so the generated named ops use
the new form too.
The behavior of the folds does not change. A fold that returned the
result of `memref::foldMemRefCast` now returns the same in-place state
through the `LogicalResult` constructor. The folds of `transpose`,
`pack`, and `unpack` return their replacement value directly.
The yaml-gen test now checks the generated fold definition.
A build directory that uses a native `mlir-linalg-ods-yaml-gen` does
not regenerate `LinalgNamedStructuredOps.yamlgen.cpp.inc` when the tool
changes. Delete that file before the build.
[5 lines not shown]
[mlir][vector] Use OpFoldResults for vector folds
The vector dialect now sets the `useOpFoldResults` bit. ODS then
declares `OpFoldResults fold(FoldAdaptor)` for each vector op that does
not have exactly one fixed result. This patch moves the five folds of
such ops to the new form: `to_elements`, `transfer_write`, `store`,
`masked_store`, and `mask`.
The behavior of the folds does not change, except in the case below. A
fold that returned success with an empty vector now returns `success()`,
which is an in-place change. A fold that filled the vector now returns
its values.
The all-true fold of `vector.mask` moves the masked op out of the
region, and the terminator then has null operands. So this fold must
replace every result, and the driver erases the op. A mask without
results has nothing to replace, so the fold reports the move as an
in-place change.
[30 lines not shown]
[mlir][memref] Use OpFoldResults for memref folds
The memref dialect now sets `useOpFoldResults`. ODS then declares
`OpFoldResults fold(FoldAdaptor)` for each memref op that does not have
exactly one fixed result. This patch moves the seven folds of such ops
to the new form: `copy`, `dealloc`, `dma_start`, `dma_wait`,
`extract_strided_metadata`, `prefetch`, and `store`. The behavior of
these folds does not change, except for `extract_strided_metadata`.
The `memref.extract_strided_metadata` fold created `arith.constant` ops
with its own builder and replaced the uses of the constant results
itself. No driver saw these changes. The fold now returns a partial
fold: one replacement for each constant result, and an in-place mark
when it removes a `memref.cast` source. This patch removes the helper
`replaceConstantUsesOf`, which has no other user.
DialectConversion folds an op before it applies the patterns. So the
conversion did not see the new constants and left them unconverted.
Now the conversion legalizes the new constants of the partial fold, as
[32 lines not shown]
[mlir][affine] Use OpFoldResults for affine folds
The affine dialect now sets `useOpFoldResults`. ODS then declares
`OpFoldResults fold(FoldAdaptor)` for each affine op that does not have
exactly one fixed result. This patch moves the eight folds of such ops
to the new form: `dma_start`, `dma_wait`, `for`, `if`, `store`,
`prefetch`, `parallel`, and `delinearize_index`. The behavior of these
folds does not change, with two exceptions.
The `affine.delinearize_index` fold now replaces each result whose basis
element is 1 with the constant 0, and keeps the other results. In
`Tensor/bubble-up-extract-slice-op.mlir`, these results now fold to a
constant 0. The new test `Affine/fold-partial.mlir` runs
`-test-single-fold` and `-sccp`, because `-canonicalize` also runs
`DropUnitExtentBasis`, which hides a broken fold.
In a graph region or in an unreachable block, an init of a zero-trip
`affine.for` can be another result of the same loop. The fold also
replaces that result, so the new form drops the replacements of the
[24 lines not shown]
[mlir][arith] Use OpFoldResults for arith folds
The arith dialect now sets `useOpFoldResults`. ODS then declares
`OpFoldResults fold(FoldAdaptor)` for each arith op that does not have
exactly one fixed result. This patch moves the four folds of such ops to
the new form: `addui_extended`, `subui_extended`, `mulsi_extended`, and
`mului_extended`. The behavior of these folds does not change, with two
exceptions.
The `arith.mulsi_extended` fold now replaces the low result of
`mulsi_extended(x, 1)` by `x`, and keeps the high result. This is also
correct for i1, where the constant `true` is -1. The i1 tests in
`Arith/canonicalize.mlir` change their expected output.
In a graph region or in an unreachable block, the identity fold of
`addui_extended`, `subui_extended`, or `mului_extended` can forward an
operand that is the other result of the same op. The fold also replaces
that result, so the new form drops the replacements of the fold. The
legacy form gave a correct result in this case, because it first moved
[12 lines not shown]
[mlir] Use the replacements of a partial fold in SCCP
`SparseConstantPropagation` now uses the `OpFoldResults` form of
`Operation::fold`. It merges each replacement into the lattice of its
result, and it sets each kept result to the entry state. A kept result
must not join with its own lattice, because that leaves the lattice
uninitialized. Before this patch, SCCP saw a partial fold as a failure
and set every result to the entry state.
The new test in `sccp.mlir` checks that SCCP uses the replacements and
that the kept result stays at the entry state.
Signed-off-by: Víctor Pérez Carrasco <victor.pc.upm at gmail.com>
[mlir] Apply partial folds in the greedy pattern rewrite driver
The greedy driver now applies the `OpFoldResults` of a fold:
- A fold that replaces every result erases the op. The driver
materializes every result, also a result without uses, because
`replaceOp` gives the listeners a value for each result.
- A partial fold replaces the uses of each replaced result and keeps
the op. A replaced result without uses gets no constant. The driver
puts the op on the worklist again.
- The materialization of constants is all-or-nothing. When one
constant fails, the driver inserts no constant and applies no
replacement. An in-place change still counts.
- A fold that keeps every result and has no in-place mark fails.
The driver uses `OpBuilder::materializeFoldResults` for the constants.
When `MLIR_ENABLE_EXPENSIVE_PATTERN_API_CHECKS` is on, the driver
compares the fingerprints of the op before and after the fold. A fold
that changes the op and returns failure is a fatal error. A fold that
[13 lines not shown]
irc/eggdrop: Update 1.10.1 => 1.10.2
Changelog:
- Added the ability to implement extended bans.
- Added initial handling of arbitrary modes via 005 messages.
- Fixed compile warnings when using openssl 4.0.0.
- Fixed a type error when compiling with Tcl 9.
- Fixed an issue where rehashing causes an issue releasing and reopening
a listen port, causing Eggdrop to quit.
- Added option for unique systemd unit naming to autobotchk.
- Added support for declaring a python virtual environment when starting
with autobotchk.
https://github.com/eggheads/eggdrop/blob/v1.10.2/NEWS
PR: 299130
Approved by: osa, vvd (Mentors, implicit)
MFH: 2026Q4
[mlir] Apply partial folds in OperationFolder
`OperationFolder::tryToFold` now applies the `OpFoldResults` of a fold.
A fold that replaces every result erases the op. It materializes every
result, also a result without uses, because `replaceOp` gives the
listener a value for each result. A partial fold replaces the uses of
each replaced result, keeps the op, and sets `inPlaceUpdate`. It
materializes constants only for the replaced results that have uses. If
a constant fails to materialize, no result is replaced, and an in-place
change still counts. The private vector overload of `tryToFold` has no
callers after this change, so this patch removes it.
This patch also fixes `OperationFolder::processFoldResults`. It moved a
reused constant to the front of the block as soon as it used the
constant for a result. If a later result then failed to materialize,
the cleanup erased all ops before the insertion point. These ops
included the moved constant, which still had uses. The folder now moves
the reused constants only after all results materialize.
[19 lines not shown]
[mlir] Deprecate the OpBuilder::tryFold overload with a results vector
The `OpBuilder::tryFold` overload with a `SmallVectorImpl<Value> &`
parameter drops partial folds. The overload that returns
`OpFoldResults`, together with `materializeFoldResults`, keeps them.
No in-tree code calls the old overload anymore, so this patch marks it
as deprecated. The unit test of the old overload suppresses the
deprecation warning.
Signed-off-by: Víctor Pérez Carrasco <victor.pc.upm at gmail.com>
[flang] Use the OpFoldResults overload of OpBuilder::tryFold
`getAttrIfConstant` in `LLVMInsertChainFolder.cpp` folds the op that
defines a value and reads the constant of the value from the fold. It
used the old `OpBuilder::tryFold` overload, which materializes a
constant for each attribute replacement. The function only read the
value of the new `llvm.mlir.constant`, so these constants stayed in the
IR without uses.
The function now uses the new overload, which returns the fold result
and creates no constant. It accepts the same constants as before. The
fold must replace every result. A `Value` replacement counts if
`llvm.mlir.constant` defines it. An attribute replacement counts if the
op is in the LLVM dialect and `LLVM::ConstantOp::isBuildableWith`
accepts the attribute. Only in this case did the old overload create an
`llvm.mlir.constant`. One difference remains: the other results of the
op no longer have to materialize.
Signed-off-by: Víctor Pérez Carrasco <victor.pc.upm at gmail.com>
[mlir] Apply partial folds in DialectConversion
`OperationLegalizer::legalizeWithFold` now uses the new
`OpBuilder::tryFold` overload and `materializeFoldResults`, and it
applies partial folds. The legalizer replaces the uses of each replaced
result that has uses, legalizes the new constants, and tries to
legalize the op again.
With pattern rollback, `replaceAllUsesWith` only records a value
mapping, which the conversion applies when it commits and drops on a
rollback. So the legalizer skips a result that an earlier fold already
replaced, and a replacement that leads back to its result, which would
make the mapping cyclic. Each new mapping counts as progress. If a new
constant does not legalize, the legalizer rolls the fold back, as for a
full fold. A full fold with rollback still materializes every result.
Without rollback, the legalizer materializes only the replaced results
that have uses, also for a full fold, because it must legalize each new
op. So it creates no constant that nothing uses, and a result without
[12 lines not shown]
Assemble CI images from the shared nextbsd-ci assembly, never pkg
ASSEMBLY=artifacts (the default; every CI lane) now lays the five
component continuous artifacts (base, kernel, userland, contrib, kexts)
into the rootfs via the SHARED assembly script that lives in nextbsd-ci
(checked out into the workspace at the pinned v0.3.1 release tag, rsynced
into the build VM). One recipe, all consumers: this lane, the userland PR
lane, and the kext lane share it. No pkg anywhere in a CI image — packages
are gated release artifacts.
The inline re-derivation of the same layout that was about to ship is gone:
the Apple /private layout, the overlays /etc seed, the runtime skeleton,
kext auth, offline DBs, and cert bundle all come from the shared script
(SKIP_ASSEMBLE=1 so this lane keeps its own 1.5G root + live ISO + rpi500
media tail). build.sh steps 3/3b are pkg-mode-only now (the shared script
already did them in artifacts mode); step 4 runs in both (idempotent DBs +
the certctl refresh the script can't do on a Linux runner).
ASSEMBLY=pkg (release images) is unchanged: pkg install
[10 lines not shown]
[mlir] Apply partial folds in OpBuilder::createOrFold
The multi-result `createOrFold` now uses the new `OpBuilder::tryFold`
overload and `materializeFoldResults`. When the fold replaces only some
results, the new op stays, and the results of `createOrFold` mix the
replacement values and the kept results of the op. Before this patch,
such a fold counted as an in-place fold or as a failure. The new op has
no uses yet, so `createOrFold` materializes every replaced result.
The zero-result `createOrFold` also uses the new overload. A fold of a
zero-result op can only change the op in place, so its behavior does
not change.
A new test pattern builds `test.op_partial_fold` with the multi-result
`createOrFold`. The new test in `test-operation-folder.mlir` checks
that the op stays next to the replacement values.
Signed-off-by: Víctor Pérez Carrasco <victor.pc.upm at gmail.com>
[mlir] Add an OpBuilder::tryFold overload that returns OpFoldResults
`OpBuilder::tryFold(op, results, constants)` applies a fold only if the
fold replaces every result, so it cannot give a partial fold to the
caller. This patch adds two `OpBuilder` functions that let a caller
apply a partial fold:
- `OpFoldResults tryFold(Operation *op)` folds the op and returns the
fold result. Like the old overload, it skips constants and repeats a
fold that only changes the op in place. It creates no constant.
- `materializeFoldResults(op, foldResults, liveOnly)` returns one value
per result: the replacement of a replaced result, or null for a kept
result. It turns each attribute into a new constant at the insertion
point. If `liveOnly` is set, a replaced result without uses gets null
and no constant. If one constant fails to materialize, the function
inserts no constant and fails.
The old overload now uses the two new functions. A fold that replaces
only some results, which only the new fold form can return, counts as
an in-place fold if it changed the op in place, and as a failure
[11 lines not shown]
databases/tokyocabinet: Remove port option depending on expired port
This port includes the option "LZMA" (off by default) that depends
on archivers/lzmalib. This port was removed in commit d6baea195f8e
on April 1st, 2024.
PR: 299124
Approved by: no maintainer
Approved by: osa, vvd (Mentors, implicit)
MFH: 2026Q4
(cherry picked from commit ac6015009b7e1276ce31e140aa363a6879ac5fcb)
databases/tokyocabinet: Remove port option depending on expired port
This port includes the option "LZMA" (off by default) that depends
on archivers/lzmalib. This port was removed in commit d6baea195f8e
on April 1st, 2024.
PR: 299124
Approved by: no maintainer
Approved by: osa, vvd (Mentors, implicit)
MFH: 2026Q4