[MLIR] Allow recovering from semi-affine sets in FlatLinearValueConstraints
The IntegerSet constructor of FlatLinearValueConstraints asserts when
flattening fails, which happens for semi-affine integer sets. Since the
failure is signalled from inside a constructor, callers have no way to
detect the unsupported case ahead of time and no way to work around it;
they simply crash.
Make that constructor protected and expose the construction through
`FlatLinearValueConstraints::create` (and the corresponding
`FlatAffineValueConstraints::create`), which returns a `FailureOr` and
so lets callers handle a semi-affine set gracefully.
Existing in-tree users are updated: `addAffineIfOpDomain` keeps asserting
as before, and `simplifyIntegerSet` now returns the set unchanged instead
of asserting, since a semi-affine set simply cannot be simplified this way.
[VPlan] Add vputils::getEarlyExits helper (NFC) (#212348)
Both handleUncountableEarlyExits and the countable early-exit disconnect
in handleEarlyExits walk all exit blocks and skip predecessors coming
from the middle block to find the early exiting blocks.
Factor that walk out into vputils::getEarlyExits, returning the (early
exiting block, exit block) pairs.
[CI] Add documentation for self-hosted runners (#211622)
This patch adds (work in progress) documentation for the various
self-hosted runner groups we have access to in the LLVM monorepo.
[MLIR] Allow recovering from semi-affine sets in FlatLinearValueConst… (#212346)
…raints
The IntegerSet constructor of FlatLinearValueConstraints asserts when
flattening fails, which happens for semi-affine integer sets. Since the
failure is signalled from inside a constructor, callers have no way to
detect the unsupported case ahead of time and no way to work around it;
they simply crash.
Add an optional `bool *error` parameter to the constructor. When it is
non-null, hitting the unimplemented case sets `*error` to true and
returns instead of asserting, letting callers bail out gracefully.
`*error` is set to false on success. When the pointer is null the
previous assert behavior is retained, so existing callers are
unaffected.
AMDGPU: Handle more TargetParser queries in tablegen
Previously we had various enum switches. Start generated tables
indexed by enums. Avoid some special cases by defining the dummy
"generic" and "generic-hsa" targets as real processors.
Co-authored-by: Claude (Claude-Opus-4.8)
AMDGPU: Generate TargetParser table from TableGen
Migrate .def file to tablegen. The initial TargetParser
AMDGPU backend only handled R600. Extend to modern targets.
Stub out some tablegen definitions which will be used in future
changes.
Co-authored-by: Claude (Claude-Opus-4.8)
zed: let autoexpand see capacity changes on partitioned disks
Growing a disk under a whole-disk vdev never triggers autoexpand
(#12505). The kernel reports a capacity change on the disk itself
and nothing for the partitions, whose sizes did not change. But
since zfs owns the whole disk it carries a partition table, and
zed_udev_monitor() drops any disk-with-partitions event on the
assumption that a partition event will follow. For a resize none
ever does, so the ESC_DEV_DLE event that zfsdle_vdev_online() needs
is never generated and the pool stays at the old size until someone
runs zpool online -e by hand. This is the common case for cloud
disks grown online.
Pass change events through when udev marks them RESIZE=1. On the
matching side a disk-level event has no vdev guid to search by (the
label lives on the partition), and udev provides no ID_PATH on some
buses, so the physical path lookup can also come up empty. When
that happens, read the ZFS label off the whole-disk partition and
match by the pool and vdev guids stored in it. Unlike matching the
[33 lines not shown]
Apply metadirective loop checks after variant selection
Determine reachable replacements before preparing the associated loop. Apply
loop-only limitations only when a loop replacement can actually be selected.
Keep candidate-wide loop preparation for runtime cascades, where multiple
replacement arms remain reachable.
Reject interrupted metadirective loop associations
Treat an intervening OpenMP declarative directive as the end of a pending
loop association, matching ordinary loop-directive handling. Preserve
pending variants from enclosing scopes.
[MLIR] Allow recovering from semi-affine sets in FlatLinearValueConstraints
The IntegerSet constructor of FlatLinearValueConstraints asserts when
flattening fails, which happens for semi-affine integer sets. Since the
failure is signalled from inside a constructor, callers have no way to
detect the unsupported case ahead of time and no way to work around it;
they simply crash.
Make that constructor protected and expose the construction through
`FlatLinearValueConstraints::create` (and the corresponding
`FlatAffineValueConstraints::create`), which returns a `FailureOr` and
so lets callers handle a semi-affine set gracefully.
Existing in-tree users are updated: `addAffineIfOpDomain` keeps asserting
as before, and `simplifyIntegerSet` now returns the set unchanged instead
of asserting, since a semi-affine set simply cannot be simplified this way.
AMDGPU: Add -gen-amdgpu-target-def TableGen backend
Currently subtarget information is duplicated between a def file and
the backend. There are also increasingly unwieldy mapping tables
for subarches. Work towards unifying these, starting with r600. This
mirrors aarch64 and riscv's existing custom targetparser backends (i.e.,
the prompt was copy what riscv does).
Co-authored-by: Claude (Claude-Opus-4.8)
slock: Update to 1.7
Changes:
1.7
- Avoid ctype(3) abuses that could leads to break the screen locking at
least on NetBSD
- Support ^U for clearing password
RuntimeLibcalls: Migrate to dag libcall predicates (#210674)
Switch to using dag predicates instead of free-form code predicates.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
zio: don't strip gang stages from the DDT free pipeline
zio_create() adds ZIO_GANG_STAGES to the pipeline of a logical free
of a gang BP, but zio_free_bp_init() replaced the whole pipeline
with ZIO_DDT_FREE_PIPELINE for dedup BPs, discarding those stages.
When zio_ddt_free() takes the pruned-entry fallback (the entry was
legitimately removed by zpool ddtprune, or missing for any other
reason), the plain free that follows only frees the gang header
extents (metaslab_free_dva() frees vdev_gang_header_asize() for a
gang DVA) and every gang member leaks permanently.
OR the full ZIO_DDT_FREE_PIPELINE into the existing pipeline instead
of replacing it. zio_free_sync() is the only creator of these zios,
and for a dedup BP it already builds them with ZIO_FREE_PIPELINE and
ZIO_STAGE_ISSUE_ASYNC, so today this only adds ZIO_STAGE_DDT_FREE --
but ORing the whole declaration keeps this site correct if the DDT
free pipeline ever grows a stage. Adding rather than replacing also
keeps any stage zio_create() adds for this BP, so a future
conditional stage cannot be silently dropped here again.
[18 lines not shown]
ddt: select traditional phys by block identity, not BP DVA count
The write path stores a traditional DDT entry in the phys slot chosen
by the zp_copies value the block was written with, but the free-path
lookup validation (ddt_entry_lookup_is_valid()) selected the slot to
compare by the BP's physical DVA count, and ddt_addref() bumped the
refcount of that same wrongly-selected slot.
The two indexes diverge whenever a deduplicated block's BP carries
more DVAs than its copies value, which is exactly what ganging does:
a gang header is stored in more copies than the data it gangs, so
copies=1 blocks get a two-DVA gang header BP (unconditionally
through 2.3.3, and under the default redundant_metadata=all since
a46ce73ca8 made it configurable in 2.3.4 and 9250403ba6 in 2.4.0),
and from 2.3.4 that default also gives unencrypted copies=2 blocks a
three-DVA header BP. Encryption does not avoid the mismatch at
copies=1: the header BP still carries two counted DVAs (the salt/IV
DVA is separate). For such a block the validation checked
the wrong slot, concluded the entry had been pruned, and
[50 lines not shown]
Diagnose eager privatization for metadirective loops
Metadirective loop IVs do not have the construct-scoped host
association required by eager privatization. Emit a focused TODO instead of
reaching an assertion or null dereference.
[flang][OpenMP] Lower DO and SIMD variants in metadirectives
Lower DO, SIMD, and DO SIMD replacement directives selected by a
metadirective. Support standalone and begin/end forms with static or runtime
selection.
A standalone metadirective and its associated loop are represented as sibling
PFT evaluations. For example:
```fortran
!$omp metadirective &
!$omp& when(user={condition(flag)}: do) &
!$omp& otherwise(nothing)
do i = 1, n
a(i) = i
end do
```
has the following evaluation shape:
[54 lines not shown]
zpool export: return EBUSY when zvol minors are in use
When a zvol block device is open (e.g., mounted by the OS), exporting
the pool can hang indefinitely in zvol_remove_minors_impl() which calls
cv_wait(&zv->zv_removing_cv) with no timeout. This is because the open
holder never closes the device, so the condition variable is never
signaled.
Fix this by taking an additional spa reference in zvol_first_open() and
releasing it in zvol_last_close(). With this reference,
spa_export_common() will return EBUSY via the existing
spa_refcount_zero() check, matching the behavior already provided for
mounted ZFS datasets.
Additionally, move the zvol_remove_minors() call in spa_export_common()
to after the spa_refcount_zero() check. Previously it was called before
the check, which could still hang if a zvol was open.
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Signed-off-by: Heonje LEE <lhjnano at gmail.com>
Closes #18841
[LLDB] Hide unresolvable children from ObjC tagged pointers (#211936)
Foundation's small value inline representations have valid summaries and
sometimed synthetic children, but LLDB cannot access any ivars from
their base classes (such as [NSObject isa]).
Use a synthetic child provider to hide them.
rdar://182434208
Assisted-by: claude
[llvm-objcopy] Remove unnecessary AMDGPU ELF flag from test
The EF_AMDGPU_MACH_AMDGCN_GFX900 flag was not needed in the test input.
The test only verifies that llvm-objcopy correctly sets EM_AMDGPU machine
type, 64-bit class, and little-endian encoding -- none of which depend on
the e_flags value. Use the same approach as all other architectures in
the test (no explicit FLAGS, defaulting to <none>).
netinet: Promote IFP_TO_IA() from macro to function in_ifprimaryaddr().
in_ifprimaryaddr() exists only to support IPv4 multicast usage. Since the
adoption of epoch tracking, ifa_ref() is no longer required in its body;
that was originally introduced by rwatson in 2009.
We could not use __deprecated1() from <sys/cdefs.h> anyway, as
IFP_TO_IA() is a macro, not a function.
Approved by: glebius (2026-02-26)
Reviewed by: adrian, glebius, pouria
Differential Revision: D55344
netinet: Replace IFP_TO_IA() with in_ifprimaryaddr() completely.
IPv4 multicast currently has the big caveat that it depends on the first
assigned IPv4 address on an interface (the so-called "primary address").
in_ifprimaryaddr() only needs to be used by the following:
- the 0.0.0.0 booting node input workaround in IGMPv1;
- filtering out the node's own reports in IGMPv2;
- preserving the source IP where an IGMPv3 report has been looped back;
- inferring the default upstream IPv4 interface address for the
IP_MULTICAST_IF socket option;
- and inferring the source address during ip_output() for a multicast
datagram where an interface has been explicitly specified by that option.
All of these uses mandate the use of IPv4 source address selection, but
FreeBSD does not yet (fully) implement this functionality.
Approved by: glebius (2026-02-26)
Reviewed by: adrian, glebius, pouria
Differential Revision: D55345
AMDGPU: Handle more TargetParser queries in tablegen
Previously we had various enum switches. Start generated tables
indexed by enums. Avoid some special cases by defining the dummy
"generic" and "generic-hsa" targets as real processors.
Co-authored-by: Claude (Claude-Opus-4.8)
AMDGPU: Generate TargetParser table from TableGen
Migrate .def file to tablegen. The initial TargetParser
AMDGPU backend only handled R600. Extend to modern targets.
Stub out some tablegen definitions which will be used in future
changes.
Co-authored-by: Claude (Claude-Opus-4.8)