[CIR] Propagate initializer type adjustment failures
Reject initializers whose active members have no LLVM representation, including when an enclosing union's storage type is convertible. Propagate recursive adjustment failures before querying data layout or constructing LLVM operations.
Assisted-by: Codex / GPT-6
[OpenMP] Fix construct context at TARGET and repeated-construct subsets (#233480)
OMPContext has two bugs in how construct selectors are matched. Both can
select the wrong variant:
- The construct context should start at the innermost enclosing TARGET,
but Clang and Flang add every enclosing construct. Inside a TARGET
region nested in a PARALLEL, construct={parallel} matched the outer
PARALLEL. OMPContext::addTrait now drops the constructs recorded before
a target trait.
- A selector that only repeats a construct, such as construct={parallel
do, parallel} over construct={parallel do}, adds no property.
isStrictSubset required fewer properties, so a score tie between the two
fell back to clause order. A shorter ordered construct sequence now also
makes a strict subset. If the shorter selector has a user condition, or
an ISA name the longer one lacks, the tie still falls back to clause
order, since different conditions or ISA names share one property.
The ordered-subsequence check advanced the wrong iterator, so it
[7 lines not shown]
[CIR] Add llvm-strings to check-clang dependencies (#234257)
Build `llvm-strings` for `check-clang` when CIR is enabled. The CIR
bytecode tests use this tool, but only `check-clang-cir` declares the
dependency, so clean builds running `check-clang` can fail with command
not found.
Assisted-by: Codex / GPT-6
[libc++][pstl][NFC] Sort the forward declarations in backend_fwd.h (#233477)
This file has grown quite a lot and is expected to continue growing.
Make it easier to maintain by organising the forward declarations in a
strict lexicographical order.
[libc] Implement ether_ntoa and ether_ntoa_r (#233876)
This adds <net/ethernet.h> (with struct ether_addr) and
<netinet/ether.h> (with ether_ntoa, ether_ntoa_r).
A few implementation notes:
- following glibc and musl (and the linux man page), octets < 0x10 are
formatted without a leading zero. This differs from some BSD
implementations.
- like inet_ntoa (but unlike GLIBC), ether_ntoa uses a thread-local
static buffer
Assisted-by: Gemini
[CIR] Fix uninitialized value which caused MSAN failure (#234274)
This failure showed up in the build bots now that we're enabled by
default. We ended up accessing an invalid index while doing label
lowering ops.
[CIR][OpenMP] Add support for 'distribute parallel for' with 'target teams'
Adds support for handling the full '[target] teams distribute parallel for'.
Introduces setting the omp.composite attibute for the 'distribute parallel for'
composite construct.
Assisted-by: Cursor / Claude Sonnet 5 High
[libc] Fix gcc build for popen (#234041)
There were gcc failures after #232846 added popen/pclose. This PR fixes
them. Specifically gcc 12 didn't like the custom `delete` and was
confused by `MSAN_UNPOISON` expanding to nothing.
Assisted-by: Automated tooling, human reviewed.
[CIR][OpenMP] Add initial support for distribute
This patch adds initial support for the OpenMP 'distribute' directive. Basic
code generation for the standalone and combined cases is introduced. Support
for clauses will be added in the future. The composite 'teams distribute
parallel for' form will be added in a subsequent patch.
Assisted-by: Cursor / Claude Sonnet 5 High
[CIR][OpenMP] Add support for omp teams
This patch adds support for the OpenMP 'teams' directive, both standalone
and as the combined `target teams` construct. isCombinableLeaf now also
recognizes teams, so an explicitly-nested `target` + `teams` pair gets
the same omp.combined marking as the combined case.
Assisted-by: Cursor / Claude Sonnet 5 High
x11-fonts/fnt: Update 1.9.1 => 1.9.2
This update includes a fix for when the requested font is not found.
Commit log:
https://github.com/alexmyczko/fnt/compare/1.9.1...1.9.2
While here:
- Add ftp/curl to RUN_DEPENDS, it won't start without it,
even though upstream also checks for "fetch" or "wget".
- Replace do-install-ZSH-on with post-install.
Reported by: portscout
Approved by: osa, vvd (Mentors, implicit)
MFH: 2026Q4
(cherry picked from commit 7efcb57130175ba02462c51d8915b2832b71ca86)
[LoongArch] Add initial MachineCombiner support (#230830)
This patch add basic MachineCombiner Pass support for LoongArch and
enable it by default, including reassociative of basic arthmetic
instructions like `add/sub/mul`, logic instrunctions like `and/or/xor`
and floating-point instructions like `fadd/fsub/fmul/fmin/fmax` and
their vector counterparts.
It's worth noticing that floating-point arthmetic instruction needs
`FmReassoc` and `FmNsz` to perform reassociation, while the `fmin/fmax`
instrunctions needs `FmNoNans` because LoongArch follows the IEEE
754-2008 standard's `minNum(x, y)` and `maxNum(x, y)`, these two
operations will return `qNaN` when one of the two operands is `sNaN`, so
this will break the association law, for example:
```
min(min(3, sNaN), 1) = 1
min(3, min(sNaN, 1)) = 3
```
[18 lines not shown]
[libc] Add sys/eventfd.h header and eventfd function. (#234028)
Add the Linux `<sys/eventfd.h>` header to LLVM-libc. This header
provides an event
wait/notify mechanism for user-space applications that relies on the
kernel-controlled
counter. See https://man7.org/linux/man-pages/man2/eventfd.2.html for
more details.
Provide the header on various Linux platforms. Implement the `eventfd()`
API as a
regular syscall wrapper. Don't add the GNU-specific `eventfd_t` and
`eventfd_(read|write)`
helpers yet.
Add the unit test that validates the basic functionality (confirms that
the counter value can be `read` from the returned descriptor).
Assisted by: Gemini
[CIR][OpenMP] Add support for host_eval so that SPMD kernels can be used
This patch adds support for host_eval so that SPMD kernels and in the future
num_threads and other clauses can be implemented correctly.
Assisted-by: Cursor / Claude Sonnet 5 High
x11-fonts/fnt: Update 1.9.1 => 1.9.2
This update includes a fix for when the requested font is not found.
Commit log:
https://github.com/alexmyczko/fnt/compare/1.9.1...1.9.2
While here:
- Add ftp/curl to RUN_DEPENDS, it won't start without it,
even though upstream also checks for "fetch" or "wget".
- Replace do-install-ZSH-on with post-install.
Reported by: portscout
Approved by: osa, vvd (Mentors, implicit)
MFH: 2026Q4
[CIR][OpenMP] Add support for the OpenMP 'for' directive
This patch adds support for wsloop in ClangIR: the `for` directive and its
combined forms `parallel for` and `target parallel for`. This is lowered to an
omp.wsloop + omp.loop_nest, nested utilizing the existing queue-based
decomposition.
Assisted-by: Cursor / Claude Sonnet 5 High
[mlir][LLVM] Add LLVMStructType::getElementOffset() (#234171)
Since bb6f7fcb46cd LLVMStructType::getTypeSizeInBits() uses allocation
sizes, but there are a few places where we still compute field offsets
based on store sizes.
This change factors out the computations into a single method, a
counterpart of LLVM's StructLayout::getElementOffset(), so that all now
agree in how they do that.
Also simplify the surrounding code a bit while there.
[SimplifyCFG] Propagate unknown profiles in simplifyBranchOnICmpChain (#234090)
Otherwise we end up with validation errors when profile information is
not available for the instructions getting transformed.
Found when trying to do a two stage build with -mllvm
-enable-profcheck-in-pipeline.
[NVPTX] Custom lower vector.reduce.fmaximumnum/fminimumnum (#233666)
Lower VECREDUCE_FMAXIMUMNUM and VECREDUCE_FMINIMUMNUM through
LowerVECREDUCE, like VECREDUCE_FMAX and VECREDUCE_FMIN. FMAXIMUMNUM and
FMINIMUMNUM already select to max/min, and PerformFMinMaxCombine already
folds them into FMAXNUM3/FMINNUM3, so the reduction uses the same
opcodes.
With the generic expansion only some of the operations became 3-input
min/max on sm_100. For example, a <128 x float> fmaximumnum reduction
now
emits 63 3-input and 1 2-input max.f32 instead of 42 and 43.
Assisted-by: Claude Code
[IR] Remove unused LLVMContextImpl::DiscriminatorTable (NFC) (#234096)
The last use of LLVMContextImpl::DiscriminatorTable was removed on
February 29, 2016 in commit 939993ff2fe38eca498b0806b22a35412222a0eb.
Assisted-by: Antigravity
[lld] Replace PointerUnion::dyn_cast with llvm::dyn_cast_if_present (NFC) (#234084)
PointerUnion::dyn_cast has been soft-deprecated in favor of
llvm::dyn_cast and llvm::dyn_cast_if_present. This patch migrates all
instances of PointerUnion::dyn_cast under lld/ where migrating to
llvm::dyn_cast would trigger an assertion failure during check-lld.
Assisted-by: Antigravity