[lld][MachO] Pool relocation storage & sort relocs in ascending address order (#245184)
Currently, each subsection grows its own `std::vector` of relocations,
resulting in a lot of small allocations during relocation parsing, which
is costly. This PR allocates one relocation array per input section, and
each subsection takes a `RelocsArray` slice of it.
Some linker passes still need to dynamically `emplace_back()` into the
`RelocsArray`; since the slices are contiguous, they cannot expand
in-place, so we switch the `RelocsArray` storage to a per-subsection
heap-allocated buffer as needed. This is a similar to how `SmallVector`
behaves.
Additionally, we sort the relocations in ascending address order,
matching the order that subsections are sorted in. This means that
iterating over the relocations in subsection order can now benefit more
from the hardware prefetcher. (Previously, each subsection's relocations
were sorted in descending address order, but that did not matter as much
since the allocations were fragmented anyway.) This ordering results in
[3 lines not shown]
[ADT] Remove unused <memory> include from APFloat.h (NFC) (#245882)
DoubleAPFloat::Floats was switched from std::unique_ptr<APFloat[]> to a
raw pointer in c72ebeeb7f1c, leaving <memory> unused in this header..
Also updates the comment that still referred to the unique_ptr
[lldb][test] Gate TestBugReportURL on backtrace (#245826)
TestBugReportURL.test checks for the "PLEASE submit a bug report"
message printed by CrashHandler in PrettyStackTrace.cpp, which is
compiled out when LLVM_ENABLE_BACKTRACES is disabled.
Export LLVM_ENABLE_BACKTRACES from LLVMConfig.cmake.in for standalone
builds, plumb it into lldb/test/Shell as the `backtrace` lit feature
(matching llvm, clang, and lld), and require `backtrace` in
TestBugReportURL.test. Also update the GN and Bazel lit site configs.
Assisted by Gemini.
[Matrix] Fix `fmuladd` crash on `+` or `-` between a matrix and scalar (#245686)
Fixes #244340.
With FP contraction on (the default for `clang-dxc`), Clang tries to
fuse a `+` or `-` with a multiply operand into an `fmuladd`. For a
matrix and a scalar, the scalar isn't splatted yet at that point, so the
`fmuladd` builds with mismatched operand types and hits an assertion.
This PR fixes that by skipping fusion when the operand types differ. The
check is intentionally general rather than matrix-specific, since
`fmuladd` requires all three operands to have the same type. In
practice, a mismatch is currently only reachable with matrix + scalar,
but the general check also guards against future changes.
This PR also adds HLSL and C codegen tests for the crash and for cases
that should still fuse (matrix + matrix, vector + scalar, mixed scalar
types).
Assisted-by: Claude Opus 5.5
print/publisher-devel: Update 5.9.28 => 5.9.34
Security: file names in server mode.
In server mode, the file names sent with /v0/publish and /v0/pdf were
not checked. A request could write files outside of the job directory
on the server. Now only the file name without a directory is used, as
with /v1. Requests with an invalid file name such as .. are rejected.
Updating is recommended if the server can be reached by others.
Changelog:
https://doc.speedata.de/publisher/en/manual/changelog/version-5/#5934-2026-11-23
PR: 301106
MFH: 2026Q4
[flang][OpenMP] Keep pending METADIRECTIVE variants in their scope
A loop-associated METADIRECTIVE replacement inside a BEGIN
METADIRECTIVE region can escape the region. In
```fortran
!$omp begin metadirective default(parallel)
continue
!$omp metadirective when(user={condition(flag)}: simd) default(do)
!$omp end metadirective
do i = 1, n
end do
```
neither SIMD nor DO has a loop in the region, but only the DO is
reported. The SIMD is checked against the loop after END METADIRECTIVE.
In this PR each block records where its entries start in the list of
pending replacements, so that it can diagnose the leftovers when it ends.
[4 lines not shown]
[flang][OpenMP] Add tasking constructs to the construct trait set
Count TASK, TASKLOOP and TASKGROUP in the construct trait set for
METADIRECTIVE and DECLARE VARIANT, both on their own and as leaves of a
compound construct such as PARALLEL MASKED TASKLOOP. They cannot be
named in a construct selector, but the set contains every enclosing
construct, and its size and order affect the scores. Each one is added
with OMPContext::addUnknownConstruct, so it never matches a selector.
The other constructs that cannot be named in a selector will be added
in follow-up patches.
Part of #244761
Assisted-by: GitHub Copilot and Claude Opus 5.5
[lldb][NativePDB] Initialize VariableInfo::is_param (#246084)
`VariableInfo::is_param` has no initializer, and `CreateLocalVariable`
does not initialize it when it builds the `VariableInfo` of an
`S_CONSTANT`, so a local constant can be listed as an argument of its
function.
This patch initializes it to `false`.
rdar://193647118
[llubi] Use visitFPBinOpWithResult for vector.reduce.{fadd,fmul} (#245542)
Sequential fadd/fmul reductions only handled denormals and fast-math
flags at the outer boundary, skipping intermediate results between
steps.
[mlir][bytecode] Fix deferred mutable-type ordering and cycle checks (#244033)
PR #229910 added `DialectBytecodeReader::tryStartCyclicRead` for custom
bytecode encodings of mutable types. However, moving failed entries to
the back of the deferred worklist placed incomplete mutable types behind
their non-cyclic callers. When a parent attribute or type retried first,
`getPartialType` returned an unpopulated mutable type and broke parent
verifiers. In addition, cyclic entries that omitted `tryStartCyclicRead`
caused unbounded recursion or an infinite worklist loop.
This addresses this issue in the failure case while documenting
expectation, failure messages and some cleanups along the way:-
- Replace the std::deque worklist and post-pass partial loop with a
post-order DFS AttrTypeWorklist (std::list plus DenseMap). Splicing
dependencies to the front in O(1) time resolves every non-cyclic child
before its caller retries at any depth.
- Re-queue a type entry in `readEntry` if a nested read defers after
`tryStartCyclicRead`, and remove its `partialTypes` binding once parsing
finishes.
[21 lines not shown]
[IPO] Declare LTO command line options in TableGen (#245301)
Port the FunctionImport, FunctionAttrs and WholeProgramDevirt options
that the ThinLTO thin link reads from the combined index.
LTO passes its context's options, ThinLTOCodeGenerator its
LibraryOptions.
runWholeProgramDevirtOnIndex replaces its nullable LLVMContext
parameter, for which ThinLTOCodeGenerator passed null, so llvm-lto and
libLTO now honor -devirtualize-speculatively.
Renames without an alias, as an inverting alias rejects the `=0` every
user passes:
```
-disable-thinlto-funcattrs -> -thinlto-funcattrs
```
LLM-aided
[X86] Fold more patterns to andnp
This patch fixes an existing TODO to handle cases with a single not
operand to andnp. This fixes a case that I was seeing when working on an
optimized clang-vector based strcmp implementation for LLVM libc.
Assisted-By: LLM
Reviewers: RKSimon
Pull Request: https://github.com/llvm/llvm-project/pull/245808
LinuxKPI: Add in_compat_syscall()
Return true when the current process is a 32-bit process running on a
64-bit kernel, matching the Linux semantics. On native 32-bit kernels
there is no compat ABI, so always return false.
Reviewed by: wulf
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61900
www/openresty: Security update to 1.31.9.1
The bundled nginx core moves to 1.31.9 and closes ten CVEs. The fix for
excessive CPU usage with TLS 1.3 early data is not part of that core and
is carried as a patch.
The encrypted_session module moves to 0.11, which rejects tokens issued
by earlier versions.
Changelog: https://openresty.org/en/changelog-1031009.html
Security: 573460ab-e8a5-11f1-9b74-3497f65b111b
Security: cee7773d-e7dd-11f1-9b74-3497f65b111b
With hat: ports-secteam
Sponsored by: Netzkommune GmbH
www/freenginx: Security update to 1.30.3
Fixes memory corruption and use-after-free issues in HTTP/2, HTTP/3 and
the mail proxy module.
Changelog: https://freenginx.org/en/CHANGES-1.30
Security: 5734413b-e8a5-11f1-9b74-3497f65b111b
With hat: ports-secteam
Sponsored by: Netzkommune GmbH
[X86] Precommit test for andnp folds
For:
* not(or(not(X), Y)) -> andnp(Y, X)
* not(or(X, not(Y))) -> andnp(X, Y)
Which will be fixed in a follow-up PR.
Assisted-By: LLM
Reviewers: topperc, RKSimon
Pull Request: https://github.com/llvm/llvm-project/pull/245807
[X86][ACEV1][NFC] Take the TOP4MX vvvv source last
The five mixed-precision outer products listed their sources reversed,
because MRMSrcReg takes the EVEX.vvvv operand ahead of the ModR/M one
and the specification numbers them the other way round. MRMSrcReg4VOp3
takes it last, so every operand list now reads in order, as the other
outer products already do. Pairing that form with a trailing immediate
needs the disassembler emitter to accept a fourth operand, which it
already does for MRMSrcReg. The encodings do not change.
[X86][ACEV1] Diagnose a mixed tile model and check the builtins
One palette is in force at a time, so a function cannot configure both
kinds of tile. Report that after selection, when every model has been
recorded, and report a function mixing the two ACE models only once.
Give the AMX tile-zero builtins their own amx-tile spelling, so an ACE
target no longer selects palette 1 for them, and check the scale group
the mixed-precision forms take. The clang tests now pin the tile shape
and alignment rather than the intrinsic name alone.
[X86][ACEV1] Move palette 2 tiles a row at a time
Palette 2 has no TILELOADD or TILESTORED, so a tile reaches memory only
through TILEMOVROW. The casts substituted a zeroed tile for a loaded one
and dropped the stored result, a tile PHI and a tile-to-tile copy still
asked for TILELOADD, and a constant row index went through a GPR.
Synthesise the 16 row moves in each of those places, and select the
immediate form when the index is constant. The -O0 config now leads the
block, since palette 2 writes no shapes and ldtilecfg resets the BSR.
[X86][ACEV1] Record the program model and correct the outer products
Record the program model as the intrinsics are selected, keyed on the
intrinsic as AMX does, rather than from a 66-entry opcode table kept in
step by hand; using both models is now diagnosed, not asserted. Drop the
K dimension the internal outer products never used, and swap the TOP4MX
pseudos' sources, which reached the instruction reversed because it
takes its VVVV operand first. Widen the insert pseudos' index to i32 so
an out-of-range one truncates as for AMX, check it in clang against the
architectural 0-15, and restore the GCCRegNames grouping BSR0 reflowed.