[flang][cuda] Break circular global init when copying them to the GPU module (#211100)
PTX does not support cycle in globals.
```
error: Circular dependency found in global variable set
```
To avoid cycle in type descriptor, check if there is a cycle and break
it.
The algorithm uses Tarjan’s strongly connected components algorithm for
finding strongly connected components in a directed graph.
- Each fir.global is a graph node.
- Each fir.address_of in a global initializer is an edge to another
global.
- An SCC containing multiple globals—or a self-edge—represents a
circular initializer dependency.
[CodeGen] Ensure `undef` propagation when an undef copy is eliminated if used as a subregister def (#204039)
If we eliminate an `undef` copy and there is a use of the copy that
`isDef` on just a sub-register, mark it as `undef`.
Fixes #204036.
[asan] Add !dbg metadata to __asan_after/before_dynamic_init calls (#211086)
We get this error when linking the kernel with a custom asan runtime
```
= note: inlinable function call in a function with debug info must have a !dbg location
call void @__asan_after_dynamic_init()
```
The verifier throws this because __asan_after_dynamic_init doesn't have
!dbg but it is inlinable into the module ctor that invokes it which does
have !dbg. Normally, these functions aren't inlinable because they're
provided by some prebuilt library, but for Fuchsia's kernel, we provide
a custom runtime defining these and it's built with LTO which does make
it inlinable.
The fix in this patch is just adding the !dbg metadata to these calls
which I think should be non-intrusive.
NOTE: Gemini was used to make the test.
[flang][acc] Reject generic interface name in acc routine (#211269)
OpenACC ties the named argument of a ROUTINE directive to a subroutine
or function. A generic interface name is therefore not a valid target.
Thus adding an explicit check for this plus informational error message.
[IR] Allow vector atomicrmw xchg (#208510)
Previously, we only allowed vector `atomicrmw xchg` for `elementwise`
`atomicrmw`. Relax this restriction. By default, expand these by casting
to integer.
This is a follow-up on: https://github.com/llvm/llvm-project/pull/190716
Assisted by AI.
press: Add Foundation blog posts for May-July 2026
Add multiple press entries for BSDCan 2026 and other events.
Sponsored by: The FreeBSD Foundation
Pull Request: https://github.com/freebsd/freebsd-doc/pull/702
[HLSL] Move sema tests out of ParserHLSL into SemaHLSL/Attributes (#211353)
This PR moves sema tests that were misplaced in `clang/test/ParserHLSL`
into a more appropriate location: `clang/test/SemaHLSL/Attributes`
These tests exercise `[[hlsl::...]]` attribute (resource_class,
contained_type, is_array, is_ms, is_rov, raw_buffer, dimension)
diagnostics from `DiagnosticSemaKinds.td`, relating to:
- 'hlsl::X' attribute cannot be applied to a declaration
- attribute takes one argument / takes no arguments
- can be used only on HLSL intangible type '__hlsl_resource_t'
- attribute is already applied / applied with different arguments
- ResourceClass attribute argument not supported
Which are appropriately related to semantics rather than parsing.
[Clang] Add C++11/C23-style spellings for Swift import attributes (#183484)
Swift interop attributes such as `swift_name`, `swift_attr`, and
`swift_private` previously only supported GNU-style spelling. Add the
missing `[[]]` attribute spellings for C++11 and C23 compatibility,
bringing them in line with other Clang attributes.
NAS-141910 / 27.0.0-BETA.1 / add job flag to json schema (#19384)
Same idea as adding `--keep-refs`. The team working on MCP doesn't have
an easy way to determine if an endpoint is a job and so they're having
to parse the text in the api description. This adds a `job` boolean so
it becomes much easier to programmatically determine if the API endpoint
is a job. Output looks something like
```
{
"name": "pool.scrub.run",
"roles": ["..."],
"doc": "...\n\nThis method is a job.",
"schemas": { "accepts": { ... }, "returns": { ... } },
"removed_in": null,
"job": true,
"input_pipes": false,
"output_pipes": false,
"check_pipes": true
}
```
[mlir][math] Fold FPowIOp with square-and-multiply to match powi expansion (#210982)
Fold math.fpowi using the base's own floating-point semantics via
iterative
square-and-multiply, matching the multiply sequence ExpandPowI builds in
SelectionDAGBuilder. The prior pow/powf-based fold computed in
float/double
and rounded differently from the runtime expansion, disagreeing with
x**n by ~1 ULP.
[CodeGen] Add MachineRegisterClassInfo analysis pass (#210826)
Which is a wrapper of RegisterClassInfo.
This can cache the result of RegisterClassInfo and hence
we can reduce compile time.
Supercedes https://github.com/llvm/llvm-project/pull/120690,https://github.com/llvm/llvm-project/pull/164877
---------
Co-authored-by: Wang Pengcheng <wangpengcheng.pp at bytedance.com>
Co-authored-by: Patrick Simmons <patrick.simmons at amd.com>
Co-authored-by: Matt Arsenault <arsenm2 at gmail.com>
[mlir-c] Fix pattern-set leak in rewrite.c materialization tests
The materialization tests added in #208934 freeze their MlirRewritePatternSet
but never destroy it. mlirFreezeRewritePattern only moves the patterns out of
the heap-allocated RewritePatternSet; the container itself must still be freed
with mlirRewritePatternSetDestroy (as testConversionTargetDynamicLegality
already does). The leak was caught by LeakSanitizer on the aarch64 HWASan
bootstrap bot (builder 55).
Only build secure/libexec/ssh-sk-helper if MK_USB == no
The ssh-sk-helper utility only functions if/when MK_USB == yes.
Installing it on systems where MK_USB == no doesn't make sense.
Differential Revision: https://reviews.freebsd.org/D58246
[flang][OpenMP] Don't emit implicit default mapper for flat allocatable derived types (#209645)
An allocatable or pointer capture of a derived type in a `target` region
triggers
synthesis of an implicit default declare mapper for the type. The gate
keyed only on
whether the captured *variable* was allocatable, not on whether the
*type* needs a
mapper:
```cpp
if (!isPointer && (hasDefaultMapper || isAllocatable)) {
```
For a flat type -- all components trivially mappable, no
allocatable/pointer/nested
record members -- the mapper is unnecessary. The object maps as a plain
bulk copy.
Emitting a mapper anyway lowers to a per-element, per-component mapper
[68 lines not shown]
NAS-141903 / 27.0.0-BETA.1 / Depend on openipmi explicitly (#19381)
## Problem
The IPMI plugin starts the `openipmi` systemd service on any system with
a real BMC (`ipmi.py` setup, gated on dmidecode `has-ipmi`), and that
unit — which loads the `ipmi_si`/`ipmi_devintf` kernel modules that
create `/dev/ipmi0` — is shipped by the Debian `openipmi` package. We
only declared `ipmitool` in Depends though, and openipmi rode in purely
as `ipmitool`'s `Recommends:`. Once truenas_build disabled
`install_recommends` by default, openipmi silently stopped being
installed, so on IPMI-capable hardware the service start fails,
`/dev/ipmi0` never appears, and all IPMI LAN/user configuration breaks.
## Solution
Add `openipmi` to middlewared's `Depends`. Same fix as the websockify
case — it's a genuine hard runtime dependency that was only surviving as
a recommend, so declaring it explicitly makes it independent of the
build's recommends setting.
webshell: fix sessions hanging with a blank terminal
login(1) hangs up and reopens its tty at session start, so reads on
the pty master transiently fail with EIO. The reader thread treated
any read error as fatal and exited silently: the UI showed
"connected" but the terminal stayed blank while the shell kept
running with nobody forwarding its output. Treat EIO as fatal only
when the shell child is gone (50ms retry, 5s cap).
Also harden the worker teardown:
- abort() closed master_fd while the reader/writer threads still
used the fd number; it now only signals and kills the child, and
run() reaps, joins, then closes under try/finally.
- terminate_pid(use_pgid=True) before the child's setsid() resolved
to middlewared's own process group and could kill the daemon;
signal the pid directly when the group is the caller's own.
- Bound every teardown wait: WNOHANG reap (D-state child), 30s
websocket send (stalled client). Catch BaseException so thread
[2 lines not shown]
[AMDGPU] Fix legalization of V_PK_*64 SGPR to VGPR change
Special case for V_PK_*64 instructions: these do not have OPSEL but SGPR
sources behave like OPSEL is set replicating low 64-bits into high. VGPR
sources in turn read actual 4 registers. To move operand from an SGPR to
a VGPR we need to replicate low half.
NAS-141882 / 26.0.0-RC.1 / Fix `clear_sync_pending_zfs_keys` (#19362)
The bug — zfs_keys.py:164: clear_sync_pending_zfs_keys called
datastore.update('storage.encrypteddataset', {'kmip_uid': None}),
passing the update data dict into the id_or_filters position and leaving
the required data argument unfilled. Any dataset that still held a local
encryption_key triggered TypeError: DatastoreService.update() missing 1
required positional argument: 'data', which aborted the whole function —
so the sibling datastore.delete on line 167 never ran and orphan rows
were left behind.
NAS-141883 / 26.0.0-RC.1 / Fix KMIP in-memory cache being wiped after every push (#19363)
zfs_keys.py:102 (and the same in pull) — {k: v for k, v in
store.zfs_keys.items() if k in existing_datasets} compares dataset names
against a list of dicts, so it always evaluates false and wipes the
in-memory cache after every push. That's why kmip_sync_pending stays
true after a successful push, which is what forces several tests to use
force_clear.
NAS-141884 / 26.0.0-RC.1 / Fix `kmip_connection` error handling (#19364)
PyKMIP re-raises the bare ConnectionRefusedError, which isn't in the
caught tuple.
NAS-141908 / 27.0.0-BETA.1 / add --keep-refs to --dump-api (#19383)
This is needed for the MCP feature since they're using the dump-api
command to generate typescript interfaces from our json schemas. Should
be no change in functionality, just an extra argument.
[lldb] Synthesize data symbols for plain C globals on WebAssembly (#211301)
The Wasm name section names functions but not data, so LLDB recovers
data symbols from the DWARF. It only did so for variables with a linkage
name, such as a C++ vtable, so a plain C global, which has only a
DW_AT_name, got no symbol and its address did not resolve back to a
name. Use the source name when there is no linkage name.