[SLP] Partially revert #224931 for alternate nodes
Do not pass scalar context to alternate node vector cost queries.
PR #224931 passes the scalar main/alternate op as the context instruction when
costing the vector ops of an alternate node. Those vector ops only feed the
lane-select shuffle, so use-based discounts derived from the scalar's users
do not apply. On AMDGPU this priced an [fmul | fadd] node's vector fmul as
fused (free) where the sole user of the scalar fmul is fadd/fsub, keeping
unprofitable subtrees vectorized. In a rocFFT kernel on gfx950 this raised
VGPR usage from 160 to 178 and caused a performance regression. Restore the
null context for these queries.
[libc][test] Fix death test timeouts and dead-code elimination in math tests. (#227966)
- In `ExecuteFunctionUnix.cpp`, call `prctl(PR_SET_DUMPABLE, 0)` in
child processes to prevent external core dump handlers (such as apport)
from intercepting expected crashes during death tests, eliminating 10s
poll timeouts under parallel lit runs.
- Close `pipe_fds[0]` properly in `invoke_in_subprocess` to avoid
leaking file descriptors.
- In math smoke test templates (`AddTest.h`, `SubTest.h`, `MulTest.h`,
`DivTest.h`), assign test function results to `[[maybe_unused]] volatile
OutType res` to prevent GCC from dead-code eliminating floating point
operations in `test_inexact_results` when FMA optimization is disabled.
Assisted-by: Gemini
[RISCV][P-ext] Combine repeated code. NFC (#228163)
The body of these 2 if statements are identical and the if conditions
are equivalent to checking if the VT is XLenVT.
[LoopCacheAnalysis] Guard against bit-width overflow in computeRefCost (#224427)
In `computeRefCost()`, the non-consecutive access path estimates the
cache cost by multiplying the trip counts across outer loop dimensions.
Each multiplication ends up calling `getExtendedType()` to obtain an
integer type twice as wide as the current one.
For a deeply-nested loop (such as the 20-dimensional array found in this
change), it is possible for the doubling to exceed `MAX_INT_BITS`, which
triggers the following assert in `IntegerType::get()`.
```
Assertion failed: NumBits <= MAX_INT_BITS && "bitwidth too large", file llvm-project/llvm/lib/IR/Type.cpp, line 340, static IntegerType *llvm::IntegerType::get(LLVMContext &, unsigned int)()
```
This change checks whether the current integer width already exceeds
`MAX_INT_BITS / 2`. If this is true, the doubled width would overflow,
so we return `CacheCostTy::getInvalid()` instead of asserting.
[libc][hdr] Add poll and socket overlay headers for GCC overlay builds. (#227961)
When building LLVM libc in overlay mode with gcc/g++, alias and macro
redirections in GNU libc headers (such as ppoll and socket functions)
cause conflict with libc header declarations.
Fixes in this PR:
- Add `poll_overlay.h` and `sys_socket_overlay.h` to wrap system headers
before libc macros and type declarations in overlay mode.
- Update proxy headers in `libc/hdr/` and `libc/hdr/types/`.
- Update CMake and Bazel build files accordingly.
Assisted-by: Gemini
[libc][cmake] Suppress -Wpsabi note on GCC and clean up resource-dir check. (#227968)
- Add `-Wno-psabi` to GCC compile options to suppress ABI change notes
for 80-bit long double unions.
- Pass `ERROR_QUIET` to clang-specific `--print-resource-dir` query in
`libc/CMakeLists.txt` so it does not output errors on GCC and MSVC.
Assisted-by: Gemini
vmd(8): fix mmio exit issue on old SVM machines
fix a problem where we didn't pass any instruction length to insn_decode
on some older opterons that don't have SVM decode assist.
ok dv
Reland "[llvm-objcopy] Handle SHF_ALLOC relocation sections in relocatable files" (#228654)
This relands #227204, reverted by #228572 due to a UBSan failure in
compress-sections.s:
```
ELFObject.h:887:35: runtime error: load of value 190, which is not a valid value for type 'const bool'
```
--compress-sections on a relocation section creates a CompressedSection
that incorrectly keeps OriginalType SHT_RELA, so
RelocationSection::classof cast it and read
RelocationSectionBase::Dynamic. Set its OriginalType to SHT_PROGBITS,
which also fixes a TODO in Object::removeSections
Original description:
llvm-objcopy treats every SHF_ALLOC relocation section as dynamic and
requires its sh_link to refer to .dynsym. Linux livepatch modules
[14 lines not shown]
audio/fasttracker2: Update to 2.25
Changes since 2.24:
v2.25 - 02.10.2026
* Further sinc interpolation improvements
* Re-added 3-point quadratic spline interpolation (why not)
* Small tweak to the tracker scope interpolation (in
quadratic/cubic/sinc mode)
[LLDB] Exclude exposed exe symbols from tests
Same as what we have for normal lldb installation. A executable may
creates a copy of a symbol if it links to the archive. Exclude archive
symbols out from the exe itself.
[flang] Add an example plugin exercising the HLFIR pipeline extension points
The HLFIR extension points, the pipeline config callback registry and fir-opt's
symbol export all exist to let an out-of-tree MLIR pass run while the HLFIR
intrinsic operations (hlfir.sum, hlfir.matmul, ...) are still present. None of
that was covered end to end, and nothing showed how to use it.
Add flang/examples/HLFIRPipelinePlugin, modelled on PrintFlangFunctionNames. It
contributes a pass that prints the HLFIR operations still present in the module,
tagged with the pipeline position it was inserted at, and exposes it through
both plugin entry points: a static initializer calling
fir::registerPassPipelineConfigCallback for the `flang -fc1 -load` path, and
mlirGetPassPluginInfo so fir-opt can load it with --load-pass-plugin.
Nothing is linked into the shared object; MLIR, FIR and flang symbols resolve
against the host tool, which is what export_executable_symbols_for_plugins on
flang and fir-opt provides.
Two tests use it. Examples/hlfir-pipeline-plugin.f90 covers -emit-fir and
[7 lines not shown]
[flang] Address review comments on the HLFIR pipeline example plugin
- Rename the pass to print-hlfir-ops: it prints every hlfir op, not only the
intrinsics.
- Drop the redundant option copy in the copy constructor; Pass::clone copies
option values.
- Tests: drop the no-plugin run, which could not fail, and at -O2 only check
that both extension points are reached rather than what
SimplifyHLFIRIntrinsics chose to expand.
Assisted-by: Claude Code (Opus 5.5)
NAS-144081 / 28.0.0-BETA.1 / Make zfs.resource the dataset API and shim pool.dataset over it (#19881)
## Problem
`zfs.resource` is meant to replace `pool.dataset`, but it could only
create, list and destroy: it had no way to change properties, rename and
promote were private, the choices, zvol blocksize, processes and
attachments methods lived only under `pool.dataset`, and none of its
mutating methods were audited or emitted events. The policy that makes a
dataset change safe (ACL coupling, the 80% reservation headroom check,
blocksize and recordsize rules, dedup licensing and tiering, the SMB
acltype guard, snapdev guards, LUN resyncs, attachment teardown on
delete) was implemented only inside `pool.dataset`, so the two write
paths could drift and retiring `pool.dataset` would have lost all of it.
Along the way a few existing bugs turned up: `pool.snapshot.rename`
failed on every call, `pool.snapshot.create/clone/hold/release` surfaced
raw tracebacks instead of validation errors, and the locked-path check
crashed on snapshot-backed zvol paths.
## Solution
[135 lines not shown]
[NFC][TSan] Remove redundant Context::report_mtx
Context::report_mtx was only ever acquired immediately alongside
ScopedErrorReportLock (in ScopedReport and BackgroundThread). Remove
report_mtx and MutexTypeReport and rely on ScopedErrorReportLock.
Assisted-by: Gemini
Pull Request: https://github.com/llvm/llvm-project/pull/228605
[orc-rt] Use the Error matchers in SimpleRemoteCAOverSocketTest (#228642)
Use the Error matchers introduced in 4c8a437d0487 to clean up error
checks in SimpleRemoteCAOverSocketTest.
[MLIR][arith] Fold or(a, or(a, b)) to or(a, b) (#228386)
`arith.andi` already folds `and(a, and(a, b))` to `and(a, b)`, but
`arith.ori` doesn't perform the equivalent fold, so using canonicalize
misses this opportunity.
Generalize the existing helper and use it for both ops.
Co-authored-by: Matthias Springer <me at m-sp.org>
[gn] port 82290a03b3cc a bit (CASPluginTest) (#228639)
Also disable llvm_enable_ondisk_cas for a bit until I can figure out how
to fix
dlopen(..../out/gn/lib/CASPluginTest.dylib, 0x0009):
symbol not found in flat namespace '__ZN4llvm4SHA15finalEv'
when running llvm/test/tools/llvm-cas lit tests. (The unit test passes.)
[flang] Add a MLIRToLLVMPassPipeline callbacks for plugins (#212195)
Expose the extension points of the HLFIR-to-FIR pass pipeline exposes extension points to plugins.
Follow-up to #212194
Assisted-by: Claude Code (Opus 5, Opus 5.5)