[docs] Enforce unambiguous toctree in llvm/docs
It seems like using a non-`hidden` `toctree` for page navigation is a
bit of a trap, in that every doc must have a single unique path through
the global toctree to the root doc, and it is very easy to end up with
multiple.
This patch tries to address the warnings (actually infos, hence why it
does not fail the build) in llvm/docs/, namely:
$ sphinx-build -b html -jauto llvm/docs/ /tmp/sphinx-out
checking consistency...
llvm/docs/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack.md: document is referenced in multiple toctrees: ['UserGuides', 'AMDGPUUsage'], selecting: UserGuides <- AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack/AMDGPUDwarfExtensionAllowLocationDescriptionOnTheDwarfExpressionStack
llvm/docs/AMDGPUDwarfExtensionsForHeterogeneousDebugging.rst: document is referenced in multiple toctrees: ['UserGuides', 'AMDGPUUsage'], selecting: UserGuides <- AMDGPUDwarfExtensionsForHeterogeneousDebugging
llvm/docs/CommandGuide/llvm-reduce.rst: document is referenced in multiple toctrees: ['CommandGuide/index', 'CommandGuide/index', 'Reference'], selecting: Reference <- CommandGuide/llvm-reduce
llvm/docs/GitHub.rst: document is referenced in multiple toctrees: ['GettingInvolved', 'UserGuides'], selecting: UserGuides <- GitHub
llvm/docs/GlobalISel/IRTranslator.rst: document is referenced in multiple toctrees: ['GlobalISel/index', 'GlobalISel/Pipeline'], selecting: GlobalISel/index <- GlobalISel/IRTranslator
llvm/docs/GlobalISel/InstructionSelect.rst: document is referenced in multiple toctrees: ['GlobalISel/index', 'GlobalISel/Pipeline'], selecting: GlobalISel/index <- GlobalISel/InstructionSelect
llvm/docs/GlobalISel/Legalizer.rst: document is referenced in multiple toctrees: ['GlobalISel/index', 'GlobalISel/Pipeline'], selecting: GlobalISel/index <- GlobalISel/Legalizer
[35 lines not shown]
[docs] Create utils/docs
llvm-project is home to many sphinx documentation sites, each with
configuration quirks and bespoke extensions.
The sphinx config model makes sharing code somewhat difficult. There
are options like sphinx-multiproject, but some of our docs builds are
out of the source tree while some are done out of the binary tree, so
the multiproject configuration itself would need to be generated. It
also would impose more uniformity around extensions than required.
This change instead creates a python package at utils/docs/llvm_sphinx
and makes it available to all sphinx-build processes via PYTHONPATH.
Each conf.py does not modify its own sys.path because not all builds are
out of the source tree, so there isn't a stable relative path to use to
refer to the utils/docs/ directory.
Type checking via pyright in new package is pinned to being python 3.8
compatible.
[29 lines not shown]
[docs] Add BOLTAArch64OptimizationStatus to toctree
Building docs-bolt-html fails with:
Warning, treated as error:
/home/slinder1/llvm-project/scratch/bolt/docs/BOLTAArch64OptimizationStatus.rst:document isn't included in any toctree
Just add the orphan document to the toctree in the index to silence
this. If there is a better parent it can be moved somewhere else in the
tree.
Change-Id: I1d26d96d5485d97d29231da89f8c8408b375c41f
Bump minimum required sphinx Python to 3.8
There seems to be de-facto use of at least 3.6 in docs, namely:
* Use of pathlib (3.4) in various places
* Format f-strings (3.6) and used in clang/docs/ghlinks.py
I don't see a strong reason to maintain the divide in minimum version
between test/docs, especially considering the "FIXME" indicating
the 3.0 lower bound was just a guess to begin with.
Change-Id: I11e00295ae0a13ec0f1c5cefbb2fdd2db272b152
clang/AMDGPU: Require 16-bit-insts for half typed image builtins
Typed image load/store operations with 16-bit elements require d16
support which was introduced in gfx8. They were previously gated only
on image-insts, so they were wrongly accepted on targets that have
images but lack 16-bit support (e.g. gfx700), where the backend then
fails to select.
Co-Authored-By: Claude (Opus 4.8) <noreply at anthropic.com>
clang/AMDGPU: Require 16-bit-insts for half typed buffer format builtins
Typed buffer format load/store operations with 16-bit elements require
d16 support which was introduced in gfx8. These builtins previously had
no required features at all, so they were accepted (and then crashed the
backend) on targets without 16-bit support.
Diagnose these in Sema, parallel to the image builtins. The manual
verification here suprised me. The automatic builtin feature verification
is enforced in codegen, which seems like a layering violation which
should be fixed.
Co-Authored-By: Claude (Opus 4.8) <noreply at anthropic.com>
[CIR] Lower elementwise saturating add/sub builtins (#203112)
`__builtin_elementwise_add_sat` and `__builtin_elementwise_sub_sat` were
still in the `errorBuiltinNYI` batch in `emitBuiltinExpr`, so any use
hit "unimplemented builtin call". That blocks C++26
`std::add_sat`/`std::sub_sat` (libc++
`<__numeric/saturation_arithmetic.h>`), which lower directly onto these
builtins.
This lowers them the way classic CodeGen does in `CGBuiltin.cpp`: select
the signed or unsigned saturating intrinsic from the operand's element
type (`sadd.sat`/`uadd.sat` for add, `ssub.sat`/`usub.sat` for sub).
Test coverage in `builtins-elementwise.c` exercises signed and unsigned,
scalar and vector, at i32 and i16 widths, checking the CIR
`cir.call_llvm_intrinsic` and the lowered `@llvm.{s,u}{add,sub}.sat`
calls on both the CIR and classic `-emit-llvm` paths.
Convert SSH plugin to typesafe pattern
Migrates the `ssh` plugin from the legacy dict-based `SystemServiceService` to the typesafe pattern, matching the `ups`/`ftp` shape.
Split the single `ssh.py` into a package: a lean `SSHService` (`generic = True`) in `__init__.py` delegating to `SSHServicePart` in `config.py`, with the host-key helpers moved to plain functions in `keys.py`. `config`/`update` now return the `SSHEntry` Pydantic model in-process, so every internal consumer was updated: the `sshd_config` mako and the SSH `config.py` renderer `.model_dump()` the model at the top, and the in-process callers (`keychain`, `failover` nftables, the `service_` start/reload hooks, and the plugin's own `setup()`) were switched from string `middleware.call('ssh.…')` to typed `call2`/`call_sync2`. The only remaining string call is `etc.py`'s dynamic `CtxMethod` dispatch, which has no static method handle. Registered the service in `main.py` and added the package to the mypy workflow.
libarchive: Fix cpio(1) tests.
1. When dropping privileges, setegid to the _gid_ of user `nobody',
not to the _uid_ of user `nobody'.
2. In the test, grant that user access to the atf test working
directory so it can execute the `bsdcpio' symlink we create in
order to get argv[0] set appropriately for the error messages that
the test checks for.
PR bin/60353: cpio(1): tests are failing to run at all
cd9660: Add support for birth times
Both the Extended Attribute Record in the base ISO-9660 standard and
the RockRidge timestamp extension support a file creation timestamp.
Use this to populate the birthtime if present.
Reviewed by: markj (earlier version)
Differential Revision: https://reviews.freebsd.org/D57526
pciconf: Minor cleanups in the config register methods
This is mostly to provide cleaner code for future changes to copy
from.
- Use NULL instead of casting 0 to pointer types.
- Inline readone() in the sole caller now that it is just a single line.
- Use a helper variable for the count of items on each line of output
in readit().
- Fix the double space in the middle of byte output to only trigger
for width 1. For other widths it would output spurious spaces at
the end of the line which doesn't really hurt, but is buggy
nonetheless.
- Avoid using implicit booleans by explicitly comparing integer
expressions against zero.
[4 lines not shown]
cd9660: Adjust parsing of timestamps in the extended atttributes record
The extended attribute record includes four different timestamps: file
creation, file modification, file expiration, and file effective date.
Only the first two are meaningful for stat(2). The latter two (if
handled) would presumably affect if a file is visible for not.
Previously, the logic here was a bit contorted and made use of the
effective time. It also seemed to treat the creation time as a change
time timestamp.
Instead, simplify the logic such that the modification time is set to
either the modification time (if present), or the creation time. The
access and change times are then set to the modification time.
NB: This is not used if RockRidge extensions are present, and makefs
does not generate the extended attributes record.
Differential Revision: https://reviews.freebsd.org/D57748
failover: confirm pools exported before releasing fencing
On demotion the old code exported pools best-effort, skipped any
pool reading OFFLINE, then stopped fenced. There are theoretically
some extreme edge cases in which the API can report a pool as
OFFLINE resulting in fencing being released when it maybe
shouldn't be (potentially a fail-open scenarion).
Fail closed: after the export attempt, re-check via
zfs.pool.query_imported_fast (a lockless read keyed on the pool's
presence in /proc/spl/kstat/zfs, so it cannot hang on a wedged pool)
and self-fence if any data pool is still imported, the export is
still running, or the state is indeterminate.
Convert cloud_backup plugin to the typesafe pattern
This commit adds changes to convert the cloud_backup plugin to the typesafe service/part pattern, so query and get_instance return Pydantic models, public methods use @api_method(check_annotations=True), and same-process calls go through call2/call_sync2.
The shared CloudTaskServiceMixin is left untyped since cloud_sync still depends on it, with a single sibling-safe edit to its zvol validation path. All in-process consumers were updated for model access: the cloud_sync credential delete check, the cron.d mako, and the path-resolution migration. Since the password is a Secret field, the create/update and restic paths dump with expose_secrets so an unchanged password isn't written back as the redaction string.
Remove IPv6 source routing from output path.
Routing header type 0 has been deprecated by RFC 5095 and we do not
support any other type. While OpenBSD blocks routing header in pf
and during the input path, IPv6 output still allowed the user to
generate them.
Remove the code to set IPV6_RTHDR with setsockopt(2) and return
"Protocol not available" error instead. Also delete the code in
ip6_output() to insert the routing header.
Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from
Tsinghua University using the GLM model from Z.ai.
reported that a regular user could attach deprecated routing header.
OK claudio@ florian@
NAS-141505 / 27.0.0-BETA.1 / Convert support plugin to typesafe pattern (#19175)
## Context
The support plugin was an old-style dict-based `ConfigService`. This
converts it to the typesafe pattern: a lean
`GenericConfigService[SupportEntry]` service class delegating to a
`ConfigServicePart`, with `generic = True`, `check_annotations=True` on
every public method, and typed `call2` for same-process calls.
## Solution
- **Package split**: `plugins/support.py` becomes `plugins/support/`
with `__init__.py` (lean service), `config.py` (`SupportModel` +
`SupportConfigServicePart` holding `do_update`/`validate`), and
`execute.py` (the `post` helper plus the
`similar_issues`/`new_ticket`/`attach_ticket` logic as
`ServiceContext`-typed functions).
- **API models**: decoupled `SupportAttachTicketArgs` from
`@single_argument_args` into an explicit `SupportAttachTicket` inner
model plus a plain wrapper (wire shape unchanged) so the method param
[16 lines not shown]
[X86] madd.ll - add additional tests for matchPMADDWD folds that fail with larger source types (#205362)
matchPMADDWD handles sext/shl cases as well which don't fold either on SSE/AVX512 targets
[libc++][ranges] Backport P2711R1: Making multi-param constructors of views explicit (#190513)
As discussed in https://gcc.gnu.org/PR114298 - GCC and MSVC STL
implemented P2711R1 as a DR. This PR does the same for libc++.
Co-authored-by: A. Jiang <de34 at live.cn>
Use ffs and slots &= slots - 1 to walk over the slots in a way to only
look at matches. Kills another branch in the hot path and reduces the
loop form 7 to the number of hits (which is close to 1).
On systems without native ffs instruction this can be a tiny bit slower
but modern systems have native ffs and there the speedup can be noticable.
Even systems without ffs benefit on lookup misses since the loop is skipped.
Based on a diff from Rango (kombucha at mm.st)
OK tb@
[docs] Fix typo in Docker.rst (#205346)
Small typo fix in the Docker documentation: Debian8 -> Debian12.
Signed-off-by: Felipe Novais <contact at felipenovais.com>
Merge tag 'platform-drivers-x86-v7.2-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver updates from Ilpo Järvinen:
- amd/hfi: Add support for dynamic ranking tables (version 3)
- amd/pmc:
- Add PMC driver support for AMD 1Ah M80H SoC
- Delay suspend for some Lenovo Laptops to avoid keyboard and lid
switch problems after s2idle
- arm64: qcom-hamoa-ec: Add Hamoa/Purwa/Glymur EC driver
- asus-armoury: add support for G614PR, GA402NJ, GA403UM, and FX608JPR
- asus-wmi: add keystone dongle support
- dell-dw5826e: Add reset driver for DW5826e
[64 lines not shown]