[orc-rt] Make NativeDylibManager's test dylib a shared input. (#244105)
The shared library added for the NativeDylibManager unit tests isn't
actually NativeDylibManager-specific. Move it to test/Inputs as
orc-rt-test-dylib, so that it can be reused by other unit and regression
tests. Unit tests find it through the ORC_RT_TEST_DYLIB_PATH compile
definition (previously NDM_TEST_LIB_PATH), and regression tests through
a new %{test-dylib} substitution.
The library is now written in C, defines its own export macro rather
than using the unit tests' TestVisibility.h, and its functions are
renamed to orc_rt_test_dylib_return42 and orc_rt_test_dylib_return7.
[Hexagon] Add a limit on the HLX vector stack size (#243174)
Report an error when a function needs more HLX vector (VTCM) stack than
allowed, including the area for outgoing HLX stack arguments. The limit
comes from the "hlx-vector-stack-limit" function attribute, or else from
the -hlx-vector-stack-limit option, and there is no limit by default.
In Clang, the -fhlx-vector-stack-limit=N driver option, which requires
-mhlx, sets the limit on all functions through the
"hlx-vector-stack-limit" function attribute in IR. A function can
override it with the hlx_vector_stack_limit(N) attribute.
Assisted by AI
---------
Co-authored-by: Ankit Aggarwal <aankit at qti.qualcomm.com>
Co-authored-by: pavani karveti <pkarveti at qti.qualcomm.com>
[flang][mlir][OMPIRBuilder][OpenMP] Support iterator modifier in declare mapper map clause (#235491)
This PR adds LLVM code generation support for the `iterator` modifier in
`map` clauses inside `declare mapper`, building on the lowering added in
[#241358](https://github.com/llvm/llvm-project/pull/241358).
**Implementation:**
- `OMPIRBuilder`: added `MapInfosTy::DynamicSegments` to describe groups
of mapper components whose count is only known at runtime (trip count, a
callback producing one iteration's base/begin/size, the map type, and an
optional child mapper). `emitUserDefinedMapper` emits a loop per segment
that pushes each component via `__tgt_push_mapper_component`, resolving
`MEMBER_OF` against `__tgt_mapper_num_components`. Added
`LeadingParentCond` to mark the first static component as a parent
synthesized only to group those segments, pushed conditionally at
runtime.
- Added runtime handling for iterator-generated map entries using
`__tgt_push_mapper_component`, since the number of elements is known
[22 lines not shown]
[Hexagon] Test that HLX pair alloca lowering keeps half-vector loads (#243916)
Check that a store to an HLX VectorPair alloca is lowered to SS16b.new
while an HLX_Vector-typed load from the same alloca stays a plain load.
Assisted by AI
TableGen: Index patterns by predicates when generating variants
GenerateVariants quadractically compared each new variant against
every pattern to find duplicates, though only patterns with the same
predicates can match. Index the patterns by predicates and only
compare against those.
RISCVGenDAGISel.inc tablegen run:
Gigainstructions Gigacycles CPU seconds
Before 56.9 27.8 8.7
After 50.0 (-12.2%) 25.2 (-9.3%) 8.0 (-8.8%)
AMDGPUGenDAGISel.inc tablegen run:
Gigainstructions Gigacycles CPU seconds
Before 91.2 44.6 14.2
After 85.3 (-6.5%) 42.7 (-4.2%) 13.4 (-5.4%)
[7 lines not shown]
[BOLT] Skip symbols with no name (#239088)
In llvm-nm, an existing bug makes smybol with no name listed in
special-syms. This makes later value unpacking fails. It has been fixed
in trunk but is not in the older release version. We workaround this by
skipping such symbols by check len < 3 or not.
See: https://github.com/llvm/llvm-project/pull/192129
[CMake] Enforce -Wglobal-constructors for MC, MCParser, NVPTXCodeGen (#244103)
They no longer have C++ dynamic initialization after their cl::opt
globals moved to TableGen.
[RISCV] Increase the vector spill/reload cost (#243766)
When spilling/reloading a vector register, the stack slot address
need to be materialized before the store/load.
[clang] Add new volatile -Wunsequenced support under -Wunsequenced-volatile (#244073)
So it can be disabled separately while people clean up violations.
Initially implemented in #180955.
Assisted with Gemini
error if get_unused_fd_flags() is called without O_CLOEXEC set
Previously this was a KASSERT. landry saw it trigger on inteldrm
(Kaby Lake). Caller is unclear, likely DRM_IOCTL_PRIME_HANDLE_TO_FD.
[RISCV][P-ext] Fix crash selecting WADDA[U]/WSUBA[U] with a zero accumulator (#244093)
`WADDA`, `WADDAU`, `WSUBA` and `WSUBAU` tie the accumulator to the
result, so it must be a virtual register. `Select()` treated them like
`ADDD/SUBD` and used `X0_Pair` for a (0, 0) accumulator, which hits an
assertion.
This commit selects them with the other widening accumulate nodes so the
accumulator is always built with `buildGPRPair`. `X0_Pair` is now only
used for `ADDD/SUBD`.
Closes #244092
[Clang] Fix crash on a block capturing this in an aggregate's default member initializer (#243509)
Fixes #229323
`computeBlockInfo` typed a block's captured `this` from `CurFuncDecl`,
assuming the literal is emitted in a member function of that class. A
default member initializer is emitted wherever the object is
initialized, which for an aggregate can be a free function, so the
`cast<CXXMethodDecl>` asserted. Closures nested in such an initializer
have no `CurFuncDecl` at all and failed the same way even inside a
constructor.
`BlockDecl` now records the type of the captured `this`, which Sema
knows at the capture, serialized like the other captures;
`computeBlockInfo` and the block debug info read it instead of inferring
it. An enclosing block or captured region is no longer marked as
capturing `*this` by copy when a nested lambda does, so the recorded
type is always the pointer.
AI Assisted!
[mlir][ODS]: add constraints for variadic type matching (#243982)
This change adds ODS traits for asserting consistency of variadic
operands or results.
This follows the pattern of `AllMatchSameOperatorTrait` and the traits
derived from it (`AllTypesMatch`, `AllShapesMatch`, ...). New traits
make more sense than modifying those traits, because they take one value
from each name they are given.
Adds `VariadicAllMatchSameOperatorPred` and
`VariadicAllMatchSameOperatorTrait`, which check that an operator
evaluates to the same value for every element of one variadic field,
together with concrete `VariadicAllElementTypesMatch`,
`VariadicAllRanksMatch`, `VariadicAllShapesMatch` and
`VariadicAllTypesMatch`.
Adds one upstream use in `gpu.subgroup_mma_elementwise` which fixes a
bug in the verifier for that op.
[orc-rt] Rename 'sys' directories & namespaces to 'host'. NFC. (#244075)
The sys directories and namespaces in the ORC runtime hold wrappers
around host system services (e.g. page-based memory allocation, target
triple detection, sockets). These are primarily for internal use by the
ORC runtime.
Upcoming patches will add ORC runtime APIs that implement
system-specific functionality for clients (e.g. alternatives to the
POSIX dlfcn.h APIs for "dlopen"-ing JIT'd code). The short 'sys' name is
a better fit for these new APIs.
This commit renames the existing 'sys' directories, namespaces, and
include guards to 'host' (meaning the executor's host system), and
updates the comments that describe them, freeing up 'sys' for the
upcoming work.
gnutls: update to 3.8.14.
* Version 3.8.14 (released 2026-11-18)
** libgnutls: Fix crash on certificate list memory allocation failure
On allocation failure, the certificate list pointer and count could
get out of sync, causing a NULL deref or double-free during session cleanup.
Both fields are now zeroized before the allocation.
Reported by Joshua Rogers of AISLE Research Team.
[GNUTLS-SA-2026-11-18-1, severity: low] [CVE-2026-127039]
** libgnutls: Fix crash in RSA-PSK username copy memory allocation failure
A missing return on a failed username copy could crash the handshake
when memory allocation fails.
The error is now propagated, aborting the handshake.
Reported by Joshua Rogers of AISLE Research Team.
[GNUTLS-SA-2026-11-18-2, severity: low] [CVE-2026-127040]
** libgnutls: Make name constraints deinitialization idempotent
[115 lines not shown]
Revert " [KnownFPClass] add applyInputSemantics to handle NSZ and the input denormal mode" (#244087)
Reverts https://github.com/llvm/llvm-project/pull/242439, which I
committed without approval.
There are no in-tree users, so this revert is NFC.