[libc++] Strengthen optional value constructor noexcept
The standard does not require `optional<T>(U&&)` to be potentially throwing; it simply does not specify noexcept for the primary `optional<T>` converting constructor. Standard library implementations are permitted [[res.on.exception.handling]/5](https://eel.is/c++draft/res.on.exception.handling#5) to strengthen exception specifications for non-virtual library functions, as long as the strengthened specification is correct.
GNU libstdc++ already does this:
https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/std/optional#L911-L913https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/std/optional#L962-L974
The existing libc++ code only added noexcept for the C++26 `optional<T&>` case, guarded by `is_lvalue_reference_v<_Tp>`. It is safe to remove that gate and use the general condition instead:
```
noexcept(is_nothrow_constructible_v<_Tp, _Up>)
```
For `optional<T&>`, this still becomes the intended reference-construction check. For ordinary `optional<T>`, it correctly reflects whether constructing `T` from `U` can throw. The constructor only forwards into the contained object construction and updates optional bookkeeping, so if `T` is nothrow-constructible from `U`, the optional construction is also nothrow.
Relax special class vdev consistency validation
This commit relaxes the consistency checks for vdev types used in
special vdevs. Doing a mix-and-match topology is considered to be a
deviation generally from best practice, but as long as the
administrator is careful to make sure they don't spread it too wide
(for example, mirror + 5-wide RAIDZ1) then the impact should be
relatively minor. Allowing this is generally a loaded foot-gun for
administrators since the topology changes cannot be undone once they
are committed; and if they run into performance issues related to
the imbalanced topology then they may have little recourse to fix the
issues. It is generally best for users to follow best practices as
defined by the support / engineering teams.
[AMDGPU] Introduce ABI occupancy for object linking
This PR introduces ABI occupancy as the contract used to compile functions under
object linking. The default is derived from the occupancy needed for a 1024
workitem workgroup, can be overridden with `-amdgpu-abi-waves-per-eu`, and can
be overridden per function by `amdgpu-flat-work-group-size` or tightened by an
accepted `amdgpu-waves-per-eu` hint.
The backend emits the selected occupancy in `.amdgpu.info` and uses it to
enforce the object linking register budget.
AMDGPU: Teach disassembler to produce target id directives
Inspect the binary's e_flags to reproduce the .amdgcn_target directive.
This is a step towards round-trip disassembly without depending
on command line state specifying the subtarget. I wasn't sure
where to put the emission to ensure it is always emitted. I
also do not know why it's OK to just write to outs(), but that's
what the other directives here were doing.
Co-Authored-By: Claude Opus 4.6 <noreply at anthropic.com>
[mlir] mlir-opt-repl: switch MCP transport to JSON-lines
Claude Code's MCP client uses JSON-lines (one JSON object per line on
stdio) rather than the older LSP-style Content-Length header framing.
Switch send/read_message to match: send writes JSON + newline, read
does readline + json.loads. Update protocolVersion to 2025-11-25.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply at anthropic.com>
[lldb][docs] Some fixes for lldbgdbremote.md. (#200079)
This has the following fixes:
- fix a typo: `qAttachOrWaitSupported` -> `qVAttachOrWaitSupported`
- document that a response to `qHostInfo` can contain an `arch`
key-value pair
- clarify that the value of the `triple` key in some cases is a hex
encoded string.
---------
Co-authored-by: David Spickett <david.spickett at arm.com>
Co-authored-by: Jonas Devlieghere <jonas at devlieghere.com>
[AMDGPU] Guard against opsel selection in V_PK_*64
These instructions do not have OPSEL or ABS so bail on selection.
This does not affect any tests now because v2f64 is not legal for
BUILD_VECTOR and alike, but if it is legal it will silently
produce incorrect code. GlobalISel already has this guard.
[flang][OpenMP][NFC] Extract enclosing-construct trait collection helper (#203924)
Move the inline MLIR-parent walk in genMetadirective that maps enclosing
OpenMP operations to construct trait properties into a reusable
collectEnclosingConstructTraits helper. No functional change to
metadirective matching; this prepares the helper for reuse by DECLARE
VARIANT call-site resolution.
[flang][acc] Add PointerLikeType API for MemRef type conversion (#203965)
This PR adds a PointerLikeType API named `getAsMemRefType` whose intent
is to establish equivalent MemRefType - the first use case for this will
be privatization and shared memory handling to be done in a
dialect-independent way. The Flang implementation uses
FIRToMemRefTypeConverter to do so.
[LV] Carry bypass value as second operand of ResumeForEpilogue (NFC) (#203976)
Add a second operand to the ResumeForEpilogue VPInstruction holding the
bypass value for the corresponding phi
Use the new operand to drive the AnyOf/FindIV resume adjustment instead
of looking through IR.
[CIR] Lower vector integer/float to bool casts (#203397)
An ext_vector integer-to-bool or float-to-bool conversion (e.g.
`__builtin_convertvector` from `int4` to `bool4`) crashed clang in
`emitScalarCast` (`CIRGenExprScalar.cpp`). `emitScalarConversion` only
special-cases scalar bool (`dstType->isBooleanType()`), so a
vector-of-bool destination fell through to `emitScalarCast`, whose
integer/float source branches had no bool-element destination case and
hit `llvm_unreachable`.
The fix adds the `int_to_bool`/`float_to_bool` cast kinds for a bool
element destination, mirroring the bool-source branch. It also builds
the LowerToLLVM zero operand via `getZeroAttr` so it splats for vectors,
and compares element widths in `bool_to_int` so the round trip lowers
for vectors too. The conversion now lowers to an elementwise `icmp ne` /
`fcmp une` against zero, matching classic codegen.
libcxx's vectorized comparison helpers (e.g. `flat_map`/`flat_multimap`
construction, `ranges::starts_with`) reach this path; this clears the
crash, though those tests still hit unrelated NYIs.