LLVM/project c1944ab — llvm/lib/Target/X86 X86FastISel.cpp

[X86][FastISel] Cache import-call-optimization (NFC) (#248155)

`X86FastISel::fastLowerCall()` currently calls
`Module::getModuleFlag("import-call-optimization")` on every 64-bit
call, linearly scanning the `llvm.module.flags` metadata list each time.

Since `X86FastISel` is instantiated per function and module flags do not
change during instruction selection, lazily cache the lookup in a
`std::optional<bool>` on the first 64-bit call (0 lookups for leaf
functions, 1 lookup for call-heavy functions).

Tested locally with `llc -O0 -time-passes` on LLVM bitcode from
`rustc-perf` crates (`ripgrep`, `syn` at `-O0 -g1`): reduces `X86
DAG->DAG Instruction Selection` time by ~2.8% with bit-identical object
output.

Assisted-by: Gemini 4 Neon via Antigravity
DeltaFile
+11-3llvm/lib/Target/X86/X86FastISel.cpp
+11-31 files

LLVM/project 481588b — lldb/tools/lldb-dap Server.h Server.cpp, lldb/tools/lldb-dap/tool lldb-dap.cpp

[lldb-dap] Move running the server to lldbDAP library. (#248937)

Move running the server out of `lldb-dap.cpp`, so it can be unit tested.

The server now registers only one deadline, and only shutdown if there
are no more clients. instead of creating a new callback for each client
that disconnects.
DeltaFile
+217-0lldb/tools/lldb-dap/Server.cpp
+4-159lldb/tools/lldb-dap/tool/lldb-dap.cpp
+130-0lldb/unittests/DAP/ServerTest.cpp
+96-0lldb/tools/lldb-dap/Server.h
+1-0llvm/utils/gn/secondary/lldb/tools/lldb-dap/BUILD.gn
+1-0lldb/unittests/DAP/CMakeLists.txt
+449-1591 files not shown
+450-1597 files

LLVM/project fc96c79 — libcxx/docs/Status Cxx26Papers.csv, libcxx/include iterator

[libc++] Implement `projected_value_t` from P2248R8 (#248662)

This PR adds `std::projected_value_t` (C++26), the alias template
introduced by [P2248R8](https://wg21.link/P2248R8) "Enabling
list-initialization for algorithms". `std` module exportation is
correspondingly added.

Feature-test macro `__cpp_lib_algorithm_default_value_type` is not added
because algorithms are not yet modified.

The addition is covered by a compile-only test because we only need to
care about the transformed types.

After landing `std::projected_value_t`, modification to each algorithm
in P2248R8 and P3217R0 (for `ranges::find_last`) can be implemented
separately in following-up PRs.

Part of #105421.

Assisted-by: Claude
DeltaFile
+78-0libcxx/test/std/iterators/iterator.requirements/indirectcallable/projected/projected_value_t.compile.pass.cpp
+9-0libcxx/include/__iterator/projected.h
+4-0libcxx/include/iterator
+3-0libcxx/modules/std/iterator.inc
+1-1libcxx/docs/Status/Cxx26Papers.csv
+95-15 files

LLVM/project f423d4d — llvm/bindings/ocaml README.txt, llvm/cmake config-ix.cmake

[OCaml] Use ext_dll suffix for stub libraries (#234939)

ocamlmklib names shared stub libraries with OCaml's `ext_dll` config
value, not `CMAKE_SHARED_LIBRARY_SUFFIX.` On macOS these differ (`.so`
vs `.dylib`), so with `BUILD_SHARED_LIBS=ON` the build looks for
nonexistent `dll<name>.dylib` files and fails with:

    Error copying file ".../bindings/ocaml/llvm/dllllvm.dylib" to
    ".../lib/ocaml/llvm/": No such file or directory

FindOCaml.cmake now reads ext_dll from `ocamlfind ocamlc -config` into
`OCAML_EXT_DLL,` and `AddOCaml.cmake` uses it for the stub library
outputs and install rules.

This is the same issue reported on Cygwin, #92736, which this should
also address (but I have not yet tested it). #123478 also touches on
this by hardcoding .so. Reading `ext_dll` uses the actual suffix
ocamlmklib produces rather than hardcoding it.


    [7 lines not shown]
DeltaFile
+11-1llvm/cmake/modules/FindOCaml.cmake
+3-3llvm/cmake/modules/AddOCaml.cmake
+2-2llvm/cmake/config-ix.cmake
+1-1llvm/bindings/ocaml/README.txt
+2-0llvm/docs/ReleaseNotes.md
+19-75 files

LLVM/project ddef168 — llvm/test/CodeGen/X86 vector-interleaved-store-i64-stride-7.ll vector-deinterleave8-i64.ll

Rebase, address comments

Created using spr 2.0.0-beta.1
DeltaFile
+20,796-20,889llvm/test/CodeGen/X86/vector-interleave7-i16.ll
+17,854-17,989llvm/test/CodeGen/X86/vector-interleave7-i32.ll
+17,166-17,229llvm/test/CodeGen/X86/vector-interleave6-i16.ll
+15,403-15,465llvm/test/CodeGen/X86/vector-interleaved-load-i64-stride-7.ll
+13,433-13,434llvm/test/CodeGen/X86/vector-deinterleave8-i64.ll
+13,329-13,243llvm/test/CodeGen/X86/vector-interleaved-store-i64-stride-7.ll
+97,981-98,2493,844 files not shown
+868,588-737,8433,850 files

LLVM/project ce6170d — llvm/docs LangRef.md

[LangRef] Specify that `allocsize` gives the exact size (#249103)

The LangRef describes `allocsize` as a lower bound: the function returns
"at least" the given number of bytes. The implementation disagrees and
optimizes under the assumption that it is exact. Alternative to #245519
and see there for more details.

I've had Claude survey downstream projects. Findings:

Of major frontends only julia assumed the langref semantics (we're happy
to change this). Additional frontends that make this assumption that
Claude found are llgo, nlvm and kairo, but these are relatively small
projects (and as mentioned in the issue, these are the semantics today,
so clearly they didn't notice). Still if this merges, I'm happy to file
courtesy issues there. Other frontends (e.g. Rust, Mojo) appear to
assume exact as best as I can tell.

Clang uses `allocsize` in two places: For `operator new` and for the
`alloc_size` attribute. For `operator new` on objects, I think the exact

    [16 lines not shown]
DeltaFile
+9-6llvm/docs/LangRef.md
+9-61 files

LLVM/project ac97c61 — flang-rt/lib/cuda kernel.cpp, flang/include/flang/Optimizer/Builder CUFCommon.h

[flang][cuda] Wait for kernel completion when requested by NVCOMPILER_ACC_SYNCHRONOUS (#248668)

`NVCOMPILER_ACC_SYNCHRONOUS` is a bit field. For CUDA Fortran, bit 2
requests a wait at the end of each CUF kernel and bit 4 requests a wait
at the end of each kernel subroutine launch. The CUDA Fortran runtime
did not look at the variable, so a launch always returned before the
kernel completed.

**Change:**

* `CUFLaunchKernel` takes a new trailing argument `isCUFKernel`.
`CUFGPUToLLVMConversion` passes 1 when the kernel was generated for a
CUF kernel directive and 0 when it is a kernel subroutine. A CUF kernel
is recognized by `_cufk_` in the kernel name, the same test
`CUFLaunchAttachAttr` uses; the constant moves to `CUFCommon.h`.
* After a successful launch, the runtime calls `cudaStreamSynchronize`
on the stream of the launch when the bit for that kind of kernel is set.
`CUFLaunchClusterKernel` and `CUFLaunchCooperativeKernel` only launch
kernel subroutines, so they test bit 4 and keep their signature.

    [37 lines not shown]
DeltaFile
+71-5flang-rt/lib/cuda/kernel.cpp
+30-13flang/lib/Optimizer/Transforms/CUDA/CUFGPUToLLVMConversion.cpp
+36-4flang/test/Fir/CUDA/cuda-gpu-launch-func.mlir
+4-2flang/include/flang/Runtime/CUDA/kernel.h
+1-2flang/lib/Optimizer/Transforms/CUDA/CUFLaunchAttachAttr.cpp
+2-0flang/include/flang/Optimizer/Builder/CUFCommon.h
+144-266 files

LLVM/project 42b79ac — libcxx/docs FeatureTestMacroTable.md, libcxx/include version

[libc++] Add missing FTMs 2026-11 (Búzios) (#248435)

- https://wg21.link/version.syn
- https://wg21.link/LWG4605 Feature test macro for `error_code`
formatting, 2026-11 (Búzios)
- https://wg21.link/LWG3889 `std::(ranges::)destroy_at` should destroy
array elements in the decreasing index order
DeltaFile
+110-0libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
+83-0libcxx/test/std/language.support/support.limits/support.limits.general/system_error.version.compile.pass.cpp
+64-0libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp
+13-0libcxx/utils/generate_feature_test_macro_components.py
+4-0libcxx/include/version
+2-0libcxx/docs/FeatureTestMacroTable.md
+276-06 files

LLVM/project fda246c — libcxx/docs/Status Cxx29Issues.csv, libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem bracket.pass.cpp

[libc++] Mark LWG2595 as "Complete" (#248439)

https://wg21.link/LWG2595

Fixes #247494

Note: Implemented since the initial commit.
DeltaFile
+4-4libcxx/test/std/iterators/predef.iterators/reverse.iterators/reverse.iter.elem/bracket.pass.cpp
+1-1libcxx/docs/Status/Cxx29Issues.csv
+5-52 files

LLVM/project 257dd8a — llvm/lib/Transforms/Vectorize VPlanRecipes.cpp

[VPlan] Generate ExtractLastLane directly (NFC) (#249291)

ExtractLastLane and ExtractPenultimateElement went through
VPTransformState's per-lane value map to extract lane VF - Offset of
their operand. Emit the extractelement directly instead.

The lane map also implicitly handled scalar operands by returning their
lane-0 value. Those extracts are now all folded in VPlan before
execution, so generate can assume a vector operand, which also resolves
the TODO to remove ExtractLastLane for scalar VFs.
DeltaFile
+6-14llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp
+6-141 files

LLVM/project 2f01ce7 — llvm/lib/Transforms/Vectorize VPlanAnalysis.cpp, llvm/test/Transforms/LoopVectorize/AArch64 no_vector_instructions.ll reg-usage.ll

[VPlan] Only treat recipes as ephemeral if all defined values are. (#249290)

Only treat a recipe as ephemeral if all its defined values are only used
by ephemeral recipes. This fixes register usage computation and the
check whether a plan generates vectors for interleave groups with a
member only used by an assume.
DeltaFile
+6-4llvm/test/Transforms/LoopVectorize/AArch64/reg-usage.ll
+4-3llvm/lib/Transforms/Vectorize/VPlanAnalysis.cpp
+2-3llvm/test/Transforms/LoopVectorize/AArch64/no_vector_instructions.ll
+12-103 files

LLVM/project fb1bb53 — llvm/utils/gn/secondary/lldb/source/Plugins BUILD.gn

[gn] port 5e2518f2cc54 (#249300)
DeltaFile
+8-0llvm/utils/gn/secondary/lldb/source/Plugins/BUILD.gn
+8-01 files

LLVM/project e18b1ce — llvm/utils/gn/secondary/lldb/source/Plugins BUILD.gn, llvm/utils/gn/secondary/lldb/source/Plugins/SymbolFile/DWARF BUILD.gn

[gn] port 707da25212e7 (lldb Fortran plugin) (#249299)
DeltaFile
+15-0llvm/utils/gn/secondary/lldb/source/Plugins/TypeSystem/Fortran/BUILD.gn
+4-0llvm/utils/gn/secondary/lldb/source/Plugins/BUILD.gn
+1-0llvm/utils/gn/secondary/lldb/source/Plugins/SymbolFile/DWARF/BUILD.gn
+20-03 files

LLVM/project 7309149 — llvm/include/llvm/CodeGen MIRFSDiscriminator.h

[CodeGen] Remove unused members in MIRAddFSDiscriminatorsLegacy (NFC) (#249270)

This patch removes getMachineFunction and MF from
MIRAddFSDiscriminatorsLegacy.  getMachineFunction has no callers, and
MF has no writers.

Assisted-by: Antigravity
DeltaFile
+0-4llvm/include/llvm/CodeGen/MIRFSDiscriminator.h
+0-41 files

LLVM/project ede36ee — llvm/utils/gn/secondary/libcxx/include BUILD.gn, llvm/utils/gn/secondary/libcxx/src BUILD.gn

[gn] port 8932712d6cfd (#249298)
DeltaFile
+3-0llvm/utils/gn/secondary/libcxx/src/BUILD.gn
+3-0llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+6-02 files

LLVM/project 36ad8bb — llvm/utils/gn/secondary/libcxx/include BUILD.gn

[gn] port 6d7134ffe1bc (#249297)
DeltaFile
+1-0llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+1-01 files

LLVM/project d15b0c1 — llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc BUILD.gn, llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/Orc BUILD.gn

[gn] port 8265c78c7a61 (#249296)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/unittests/ExecutionEngine/Orc/BUILD.gn
+1-0llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/BUILD.gn
+2-02 files

LLVM/project 6ed28b2 — llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc BUILD.gn

[gn] port ea049faec270 (#249295)
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/lib/ExecutionEngine/Orc/BUILD.gn
+1-01 files

LLVM/project 62abc26 — llvm/utils/gn/secondary/llvm/lib/DebugInfo/PDB BUILD.gn

[gn] port ba183902f702 (#249294)
DeltaFile
+2-1llvm/utils/gn/secondary/llvm/lib/DebugInfo/PDB/BUILD.gn
+2-11 files

LLVM/project b7473c8 — llvm/utils/gn/secondary/lldb/source/Plugins/TypeSystem/Clang BUILD.gn, llvm/utils/gn/secondary/lldb/test BUILD.gn

[gn] port acd65f9df260 (#249293)
DeltaFile
+1-1llvm/utils/gn/secondary/lldb/source/Plugins/TypeSystem/Clang/BUILD.gn
+0-1llvm/utils/gn/secondary/lldb/test/BUILD.gn
+1-22 files

LLVM/project 5197baa — llvm/test/Transforms/LowerMatrixIntrinsics select.ll transpose-opts.ll

[Matrix] Enable IRBuilder GEP canonicalization (#249283)

Assisted-by: LLM
DeltaFile
+132-132llvm/test/Transforms/LowerMatrixIntrinsics/multiply-fused-loops-large-matrixes.ll
+60-60llvm/test/Transforms/LowerMatrixIntrinsics/multiply-fused-lifetime-ends.ll
+58-58llvm/test/Transforms/LowerMatrixIntrinsics/binop.ll
+43-43llvm/test/Transforms/LowerMatrixIntrinsics/phi.ll
+34-34llvm/test/Transforms/LowerMatrixIntrinsics/transpose-opts.ll
+31-31llvm/test/Transforms/LowerMatrixIntrinsics/select.ll
+358-35828 files not shown
+598-60134 files

LLVM/project c9680c4 — clang/include/clang/Analysis/Analyses/LifetimeSafety LifetimeSafety.h Facts.h, clang/lib/Analysis/LifetimeSafety Dataflow.h

[LifetimeSafety] Never destroy the dataflow states (#248628)
DeltaFile
+25-6clang/lib/Analysis/LifetimeSafety/Dataflow.h
+4-0clang/include/clang/Analysis/Analyses/LifetimeSafety/Facts.h
+1-0clang/include/clang/Analysis/Analyses/LifetimeSafety/LifetimeSafety.h
+30-63 files

LLVM/project 15f9cb0 — llvm/lib/CodeGen/SelectionDAG TargetLowering.cpp, llvm/test/CodeGen/X86 vec_ctbits.ll expand-vp-int-intrinsics.ll

[X86] Compute `CTLZ` using fp math for `v4i32` on SSE2 targets (#190930)

This PR implements optimization for the `ISD::CTLZ` and
`ISD::CTLZ_ZERO_POISON` for X86 SSE2 target.

This PR builds upon #167034 

Closes #161746

Co-authored-by: NishiB137 <cs23btech11041 at iith.ac.in>
Co-authored-by: VindhyaP312 <cs23btech11044 at iith.ac.in>
Co-authored-by: Simon Pilgrim <llvm-dev at redking.me.uk>
DeltaFile
+32-140llvm/test/CodeGen/X86/vector-lzcnt-128.ll
+44-57llvm/test/CodeGen/X86/arbitrary-fp-to-float.ll
+52-0llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+8-38llvm/test/CodeGen/X86/combine-srl.ll
+8-35llvm/test/CodeGen/X86/vec_ctbits.ll
+8-35llvm/test/CodeGen/X86/expand-vp-int-intrinsics.ll
+152-3053 files not shown
+169-3409 files

LLVM/project fd82a4e — llvm/lib CMakeLists.txt

[CMake] Enforce -Wglobal-constructors for more libraries (#249281)

They no longer have C++ dynamic initialization.
DeltaFile
+0-9llvm/lib/CMakeLists.txt
+0-91 files

LLVM/project acd5a45 — llvm/test/CodeGen/RISCV zfhmin-imm.ll half-imm.ll

[RISCV] Remove unused variable in tests. NFC (#249062)
DeltaFile
+2-2llvm/test/CodeGen/RISCV/zfhmin-imm.ll
+2-2llvm/test/CodeGen/RISCV/half-imm.ll
+2-2llvm/test/CodeGen/RISCV/float-imm.ll
+6-63 files

LLVM/project b8f5418 — llvm/lib/Transforms/IPO SampleProfile.cpp, llvm/test/Transforms/SampleProfile recovery-recursion-alias.ll icp-rejected-context-merge.ll

[SampleProfile] Recover hot contexts rejected by indirect-call promotion (#243628)

A sample profile can record samples for an indirect-call target under
its caller, as if the compiler had inlined the target. If the compiler
leaves the target out of line, those samples belong in the target's
standalone profile. Leaving them under the caller makes the standalone
function appear colder than it is.

This patch recovers those samples in both sample-profile inliners:
- Priority inliner: A target can be hot in absolute terms but account
for too few calls at a site to qualify for promotion. Previously, the
loader stopped at the first target that failed the percentage check. It
now records that target and continues through the remaining hot targets.
It stops when the targets are no longer hot. Several rejected targets at
the same call can therefore recover their samples.
- Iterative inliner (line-based AutoFDO): When the compiler promotes and
inlines one target, an indirect fallback remains for the other targets.
A later scan can mistake the already-inlined target for one that still
needs recovery. Tracking only one target per call can also miss other

    [19 lines not shown]
DeltaFile
+102-60llvm/lib/Transforms/IPO/SampleProfile.cpp
+84-0llvm/test/Transforms/SampleProfile/icp-rejected-context-merge.ll
+84-0llvm/test/Transforms/SampleProfile/inline-indirect-iterative.ll
+49-0llvm/test/Transforms/SampleProfile/recovery-recursion-alias.ll
+31-0llvm/test/Transforms/SampleProfile/Inputs/icp-rejected-context-merge.prof
+9-0llvm/test/Transforms/SampleProfile/Inputs/inline-indirect-iterative.prof
+359-606 files

LLVM/project 2a4ed76 — llvm/lib/Analysis CtxProfAnalysis.cpp, llvm/lib/IR IROptions.td ProfDataUtils.cpp

[Passes] Declare -enable-profcheck-in-pipeline and -use-ctx-profile in TableGen (#249267)

Move them into IROptions and AnalysisOptions with exported getters.
CtxProfAnalysis reads -use-ctx-profile in run() instead of its
constructor.

Renames, with the old spellings kept as aliases:

```
-enable-profcheck-in-pipeline  -> -profcheck-in-pipeline
```

Co-authored-by: Alexis Engelke <mail at aengelke.net>
DeltaFile
+28-27llvm/lib/Passes/PassBuilderPipelines.cpp
+23-19llvm/lib/Transforms/IPO/FunctionImport.cpp
+11-14llvm/lib/Analysis/CtxProfAnalysis.cpp
+9-11llvm/lib/IR/ProfDataUtils.cpp
+8-4llvm/lib/Passes/CodeGenPassBuilder.cpp
+8-0llvm/lib/IR/IROptions.td
+87-753 files not shown
+104-759 files

LLVM/project 9e18a56 — llvm/lib/Target/RISCV RISCVISelDAGToDAG.h RISCVISelDAGToDAG.cpp

[RISCV] Replace some uses of SplatFPOp with a ComplexPattern. NFC (#249166)

SplatFPOp is a PatFrag that checks 2 different opcodes. Every time it is
used we create 2 isel patterns. Since all those patterns handle multiple
element types and LMULs, this quickly adds up.

Replace it with a ComplexPattern like we do for integer. This reduces
the isel table size by 9.3%.

Assisted-by: Claude
DeltaFile
+22-18llvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
+17-17llvm/lib/Target/RISCV/RISCVInstrInfoVSDPatterns.td
+11-0llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
+1-0llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
+51-354 files

LLVM/project 67458f7 — llvm/lib/Target/AArch64 AArch64ISelLowering.cpp, llvm/test/CodeGen/AArch64 concat-repeated-load-dup.ll arm64-build-vector.ll

[AArch64]Duplicate the repeated lower half of 128-bit build vectors

A 128-bit build vector whose upper half repeats the lower half, e.g.
(a, b, a, b), was lowered with one lane insert per element. Build the
lower half once and concatenate it with itself. Undef upper lanes match
anything; an all-undef upper half is left to the insert sequence, where
it needs no copy.

Assisted-by: Cursor

Pull-request: https://github.com/llvm/llvm-project/pull/247230
Reviewers: davemgreen, huntergr-arm, john-brawn-arm, paulwalker-arm, sdesmalen-arm
Reviewed-by: sdesmalen-arm
DeltaFile
+61-33llvm/test/CodeGen/AArch64/arm64-build-vector.ll
+22-0llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+4-14llvm/test/CodeGen/AArch64/concat-repeated-load-dup.ll
+87-473 files

LLVM/project 02b5114 — mlir/lib/Dialect/OpenACC/Transforms ACCRecipeMaterialization.cpp

[mlir][OpenACC] Fix assertion macro expansion (#248975)

ACC_COMPUTE_CONSTRUCT_AND_LOOP_OPS expands to a comma-separated type
list. On systems where assert forwards its expression to another macro,
the commas are parsed as separate macro arguments.

Wrap the isa expression in an extra parenthesized group so it is passed
as one macro argument.
DeltaFile
+1-1mlir/lib/Dialect/OpenACC/Transforms/ACCRecipeMaterialization.cpp
+1-11 files