[Support][Cache] Make `pruneCache` return an `Expected`
When `sys::fs::disk_space` would fail in during a call to `pruneCache`,
it would report a `fatal_error`. However, a failure to prune doesn't
mean the caller should fail catastrophically.
Downstream, we use LLVM's cache in the OpenCL runtime. A failure to prune
the cache can be safely ignored without stopping the user's application.
[clang] Implement -fstrict-bool (#160790)
This PR implements the [-fstrict-bool
RFC](https://discourse.llvm.org/t/defining-what-happens-when-a-bool-isn-t-0-or-1/86778/).
``bool`` values are stored as i8 in memory, and it is undefined behavior
for a ``bool`` value to be any value other than 0 or 1. Clang exploits
this with range metadata: ``bool`` load instructions at any optimization
level above -O0 are assumed to only have their lowest bit set. This can
create memory safety problems when other bits are set, for instance
through ``memcpy``.
This change allows users to configure this behavior in three ways:
* ``-fstrict-bool`` represents the status quo; range metadata is added
at levels above -O0 and allows the compiler to assume in-memory ``bool``
values are always either 0 or 1.
* ``-fno-strict-bool[={truncate|nonzero}]`` disables range metadata on
``bool`` loaded values and offers two ways to interpret the loaded
[7 lines not shown]
[DAG] computeKnownFPClass - add ISD::EXTRACT_VECTOR_ELT handling (#190307)
This PR implements `ISD::EXTRACT_VECTOR_ELT` in
`SelectionDAG::computeKnownFPClass` to propagate floating-point class
information from vector sources to extracted scalar elements.
Additionally, added RISC-V test coverage for `ISD::EXTRACT_VECTOR_ELT`.
Fixes #189585
NAS-140748 / 26.0.0-BETA.2 / disk_resize: increase NVMe delete-ns timeout and accept flexible device args (by darkfiberiru) (#18782)
## Summary
- Replace `nvme delete-ns` with `nvme admin-passthru` using a 21-minute
timeout to handle drives where namespace deletion can exceed the default
60s kernel admin timeout (nvme-cli's `-t` flag has a bug where
`delete-ns` silently ignores it)
- Accept `/dev/` paths and bare NVMe controller names (e.g. `nvme3`) in
addition to namespace devices, resolving to the single namespace
automatically
## Test plan
- [x] Run `disk_resize` on NVMe drive with data written to namespace,
verify delete-ns completes without controller reset
- [x] Run `disk_resize nvme3` (controller name), verify it resolves to
namespace and completes
- [x] Run `disk_resize /dev/nvme3n1` (absolute path), verify it strips
path and completes
- [x] Run `disk_resize` on controller with multiple namespaces, verify
[11 lines not shown]
lang/gnat1?: fix build with GNU strip
After D55509 $STRIP_CMD has been set to GNU strip for these ports, and in some
cases this breaks, because GNU strip will refuse to strip non-writable files,
while LLVM strip is happy to (attempt to) strip them.
PR: 294657
Reported by: kib at FreeBSD.org
Reviewed by: kib at FreeBSD.org
Phabricator: D55509
MFC after: 8 days
NAS-140748 / disk_resize: increase NVMe delete-ns timeout and accept flexible device args (#18778)
## Summary
- Replace `nvme delete-ns` with `nvme admin-passthru` using a 21-minute
timeout to handle drives where namespace deletion can exceed the default
60s kernel admin timeout (nvme-cli's `-t` flag has a bug where
`delete-ns` silently ignores it)
- Accept `/dev/` paths and bare NVMe controller names (e.g. `nvme3`) in
addition to namespace devices, resolving to the single namespace
automatically
## Test plan
- [x] Run `disk_resize` on NVMe drive with data written to namespace,
verify delete-ns completes without controller reset
- [x] Run `disk_resize nvme3` (controller name), verify it resolves to
namespace and completes
- [x] Run `disk_resize /dev/nvme3n1` (absolute path), verify it strips
path and completes
- [x] Run `disk_resize` on controller with multiple namespaces, verify
[8 lines not shown]
[debugserver][NFCI] Factor out logic handling breakpoint packets (#192912)
This creates a helper function that can be shared with the upcoming
MultiBreakpoint packet.
It is largely NFC with one logging exception: where we were previously
sending an "ILL_FORMED" error, we would identify the file/line in the
location where the error was emitted. This has been lost, however the
error messages are still unique enough that the line can be recovered
from the error message, and this is a principle we've been trying to
follow.
There was also a comment about gdb and refcounting of breakpoints. Such
comment was removed as it did not seem applicable to any line of code.
[clang-tidy][readability-identifier-length] Add a line count threshold (without std::transform_reduce) (#193276)
This PR is a new attempt at implementing the feature described in
#185318 after the rollback of #185319.
[clang] Suppress glibc C11 extension warning in `c-index-test` (#193335)
`c-index-test.c` is still compiled with `-std=gnu89` on purpose. That acts
as a useful guard rail: it helps keep the file compatible with older C
dialects instead of silently picking up newer C features because Clang
defaults to a newer language mode.
Ubuntu 26.04 LTS updates glibc's `string.h` so `strchr`, `strrchr` and
`strstr` are routed through `_Generic`-based macros. When Clang compiles
`c-index-test.c` with `-std=gnu89` and `-pedantic`, that now triggers
`-Wc11-extensions` warnings even though the source itself is not using
C11 features.
Keep the gnu89 check in place and suppress this warning only for Clang
when building c-index-test.
Fixes #193356
[mlir][GPU] Refactor GPUOps lowering (#188905)
This change promotes `gpu.func` / `gpu.launch` metadata that was
previously carried as discardable attributes into proper inherent ODS
fields (`kernel`, `workgroup_attributions`), renames the block-argument
helpers to avoid clashing with generated getters, and routes `func.func`
and `gpu.func` lowering through a shared helper that maps discardable
`llvm.*` attributes into `llvm.func` properties.
Downstream producers (Flang CUDA device func transform, kernel
outlining, sparse GPU codegen, XeGPU) set kernels via `setKernel(true)`
instead of manually attaching `gpu.kernel`.
Fixes #185174
Assisted-by: CLion code completion, GPT 5.3 - Codex
[mlir][linalg] Fix crash when folding tensor.cast into unpack using static packed shape for inner tiles (#188000)
This change fixes #187975 and #188405, a crash in Linalg tensor-cast
folding for pack/unpack when tile sizes are dynamic or otherwise not
provably constant.
Previously, canonicalization could reach getNewMixedTileSizes and
unconditionally access `getConstantIntValue(tile).value()`. For dynamic
tile operands, that value can be absent, causing
`std::bad_optional_access/assert` aborts.
When folding `tensor.cast` into `linalg.unpack` (and the same helper is
used for linalg.pack), mixed inner tile sizes are updated from the
refined packed tensor type. Every static trailing packed dimension gets
a matching static tile attribute, replacing SSA tile values and
overwriting tile constants that disagreed with that type.
Dynamic packed dimensions still keep the original tile operands.
Assisted-by: CLion code completion