[docs] Add a shared intersphinx inventory for LLVM projects
Define the documentation sites of the LLVM subprojects in one place so each
project's Sphinx configuration can resolve cross-project links through
intersphinx instead of absolute URLs. The mapping is not used by any project
yet; follow-up changes adopt it. Document the `inv:` link syntax in the Sphinx
quickstart so authors know how to write these links.
Part of #214861
LLM-aided
[docs] Use intersphinx for Clang cross-project links
Configure the Clang documentation with the external project inventories it
references and replace absolute cross-project documentation URLs with
validated intersphinx document and reference roles.
Part of #214861
LLM-aided
[docs] Use intersphinx for LLVM cross-project links
Configure the LLVM documentation with the external project inventories it
references and replace absolute cross-project documentation URLs with
validated intersphinx document and reference roles.
Part of #214861
LLM-aided
camdd: Fix the worker startup race
The reader can hand off its first buffer before the writer sets
CAMDD_DEV_FLAG_ACTIVE. camdd_queue_peer_buf() then mistakes the writer
for an exited peer and releases the buffer instead of queueing it. This
can make a copy fail with bytes read but nothing written, without an
error message.
Mark both devices active before creating either worker, leaving the
workers to clear the flag on exit. The work queues and EVFILT_USER
events are already initialized, so queued buffers and their notification
can wait for the writer to start without a startup barrier.
Treat pthread_create() failure as fatal. Returning through the normal
cleanup path can free devices that an already-started worker is still
using, and an unstarted peer cannot consume any queued buffers.
Reviewed by: imp, markj, ken
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D61277
[KnownFPClass][NFC] Remove DenormalMode default arguments (#237074)
Removes the `DenormalMode` default arguments from `KnownFPClass`
functions. Currently, all in-tree callers explicitly pass the
`DenormalMode` anyways.
Motivated by ongoing issues with the handling of the `NSZ` flag. The
current proposal for correctly handling the `NSZ` flag is to handle it
the same way that input denormal modes are handled via the
`applyInputDenormalMode` helper. This would require adding an `NSZ`
parameter to almost every `KnownFPClass` function. However, one pattern
I've noticed is that applying the input/output denormal mode inside or
outside of the `KnownFPClass` function makes no difference. So I think
the better way forward would be to move `DenormalMode` handling outside
of the `KnownFPClass` functions completely, and have all `KnownFPClass`
functions assume the IEEE input/output denormal mode. The main exception
to this is `KnownFPClass::fmuladd` since it applies input/output
denormal flushing as an intermediate step.
[6 lines not shown]
Don't bother setting -fno-omit-frame-pointer if PROF is set; the in-tree
GCC now does the right thing with instrumented function frames regardless
of command line options.
More profiling fixes:
- Define NO_PROFILE_COUNTERS=1 and don't emit a profile counter references
in FUNCTION_PROFILER() -- our __mcount() doesn't actually need/use them.
- In SUBTARGET_OVERRIDE_OPTIONS, set flag_omit_frame_pointer=false
if profile_flag is set because our m68k __mcount() relies on standard
m68k stack frames. XXX This is probably better achieved with
{,SUB}TARGET_FRAME_POINTER_REQUIRED, but the m68k back-end doesn't
use that anywhere, so it's a much more invasive change than this.
camcontrol: Add a feature subcommand for NVMe Get/Set Features
Add a feature subcommand for the NVMe Get Features and Set Features
commands:
camcontrol feature ndaX -a <get|set> -f feature [-d data]
[-s num] [-U]
There is no transport-specific prefix in the name: SCSI has no
feature command (the closest equivalents are mode pages), and the
ATA SET FEATURES subcommands are already exposed through dedicated
camcontrol subcommands (apm, aam, epc and the power commands), so
the name is unclaimed. The subcommand returns an error for
non-NVMe devices.
Currently, only the hostid feature is fully implemented. The
hostid value for set is specified with -d as a UUID or an integer
in decimal, hex, or octal, and -U outputs the hostid as a UUID on
get.
[36 lines not shown]
camcontrol: Support NVMe namespace formatting via the format subcommand
Support formatting NVMe namespaces through the existing format
subcommand. The format subcommand now dispatches on the device
protocol, in the same way the identify and persist subcommands do,
and issues the NVMe FORMAT NVM command for NVMe devices.
The SCSI syntax and behavior are unchanged. The NVMe-specific
options are -e (secure erase setting), -G (format all namespaces),
-f (LBA format), -l (protection information location), -m (metadata
setting) and -p (protection information type). The -q and -y options
work for both protocols; NVMe formats gain the same confirmation
question that SCSI formats have always had. The -r and -w options
are SCSI only; -r returns an error for NVMe devices and -w has no
effect, since the NVMe format command does not complete until the
format is finished.
The default timeout for NVMe is 30 seconds for a cryptographic erase
and 30 minutes otherwise; the generic -t option overrides it.
[23 lines not shown]
camcontrol: Add support for NVMe namespace Identify
Add a -N argument to camcontrol identify. This will fetch and
display namespace Identify data for NVMe drives, using
nvme_print_namespace() from nvmecontrol(8).
This gets the namespace Identify data via XPT_DEV_ADVINFO (i.e.
data cached in the kernel) like the standard NVMe identify command
does, and so works even on NVMe devices that do not support NVMe
Namespace Management.
sbin/camcontrol/camcontrol.c:
Add a -N argument to camcontrol identify.
Rename nvme_get_cdata() to nvme_get_data(), and give it the
ability to fetch controller or namespace Identify data.
While here, improve its error reporting with
cam_error_print(), and only look at the CAM status bits of
the returned CCB.
[22 lines not shown]
camcontrol: Support NVMe reservations via the persist subcommand
The NVMe reservation model is closely patterned after SCSI Persistent
Reservations, so support NVMe devices through the existing persist
subcommand rather than adding a transport-specific subcommand. The
persist subcommand now dispatches on the device protocol, in the same
way the identify subcommand does.
The SCSI syntax is unchanged. For NVMe devices, the -i modes all map
to the Reservation Report command (read_full_status requests the
extended data structure, which contains 128-bit Host Identifiers), and
the -o service actions map to the corresponding NVMe reservation
operations: register, register_ignore, reserve, preempt,
preempt_abort, release and clear, plus two NVMe-only actions,
unregister and replace. The reservation type names for -T are shared
between SCSI and NVMe. A new -c option gives explicit control over
the NVMe Persist Through Power Loss State; -p is equivalent to
-c enable. SCSI-only options return an error for NVMe devices.
[32 lines not shown]
cam: Add NVMe reservation, format and features CCB building functions
Add NVMe CCB (union ccb / struct ccb_nvmeio) building functions for
the four NVMe reservation opcodes, Format NVM, and Get Features /
Set Features. These use the nvme_command building blocks added to
sys/dev/nvme/nvme.h, and are used by the new camcontrol(8) nvres,
nvformat and nvfeature subcommands that will be added separately.
sys/cam/nvme/nvme_all.c:
Add NVMe CCB building functions for the four NVMe reservation
opcodes: nvme_resv_report(), nvme_resv_register(),
nvme_resv_acquire() and nvme_resv_release(). Data direction
is set internally (CAM_DIR_IN or CAM_DIR_OUT as appropriate),
so no flags parameter is needed.
Add a new nvme_format() CCB building function.
Add nvme_get_feature() and nvme_set_feature() CCB building
functions, along with nvme_get_feature_hostid() and
[16 lines not shown]
nvme: Add reservation, format and features command building support
Add command (struct nvme_command) building functions for the four
NVMe reservation opcodes (Report, Register, Acquire and Release),
Format NVM, and Get Features / Set Features, along with the
enumerations and data structures that go with them. These are
shared between the kernel and userland, and are the underpinnings
for new camcontrol(8) subcommands (nvres, nvformat, nvfeature) that
will be added separately.
The reservation type names are intentionally similar to the SCSI
names for the same reservation types.
sys/dev/nvme/nvme.h:
Add NVMe command building functions for the four NVMe
reservation opcodes: nvme_ns_resv_report_cmd(),
nvme_ns_resv_register_cmd(), nvme_ns_resv_acquire_cmd() and
nvme_ns_resv_release_cmd().
[68 lines not shown]
nvmecontrol: Factor out namespace Identify printing
Move print_namespace() from identify.c to identify_ext.c and rename
it to nvme_print_namespace(), to match nvme_print_controller().
This allows other consumers (notably camcontrol(8)) to print NVMe
namespace Identify data.
No functional changes intended.
sbin/nvmecontrol/identify.c:
Remove print_namespace(), and call nvme_print_namespace()
instead.
sbin/nvmecontrol/identify_ext.c:
Add nvme_print_namespace(), moved here from identify.c.
sbin/nvmecontrol/nvmecontrol.h:
Remove the print_namespace() prototype.
[12 lines not shown]
LoongArch: Remove clearKillFlags calls on virtual registers (#239804)
Kill flags are no longer permitted on virtual registers, so clearing
them is a no-op. Remove the calls where the register can only be
virtual.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[docs] Use intersphinx for LLVM cross-project links
Configure the LLVM documentation with the external project inventories it
references and replace absolute cross-project documentation URLs with
validated intersphinx document and reference roles.
Part of #214861
LLM-aided
[docs] Add a shared intersphinx inventory for LLVM projects
Define the documentation sites of the LLVM subprojects in one place so each
project's Sphinx configuration can resolve cross-project links through
intersphinx instead of absolute URLs. The mapping is not used by any project
yet; follow-up changes adopt it.
Part of #214861
LLM-aided
[docs] Use intersphinx for Clang cross-project links
Configure the Clang documentation with the external project inventories it
references and replace absolute cross-project documentation URLs with
validated intersphinx document and reference roles.
Part of #214861
LLM-aided
[SystemZ][z/OS] Support naked functions as XPLINK stubs
A function with the `naked` attribute has no prologue or epilogue. On
z/OS XPLINK it maps to a stub function, which has a stub entry marker
instead of the normal entry point marker and has no PPA1.
AsmPrinter:
* For naked functions, emitFunctionEntryLabel() no longer calls
calculatePPA1() and no longer emits the 16-byte entry point marker.
It emits an 8-byte stub marker (eyecatcher 0x00C300C500C500, mark type
C'4'), preceded by 8 bytes of zero padding. The padding keeps the
entry
point at function start + 16, the same offset as for a normal
function.
* emitFunctionBodyEnd() returns early for naked functions. Otherwise it
would use DeferredPPA1.back(), which is the previous function's entry
or an empty vector.
ISel:
[18 lines not shown]
[AMDGPU] Remove write-only RegIdx in ANDMaskResult (NFC) (#239808)
The last read of ANDMaskResult::RegIdx in SIFoldOperands.cpp was removed
on November 6, 2026 in commit 54c4c971aaba65906dc9036e46104e75220e8cbc.
Assisted-by: Antigravity
[CIR] Add support for direct with align in calling convention lowering (#238929)
This change adds the infrastructure for handling arguments that are
classified as `Direct` with a required alignment. These arguments are
passed unmodified but required an `alignstack` attribute. There are no
cases where this is needed for x86, so these changes can only be tested
via unit tests. This support will be needed when AAPCS targets are
supported.
See clang/test/CodeGen/AArch64/args-hfa.c for an example of this
classification in classic codegen.
Assisted-by: Cursor / various models
[lldb] Add LanguageRuntime::EvaluateEntryValue (NFC) (#239813)
DW_OP_entry_value(reg) is the value reg had on entry to the function.
LLDB looks it up in the call site parameters of the caller, but a
language runtime may know it without them. Swift async functions, for
example, receive their async context in a register, and the Swift
runtime's unwind plan makes that context the CFA of the frame. The frame
above an async function in the backtrace is its continuation, not its
caller, so there are no call site parameters to find.
This patch adds a LanguageRuntime hook that DWARFExpression calls before
it searches the caller. The runtime may also consume operations after
the DW_OP_entry_value and evaluate them together with it, when it knows
their combined result but not the entry value alone.
Assisted-by: Claude
[RISCV][veclib] Remove non-existent Sleef_ilogbfx_rvvm2 and Sleef_ldexpfx_rvvm2 entries (#238910)
When compiling for RISC-V with `-vector-library=sleefgnuabi`, LLVM maps
`ilogbf` and `ldexpf` to `Sleef_ilogbfx_rvvm2` and
`Sleef_ldexpfx_rvvm2`.
However, SLEEF does not implement single-precision (`f32`) versions for
`ilogb` and `ldexp` for any architecture. Only the double-precision
`f64` functions exist. Because of this, programs that vectorize these
functions fail to link due to missing symbols.
This patch removes both invalid entries from `VecFuncs.def` and
`RuntimeLibcalls.td` and updates the tests. The 64-bit entries
(`Sleef_ilogbdx_rvvm2` and `Sleef_ldexpdx_rvvm2`) are valid and are kept
intact.
Fixes #235694.
[WebAssembly] Fix comments about _Unwind_GetWasmLPadContext (#239441)
After #222747, code generated by WasmEHPrepare does not access
`__wasm_lpad_context` directly and use `_Unwind_GetWasmLPadContext`, but
it was not reflected in the code comments.