LLVM/project ee1e3d3 — lldb/source/Plugins/TypeSystem/Fortran TypeSystemFortran.h FortranTypes.cpp, lldb/unittests/Symbol TestTypeSystemFortran.cpp

[lldb][Fortran] Added support for functions in TypeSystemFortran and added tests for them
DeltaFile
+98-0lldb/source/Plugins/TypeSystem/Fortran/TypeSystemFortran.cpp
+53-0lldb/unittests/Symbol/TestTypeSystemFortran.cpp
+37-0lldb/source/Plugins/TypeSystem/Fortran/FortranTypes.h
+35-0lldb/source/Plugins/TypeSystem/Fortran/FortranTypes.cpp
+15-18lldb/source/Plugins/TypeSystem/Fortran/TypeSystemFortran.h
+238-185 files

LLVM/project 09e8a04 — llvm/lib/Transforms/IPO MemProfContextDisambiguation.cpp, llvm/test/Transforms/MemProfContextDisambiguation unassigned-call-clones.ll

[MemProf] Fix off-by-one in the function clone numbers of UnassignedC… (#234032)

The loop recording the calls in function clones which did not get their
own clone of a callsite node (UnassignedCallClones) incremented the
clone number before checking it, recording the calls of function clone k
under clone number k+1. A function clone was therefore skipped whenever
k+1 was the clone number of a clone of the callsite node, leaving its
call to the original callee instead of following the original node's
callee assignment, and the calls of a function clone which did have its
own clone of the node could be recorded (under the next number) and
later redirected to the original node's callee. Use the clone number of
the function clone being examined.

The new test has a function F with two clones, where F.memprof.1 has no
clone of the F->G callsite node while F.memprof.2 does (clone number 2):
F.memprof.1's call to G was skipped and kept calling the original G
rather than the cold clone the original node is assigned to.
DeltaFile
+193-0llvm/test/Transforms/MemProfContextDisambiguation/unassigned-call-clones.ll
+2-4llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp
+195-42 files

LLVM/project 0e42735 — llvm/lib/CodeGen LiveIntervals.cpp

CodeGen: Remove LiveVariables references from LiveIntervals (#234267)
DeltaFile
+0-2llvm/lib/CodeGen/LiveIntervals.cpp
+0-21 files

LLVM/project 700ebce — clang/test/OpenMP declare_variant_construct_match_kind.c, flang/test/Lower/OpenMP metadirective-implementation.f90

[OpenMP] Fix context selector matching and scoring

OMPContext computes some context selector scores differently from the
OpenMP 5.2 rules in "Matching and Scoring Context Selectors", and
crashes on some selectors. Fix the following; each can change which
variant is selected:

- Device weights. kind, arch, and isa are worth 2^l, 2^(l+1), and
  2^(l+2), where l is the depth of the construct context. OMPContext
  used the candidate's own construct selector count, so inside two
  nested parallel regions kind(cpu) was worth 1 instead of 4 and lost
  to vendor(score(2): llvm).
- Scores per selector. A score belongs to a trait selector, but it was
  added once per property, so vendor(score(10): llvm, amd) counted 20.
  Scores now add once, using arbitrary-width arithmetic instead of
  wrapping 64-bit sums.
- Repeated constructs. When a construct selector can match several
  enclosing constructs, the highest-valued complete match counts.
  construct={parallel} inside three nested parallel regions now adds 2^2

    [29 lines not shown]
DeltaFile
+245-13llvm/unittests/Frontend/OpenMPContextTest.cpp
+108-96llvm/lib/Frontend/OpenMP/OMPContext.cpp
+30-0clang/test/OpenMP/declare_variant_construct_match_kind.c
+12-0flang/test/Lower/OpenMP/metadirective-implementation.f90
+395-1094 files

LLVM/project d87f107 — offload/liboffload/src OffloadImpl.cpp

[Offload] Allow `AsycInfo` to be used after `olDestroyQueue` (#234234)

Temprary fix to failing sanitizer test:
https://github.com/llvm/llvm-project/pull/233386
DeltaFile
+0-4offload/liboffload/src/OffloadImpl.cpp
+0-41 files

LLVM/project 762927e — libc/src/__support/threads/linux CMakeLists.txt thread.cpp, utils/bazel/llvm-project-overlay/libc BUILD.bazel

[libc] Use sigmask utils in linux thread_exit (#234185)

Use signals::block_all() instead of manually filling a sigset_t with
0xff and calling rt_sigprocmask. Also drop the now unused includes and
build dependencies.

Assisted-by: Gemini
DeltaFile
+2-7libc/src/__support/threads/linux/thread.cpp
+1-4utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+1-4libc/src/__support/threads/linux/CMakeLists.txt
+4-153 files

LLVM/project c3cc0dc — clang/lib/CIR/CodeGen CIRGenStmtOpenMP.cpp, clang/test/CIR/CodeGenOpenMP not-yet-implemented.c distribute-parallel-for.c

[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
DeltaFile
+556-0clang/test/CIR/CodeGenOpenMP/target-teams-distribute-parallel-for.c
+296-38clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp
+213-0clang/test/CIR/CodeGenOpenMP/distribute-parallel-for.c
+13-0clang/test/CIR/CodeGenOpenMP/not-yet-implemented.c
+1,078-384 files

LLVM/project 99dbef8 — clang/lib/CIR/CodeGen CIRGenStmtOpenMP.cpp, clang/test/CIR/CodeGenOpenMP not-yet-implemented.c teams-distribute.c

[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
DeltaFile
+405-0clang/test/CIR/CodeGenOpenMP/target-teams-distribute.c
+146-29clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp
+154-0clang/test/CIR/CodeGenOpenMP/teams-distribute.c
+12-0clang/test/CIR/CodeGenOpenMP/not-yet-implemented.c
+717-294 files

LLVM/project d42ab4a — clang/lib/CIR/CodeGen CIRGenStmtOpenMP.cpp, clang/test/CIR/CodeGenOpenMP not-yet-implemented.c teams.c

[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
DeltaFile
+176-0clang/test/CIR/CodeGenOpenMP/target-teams.c
+108-0clang/test/CIR/CodeGenOpenMP/teams.c
+100-5clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp
+13-3clang/test/CIR/CodeGenOpenMP/not-yet-implemented.c
+397-84 files

LLVM/project 9467c82 — clang/lib/CIR/CodeGen CIRGenFunction.h CIRGenStmtOpenMP.cpp, clang/test/CIR/CodeGenOpenMP target-parallel-for.c

[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
DeltaFile
+150-14clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp
+40-29clang/test/CIR/CodeGenOpenMP/target-parallel-for.c
+26-0clang/lib/CIR/CodeGen/CIRGenFunction.h
+216-433 files

LLVM/project 2dfbfc1 — clang/lib/CIR/CodeGen CIRGenStmtOpenMP.cpp, clang/test/CIR/CodeGenOpenMP parallel-for.c target-parallel.c

[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
DeltaFile
+315-68clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp
+343-0clang/test/CIR/CodeGenOpenMP/target-parallel-for.c
+228-0clang/test/CIR/CodeGenOpenMP/for-loop-forms.c
+220-0clang/test/CIR/CodeGenOpenMP/for.c
+133-0clang/test/CIR/CodeGenOpenMP/target-parallel.c
+126-0clang/test/CIR/CodeGenOpenMP/parallel-for.c
+1,365-681 files not shown
+1,372-687 files

LLVM/project d48bcd8 — .github/workflows libc-fullbuild-tests.yml

[libc] Enable baremetal Armv7-M pre-merge tests

The tests are run using QEMU system emulation on AArch64 GitHub runners.

No strong reason to use AArch64 instead of x86_64 as it is via emulation
anyway. But AArch64 runners are cheaper, so that might prove beneficial.
DeltaFile
+2-2.github/workflows/libc-fullbuild-tests.yml
+2-21 files

LLVM/project b7f9a22 — .github/workflows libc-fullbuild-tests.yml

Change from aarch64 runner to x86
DeltaFile
+1-1.github/workflows/libc-fullbuild-tests.yml
+1-11 files

LLVM/project 8d0855c — libc/cmake/caches armv7m-none-eabi.cmake

[libc] Application and testing support in baremetal Armv7-M CMake cache file

This patch adds support for linking and running applications, including
tests, targeting baremetal Armv7-M to the corresponding CMake cache
file.

The cache file takes into consideration if compiler-rt is enabled or
not. If it is, then linking applications is possible, and the relevant
CMake variables are set to enable test runs. If not, then only the libc
build is possible and enabled.

Particular libc configuration options, memory mappings, and QEMU options
are based on what Arm Toolchain for Embedded uses in its fully working
downstream testing.
DeltaFile
+47-1libc/cmake/caches/armv7m-none-eabi.cmake
+47-11 files

LLVM/project 4163bf1 — .github/workflows/containers/libc Dockerfile

[libc] Add qemu-system-arm to libc Dockerfile for Arm baremetal testing

This patch adds `qemu-system-arm` to the packages installed into the
Docker image so that we can run Arm baremetal tests.

It is only installed on the AArch64 platforms because we intend to run
the tests on AArch64 GitHub runners. Therefore there is no need to
install on x86_64.
DeltaFile
+6-0.github/workflows/containers/libc/Dockerfile
+6-01 files

LLVM/project 6eae2f0 — .github/workflows/containers/libc Dockerfile

Change from aarch64 to x86_64
DeltaFile
+2-2.github/workflows/containers/libc/Dockerfile
+2-21 files

LLVM/project 45f396d — clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp, clang/test/CIR/Lowering opaque-pointer-address-spaces.cir unlowered-address-spaces.cir

fix: [CIR] Check only the converted pointer's address space

Limit opaque pointer conversion to its own address space and diagnose unsupported pointee types where their layout is required. Emit type-specific errors for failed pointer conversions.

Validate pointee memory conversion before deriving copy sizes, alignments, or pointer-difference strides from CIR layout. Keep deeper pointee types opaque when their layouts are not needed.

Assisted-by: Codex / GPT-6
DeltaFile
+151-96clang/test/CIR/Lowering/unlowered-address-spaces.cir
+153-0clang/test/CIR/Lowering/opaque-pointer-address-spaces.cir
+36-55clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+2-1clang/utils/TableGen/CIRLoweringEmitter.cpp
+342-1524 files

LLVM/project d04cef2 — clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.cpp, clang/test/CIR/Lowering unlowered-address-spaces.cir

[CIR] Reject language address spaces in DirectToLLVM pointer conversion

Reject unlowered language address spaces in pointer types when bypassing TargetLowering. Guard pointer-producing lowerings, including generated patterns, so failed conversions report legalization failures instead of silently selecting address space zero or constructing invalid LLVM operations.

Assisted-by: Codex / GPT-6
DeltaFile
+504-0clang/test/CIR/Lowering/unlowered-address-spaces.cir
+64-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+2-0clang/utils/TableGen/CIRLoweringEmitter.cpp
+570-03 files

LLVM/project e23c4a5 — clang/lib/Driver/ToolChains Flang.cpp, flang/docs ReleaseNotes.md

[flang] Add -f[no-]version-loops-for-trip-count and enable it at -O3 (2/2) (#231207)

Stacked on #231205.

Wire `LoopTripCountVersioning` into the default pipeline behind a new
flag, mirroring `-fversion-loops-for-stride`:

- `-f[no-]version-loops-for-trip-count` in the `flang` driver and
`-fc1`, on by default at `-O3` and above.
- `CompilerInvocation` records the flag in `CodeGenOptions`, which feeds
`MLIRToLLVMPassPipelineConfig::LoopTripCountVersioning`; `Pipelines.cpp`
adds the pass when that is set. `tco` sets it directly at `-O3`.
- The pass runs right after `LoopVersioning`, before CSE, so the guard's
`arith.cmpi` is shared when several loops version on the same bound.
- `-mmlir -loop-tripcount-versioning-max-section-extent=N` (hidden) sets
the pass option for experiments; 0 disables.
- Release note under New Compiler Flags.

Tests:

    [10 lines not shown]
DeltaFile
+66-0flang/test/Integration/loop-tripcount-versioning.f90
+43-0flang/test/Driver/version-loops-trip-count.f90
+18-12clang/lib/Driver/ToolChains/Flang.cpp
+10-0flang/lib/Optimizer/Passes/CommandLineOpts.cpp
+5-0flang/lib/Optimizer/Passes/Pipelines.cpp
+5-0flang/docs/ReleaseNotes.md
+147-126 files not shown
+161-1212 files

LLVM/project 7bb03d8 — flang/include/flang/Optimizer/Transforms Passes.td, flang/lib/Optimizer/Transforms CMakeLists.txt LoopTripCountVersioning.cpp

[flang] Add pass to version innermost loops on a likely constant trip count (1/2) (#231205)

Add `LoopTripCountVersioning`, a FIR pass that versions an innermost
`fir.do_loop` whose trip count is a runtime value likely to equal a
compile-time constant N:

```
if (ub == N) { same loop with ub := N }
else         { original loop }
```

Both arms are the original loop with only the bound changed, so the
transformation is legal wherever the runtime check is uniform across the
threads executing the loop. Device code is excluded: on a GPU the check
could differ between threads and send them to different copies of a
convergent operation such as a barrier. The fast arm has a constant trip
count, which LLVM can fully unroll, or at least vectorize without a
minimum-iteration check and remainder loop. A heuristic is used to
decide where the rewrite is worthwhile.

    [36 lines not shown]
DeltaFile
+917-0flang/test/Transforms/loop-tripcount-versioning.fir
+355-0flang/lib/Optimizer/Transforms/LoopTripCountVersioning.cpp
+42-0flang/test/Transforms/loop-tripcount-versioning-target-device.fir
+41-0flang/include/flang/Optimizer/Transforms/Passes.td
+36-0flang/test/Transforms/loop-tripcount-versioning-no-module.fir
+1-0flang/lib/Optimizer/Transforms/CMakeLists.txt
+1,392-06 files

LLVM/project d29c32d — clang/include/clang/CIR LoweringHelpers.h, clang/include/clang/CIR/Dialect/IR CIROps.td

[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
DeltaFile
+66-0clang/test/CIR/Lowering/unsupported-initializer-types.cir
+13-2clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+12-0clang/lib/CIR/Lowering/LoweringHelpers.cpp
+2-1clang/include/clang/CIR/LoweringHelpers.h
+1-1clang/include/clang/CIR/Dialect/IR/CIROps.td
+94-45 files

LLVM/project 179781b — clang/test/OpenMP declare_variant_construct_target.c, flang/test/Lower/OpenMP metadirective-construct.f90

[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]
DeltaFile
+163-0llvm/unittests/Frontend/OpenMPContextTest.cpp
+131-0flang/test/Lower/OpenMP/metadirective-construct.f90
+27-16llvm/lib/Frontend/OpenMP/OMPContext.cpp
+31-0clang/test/OpenMP/declare_variant_construct_target.c
+6-0llvm/include/llvm/Frontend/OpenMP/OMPContext.h
+358-165 files

LLVM/project fa32adb — clang/test CMakeLists.txt

[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
DeltaFile
+1-0clang/test/CMakeLists.txt
+1-01 files

LLVM/project a6240d1 — libcxx/include/__pstl backend_fwd.h

[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.
DeltaFile
+250-250libcxx/include/__pstl/backend_fwd.h
+250-2501 files

LLVM/project 954555c — clang/lib/CIR/Dialect/Transforms CallConvLoweringPass.cpp, clang/test/CIR/Transforms/abi-lowering amdgpu-calling-conv.cir

[CIR] Support direct-in-registers aggregates and array coercions in call-conv lowering
DeltaFile
+22-0clang/test/CIR/Transforms/abi-lowering/amdgpu-calling-conv.cir
+13-3clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
+35-32 files

LLVM/project f05c112 — libc/src/netinet/ether ether_ntoa.cpp ether_ntoa_r.cpp, libc/test/src/netinet/ether ether_ntoa_r_test.cpp ether_ntoa_test.cpp

[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
DeltaFile
+50-0libc/src/netinet/ether/ether_utils.h
+42-0libc/test/src/netinet/ether/ether_ntoa_test.cpp
+42-0libc/src/netinet/ether/CMakeLists.txt
+36-0libc/test/src/netinet/ether/ether_ntoa_r_test.cpp
+32-0libc/src/netinet/ether/ether_ntoa_r.cpp
+29-0libc/src/netinet/ether/ether_ntoa.cpp
+231-018 files not shown
+436-024 files

LLVM/project 6c0b2e7 — clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVM.h

[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.
DeltaFile
+1-1clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.h
+1-11 files

LLVM/project 63b35bc — bolt/lib/Passes SplitFunctions.cpp

format
DeltaFile
+1-1bolt/lib/Passes/SplitFunctions.cpp
+1-11 files

LLVM/project 0c5a035 — clang/lib/CIR/CodeGen CIRGenStmtOpenMP.cpp, clang/test/CIR/CodeGenOpenMP not-yet-implemented.c distribute-parallel-for.c

[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
DeltaFile
+556-0clang/test/CIR/CodeGenOpenMP/target-teams-distribute-parallel-for.c
+296-38clang/lib/CIR/CodeGen/CIRGenStmtOpenMP.cpp
+213-0clang/test/CIR/CodeGenOpenMP/distribute-parallel-for.c
+13-0clang/test/CIR/CodeGenOpenMP/not-yet-implemented.c
+1,078-384 files

LLVM/project 09cc96a — libc/src/__support/File/linux CMakeLists.txt file.h, libc/src/__support/macros sanitizer.h

[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.
DeltaFile
+5-1libc/src/__support/macros/sanitizer.h
+3-1libc/src/__support/File/linux/file.h
+1-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+1-0libc/src/__support/File/linux/CMakeLists.txt
+10-24 files