[ARM][ConstantIslands] Fix CloserWater heuristic to resolve convergence failure in large functions. (#245139)
Fix two bugs in the `CloserWater` heuristic in `findAvailableWater` that
cause
the ARM constant island pass to fail to converge for large functions
with many
constant pool entries, aborting with:
LLVM ERROR: Constant Island pass failed to converge!
This was observed during LTO linking of large translation units where
PGO-driven
inlining produces functions with thousands of basic blocks and over a
hundred
constant pool references. The constant island pass exceeds its
30-iteration
convergence limit due to a cascade effect: each CPE placement shifts
subsequent
block offsets, pushing one more entry out of range per iteration.
[37 lines not shown]
[CIR][NFC] Generate isBitIntType from an ODS constraint
Add CIR_AnyBitIntType and define CIR_IsNotBitIntPred as its negation, so the
positive and negative _BitInt checks share one predicate. ODS now generates
cir::isBitIntType, replacing the hand-written helper from #245456. Restore the
dyn_cast<IntType> sites that need the IntType itself, since the generated
function does not accept a null type.
Assisted-by: Claude Code (claude-sonnet-5-5).
Pull up following revision(s) (requested by hannken in ticket #1425):
sys/kern/vfs_wapbl.c: revision 1.118 (via patch)
The evaluation of resource shortage in wapbl_register_deallocation()
is incomplete as only "wl_dealloccnt" is checked. Replace this check with
the doflush check from wapbl_begin() testing for 75% instead 50% to
make sure the next wapbl_begin() will always flush.
It is still a mitigation, for a fix the file system must provide an
upper bound for every transaction to wapbl_begin().
PR kern/47146 user-triggerable crash in wapbl_register_deallocation (confi)
PR kern/60621 (panic: ufs_inactive: dirty filesystem?)
[Mips] Use the constrained compare mask directly on R6 (#246087)
On R6, a constrained FP compare is lowered to (and Mask, 1), where Mask
is the 0 or -1 result of cmp.cond.fmt. Selects, branches and sign
extensions can use Mask without the 'and' when ComputeNumSignBits shows
that it is 0 or -1, as they already do for non-strict compares. For
constrained compares this was not known, since STRICT_FPCmpR6 and
STRICT_FPCmpsR6 were not handled in ComputeNumSignBitsForTargetNode and
the low word of an f64 mask came from an EXTRACT_SUBREG. So they got an
extra 'andi', and the sign extensions a 'negu' as well.
Handle the strict compare nodes in ComputeNumSignBitsForTargetNode, and
take the low word of an f64 mask with ExtractElementF64, which it can
look through. The code is now the same as for non-strict compares.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
Pull up following revision(s) (requested by hannken in ticket #586):
sys/kern/vfs_wapbl.c: revision 1.118
The evaluation of resource shortage in wapbl_register_deallocation()
is incomplete as only "wl_dealloccnt" is checked. Replace this check with
the doflush check from wapbl_begin() testing for 75% instead 50% to
make sure the next wapbl_begin() will always flush.
It is still a mitigation, for a fix the file system must provide an
upper bound for every transaction to wapbl_begin().
PR kern/47146 user-triggerable crash in wapbl_register_deallocation (confi)
PR kern/60621 (panic: ufs_inactive: dirty filesystem?)
Pull up following revision(s) (requested by hannken in ticket #1424):
sys/ufs/ffs/ffs_snapshot.c: revision 1.158
Add UFS_WAPBL_UPDATE() after block allocations to group the
allocation and the inode update into the same transaction.
PR kern/60621 (panic: ufs_inactive: dirty filesystem?)
Pull up following revision(s) (requested by hannken in ticket #585):
sys/ufs/ffs/ffs_snapshot.c: revision 1.158
Add UFS_WAPBL_UPDATE() after block allocations to group the
allocation and the inode update into the same transaction.
PR kern/60621 (panic: ufs_inactive: dirty filesystem?)
devel/truc: Deprecate and set expiration date
The project is abandoned upstream, no longer developed.
Set expiration date to 2027-02-28, 3 months from now.
PR: 300510
MFH: 2026Q4
(cherry picked from commit c6743c0873f6f7233d19b33f6aef1fdcaf604b6c)
devel/truc: Deprecate and set expiration date
The project is abandoned upstream, no longer developed.
Set expiration date to 2027-02-28, 3 months from now.
PR: 300510
MFH: 2026Q4
Add new section to Building.md
Removed the now-ignored option from the bootstrap-build config example.
Created a new section dedicated to omptest and how to make it
installable.
[OpenMP][omptest] Do not install an ompTest that embeds LLVM's GoogleTest
The GTest-based ompTest embeds LLVM's vendored GoogleTest objects, but LLVM
installs no GoogleTest headers, and the installed OmptTesterGoogleTest.h
includes "gtest/gtest.h". Users of the installed package therefore compile
against whichever GoogleTest their system provides, which need not declare the
testing::internal API the library exports. That API carries no compatibility
promise -- MakeAndRegisterTestInfo() takes its test suite name as const char *
in the copy LLVM vendors and as std::string in later releases -- so the
mismatch surfaces as an undefined symbol when the user links, far from its
cause. The package config cannot express the requirement, because it is not a
version but the exact API generation vendored when the library was built.
Decline to install that configuration and say why. The standalone and
system-GoogleTest builds carry no vendored GoogleTest and remain installable.
Warn rather than error, for now. A build that asks for an installed ompTest
and gets a GoogleTest-based one is asking for something undeliverable, which
would justify a hard failure, but erroring immediately breaks every such build
[8 lines not shown]
[OpenMP][omptest] Add LIBOMPTEST_USE_SYSTEM_GTEST (#242312)
omptest can be built to use GoogleTest. For consumers that are only
inside the LLVM / runtimes build tree there is no problem right now
AFAIK
However, if an outside consumer wants to use omptest from an
installation, the problem is that LLVM vendors its own gTest headers and
those cannot be installed or are almost always unusable.
This change adds the possibility to not use he vendored ones but instead
search on the system for an installed gTest and rely on that instead.
This is a follow-up to the stack in
https://github.com/llvm/llvm-project/pull/237201
Assisted-by: Claude Opus 5 <noreply at anthropic.com>
IPv6: rc boot time improvements
If IPv6 is enabled we call rtsol on that interface so waiting in
rtsold is counterproductive; if one was to just use rtsold -F then
they are on their own for having the addresses usable during the
remaining startup time.
Rather than sleeping dad_count + 1 seconds we are now checking for
any tentative addresses on the interface and only then sleep
dad_count up-to 2 times. This should save us at least a dad_count
with the seconds with Optimistic DAD enabled (default) but there
are too many assumptions invovled anyway.
(RETRANS_TIMER in the kernel being 1000ms being one).
The reason why we need to sleep more than dad_count (1s default)
seems to be that first DAD for the link-local address clears and
only then solicited (or other global) addresses are handled.
Co-authored-by: Pouria Mousavizadeh Tehrani <pouria at FreeBSD.org>
[3 lines not shown]
[wasm] Swift async ABI p3: Lower llvm.swift.async.context.addr to local 0 (#236133)
(see https://github.com/swiftlang/swift/pull/93554)
This intrinsic describes the location of the async context.
[libFuzzer] Fix stale reduced seeds and a fork-mode crash
Seeds are loaded with MayDeleteFile=false. When libFuzzer reduces a
seed, Corpus::Replace keeps the original file and the reduced unit is
written to the output corpus. The flag stays false, so when the same
input is reduced again, the previous reduced unit is not deleted either,
and every intermediate reduction of a seed stays in the output corpus.
In a fork-mode job, the feature file of such a unit has been renamed to
the hash of the newer unit. The parent reads an empty feature set for
the unit and calls memcpy with null pointers. glibc declares them
nonnull, and with _FORTIFY_SOURCE the optimizer removes the zero-size
path of the vector. The parent then writes out of bounds and crashes.
Mark a replaced unit as deletable, since libFuzzer wrote the
replacement itself. Skip the copy when there are no features, and copy
only whole features, so that a missing or truncated feature file from
any other cause does not crash the parent either.
[4 lines not shown]
[Mips] Select constrained FP arithmetic on microMIPS (#246060)
STRICT_FADD, STRICT_FSUB, STRICT_FMUL, STRICT_FDIV and STRICT_FSQRT are
Legal for all hard-float subtargets, but only the standard encoding
patterns were changed to match them. On microMIPS any constrained
arithmetic operation failed instruction selection.
Use the any_* fragments in the microMIPS and microMIPS R6 patterns as
well.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[Mips] Use libcalls for constrained f16 conversions (#246063)
STRICT_FP16_TO_FP and STRICT_FP_TO_FP16 are not covered by the default
Expand action for constrained operations, so they were Legal and any
constrained conversion to or from half failed instruction selection.
Mark them LibCall like their non-strict counterparts, extending to f64
through f32. Also drop the STRICT_ cases from the MSA custom lowering of
these nodes: they were unreachable, and would have used the chain as the
value operand.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>