LLVM/project 294c9c8mlir/lib/Dialect/SCF/Transforms LoopSpecialization.cpp, mlir/test/Dialect/SCF for-loop-peeling.mlir

[mlir][SCF] Skip dynamic peeling for non-index loops (#217909)

`scf-for-loop-peeling` constructs an `affine.apply` on its dynamic path
to compute the split bound. However, `affine.apply` requires `index`
operands, while `scf.for` also permits signless integer induction
variables and bounds.

Skip the dynamic peeling path when the loop induction variable is not
`index`. The existing constant-bounds path remains unchanged, so
constant integer loops can still be peeled.

Add a regression test for a loop with dynamic `i32` bounds, verifying
that the pass leaves it unchanged rather than producing invalid IR.

Fixes #216631.

Co-authored-by: Purnima Shrivastava <purnimashrivastava05@.com>
DeltaFile
+22-0mlir/test/Dialect/SCF/for-loop-peeling.mlir
+7-0mlir/lib/Dialect/SCF/Transforms/LoopSpecialization.cpp
+29-02 files

LLVM/project 8132d4dmlir/lib/Dialect/SCF/Utils Utils.cpp, mlir/test/Dialect/SCF loop-unroll.mlir

[mlir][scf] Do not read non-constant loop bounds when unrolling (#217392)

`loopUnrollByFactor` asserts `expected constant loop bound`
(`SCF/Utils/Utils.cpp`) when the loop bounds are not constant.
`getStaticTripCount` takes the constant path whenever
`constantTripCount` answers, but `constantTripCount` answers on three
shapes where the bounds themselves are **not** constant:

- `lb == ub` (same `Value`), giving 0 iterations,
- `lb == 0` and `ub == step`, giving 1 iteration,
- `ub` a constant offset from a non-constant `lb`, via
`computeUbMinusLb` under `nsw`.

In all three the code then reads the bounds as constants and asserts.

The fix takes the constant path only when `lb`, `ub` and `step` are all
constant, and otherwise falls through to the dynamic path that already
handles them. The other two callers of `getStaticTripCount` in that file
use only the count, never the bounds, so the defect is confined to this

    [4 lines not shown]
DeltaFile
+60-0mlir/test/Dialect/SCF/loop-unroll.mlir
+10-0mlir/lib/Dialect/SCF/Utils/Utils.cpp
+70-02 files

LLVM/project 32e47a2clang/lib/CIR/CodeGen CIRGenCleanup.cpp CIRGenStmt.cpp, clang/test/CIR/CodeGen lifetime-marker.cpp

[CIR] Emit lifetime markers for automatic variables (#206695)

### summary 

This is a follow up of : #199599

Per the consensus from the PR #199599, this implements lifetime-marker
emission in ClangIR that closely follows classic CodeGen.

Emit lifetime markers (cir.lifetime.start/end) for automatic variables
in ClangIR.

- Gated by shouldEmitLifetimeMarkers (optimized builds or
ASan-use-after-scope/
  HWASan/MSan/MemtagStack), like classic CodeGen.
- start at the decl; end as a NormalEHLifetimeMarker cleanup (after the
destructor);
both target the underlying alloca. Wired through the EH stack so they
don't force

    [6 lines not shown]
DeltaFile
+281-0clang/test/CIR/CodeGen/lifetime-marker.cpp
+64-10clang/lib/CIR/CodeGen/CIRGenDecl.cpp
+37-0clang/lib/CIR/CodeGen/CIRGenFunction.cpp
+19-4clang/lib/CIR/CodeGen/CIRGenFunction.h
+11-11clang/lib/CIR/CodeGen/CIRGenStmt.cpp
+9-7clang/lib/CIR/CodeGen/CIRGenCleanup.cpp
+421-322 files not shown
+423-328 files

LLVM/project a88fcdf.github/workflows release-binaries.yml llvm-abi-tests.yml, .github/workflows/get-llvm-version action.yml

workflows/get-llvm-version: Make this action standalone

You can use this action now without first checking out the llvm-project
source code.
DeltaFile
+11-2.github/workflows/get-llvm-version/action.yml
+1-7.github/workflows/llvm-abi-tests.yml
+1-7.github/workflows/libclang-abi-tests.yml
+1-6.github/workflows/release-binaries.yml
+14-224 files

LLVM/project 0a0832c.github/workflows release-binaries.yml

workflows/release-binaries: Use self-repository reference for validate-release-version

https://github.blog/changelog/2026-07-30-reference-same-repository-actions-with-self-repository-syntax/
DeltaFile
+1-1.github/workflows/release-binaries.yml
+1-11 files

LLVM/project 62b1dcemlir/lib/Dialect/Tensor/Transforms BufferizableOpInterfaceImpl.cpp, mlir/test/Dialect/Tensor one-shot-bufferize-encodings.mlir

[mlir][tensor][bufferization] Preserve memory space for tensor.concat (#213528)

## Summary

- Use the buffer type selected for the destination `alloc_tensor` when
bufferizing `tensor.concat`.
- Pass that type to `ToBufferOp` instead of reconstructing a
default-memory-space `MemRefType`.
- Use the same type for the destination subviews, preserving its memory
space and layout.
- Add an encoding-based regression test for a non-default destination
memory space.

## Motivation

While investigating `tensor.concat` bufferization with a non-default
memory space, I reproduced a mismatch between the destination allocation
type and the type requested by `ToBufferOp`.


    [40 lines not shown]
DeltaFile
+21-0mlir/test/Dialect/Tensor/one-shot-bufferize-encodings.mlir
+6-12mlir/lib/Dialect/Tensor/Transforms/BufferizableOpInterfaceImpl.cpp
+27-122 files

LLVM/project fe0143bclang/tools/clang-format git-clang-format

[git-clang-format] Don't format the line preceding a deletion (#215946)

`git diff -U0` renders a pure deletion as `@@ -3,3 +2,0 @@`: no new
lines,
anchored at the preceding line. extract_lines coerces that zero count to
one, so clang-format reformats a line the deletion never touched.

Skip such hunks, matching clang-format-diff.py. start_line is 0 only for
deletions at the start of a file, so that check goes away as well.

Aided by Claude Opus 5
DeltaFile
+3-2clang/tools/clang-format/git-clang-format
+3-21 files

LLVM/project ea3bbd5llvm/lib/Target/RISCV RISCVExpandPseudoBase.cpp RISCVExpandPseudoBase.h

[RISCV][NFCI] Introduce Base for Pseudo Expansion Passes (#218170)

This introduces a base class for the Pseudo Instruction Expansion Pass
Implementations, which shares the boiler plate that ensures the function
size estimate does not grow during expansion.

This also makes many of those methods `const`, to more clearly
illustrate how the Impl class works - that per-instruction info is
mostly passed as parameters and not stored in the class members.

This is used to simplify all four of the Pseudo Instruction Expansion
passes. Additionally, many static functions in the Atomic Expand pass
are moved onto the Impl class, so they can directly access the subtarget
and instruction info.

Assisted-by: AI
DeltaFile
+127-155llvm/lib/Target/RISCV/RISCVExpandAtomicPseudoInsts.cpp
+42-105llvm/lib/Target/RISCV/RISCVPreRAExpandPseudoInsts.cpp
+42-83llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp
+26-47llvm/lib/Target/RISCV/RISCVPostRAExpandPseudoInsts.cpp
+61-0llvm/lib/Target/RISCV/RISCVExpandPseudoBase.h
+59-0llvm/lib/Target/RISCV/RISCVExpandPseudoBase.cpp
+357-3901 files not shown
+358-3907 files

LLVM/project 2249530.github/workflows/upload-release-artifact action.yml

workflows/upload-release-artifact: Remove template expansion (#216872)

https://github.com/llvm/llvm-project/security/code-scanning/2290
DeltaFile
+2-1.github/workflows/upload-release-artifact/action.yml
+2-11 files

LLVM/project ec5c918clang/lib/Interpreter IncrementalParser.cpp, clang/test/Interpreter extern-c-error-recovery.cpp

[clang-repl] Don't double-remove extern "C" decls from the IdResolver (#218129)

Regression was introduced in https://github.com/llvm/llvm-project/pull/178648

This is required for the 23 release; the downstream tools CppInterOp & Cppyy will fail otherwise.
DeltaFile
+63-0clang/test/Interpreter/extern-c-error-recovery.cpp
+9-5clang/lib/Interpreter/IncrementalParser.cpp
+72-52 files

LLVM/project 7f9b3b6clang/lib/Driver/ToolChains FreeBSD.h FreeBSD.cpp, clang/test/Driver freebsd-include-paths.c freebsd.cpp

[clang][Driver] Fix libc++ include path on FreeBSD (#212725)

`clang++` defaults to `-stdlib=libc++` on FreeBSD. When building with
both `clang` and `libcxx` included, the freshly built `clang++` uses the
system version of the `libc++` headers. However, this is from the
bundled `libc++` 19.1.7, thus inconsistent with the `libc++` being
built.

Similarly to the NetBSD case, FreeBSD has its own version of
`addLibCxxIncludePaths` which just includes `/usr/include/c++/v1`.

This patch removes `FreeBSD::addLibCxxIncludePaths` in favour of the
generic version in `Gnu.cpp`.

Tested on `amd64-pc-freebsd15.1`.
DeltaFile
+12-2clang/test/Driver/freebsd.cpp
+0-6clang/lib/Driver/ToolChains/FreeBSD.cpp
+4-2clang/test/Driver/freebsd-include-paths.c
+0-2clang/lib/Driver/ToolChains/FreeBSD.h
+0-0clang/test/Driver/Inputs/install_tree_without_libcxx/include/.keep
+0-0clang/test/Driver/Inputs/install_tree_without_libcxx/lib/.keep
+16-121 files not shown
+16-127 files

LLVM/project 9c20f3bllvm/lib/IR Verifier.cpp, llvm/test/Verifier insert-extract-intrinsics-invalid.ll

[Verifier] Prevent insertion/extraction of scalable vectors into/from fixed vectors (#215647)

Per LangRef:
> Scalable vectors can only be inserted into other scalable vectors.
> (...)
> Scalable vectors can only be extracted from other scalable vectors.

Add checks to enforce these rules for `llvm.vector.insert` and
`llvm.vector.extract` intrinsics.
DeltaFile
+17-0llvm/test/Verifier/insert-extract-intrinsics-invalid.ll
+14-0llvm/lib/IR/Verifier.cpp
+31-02 files

LLVM/project 5632287llvm/include/llvm/Support GenericDomTreeConstruction.h GenericDomTree.h, llvm/test/CodeGen/AMDGPU si-lower-control-flow-preserve-dom-tree.mir

[DomTree] Prepend children instead of appending (#218178)

Follow-up to #176409: `AppendPtr` exists only to keep a node's children
in the order they are added, and a lot of code depends on the order.

Implement an altrenative: in `attachNewSubtree`, create nodes in DFS
order and then link them in reverse. Trees built from scratch are
unchanged. Two tests that print an updated tree are adjusted.
DeltaFile
+12-12llvm/include/llvm/Support/GenericDomTree.h
+9-6llvm/include/llvm/Support/GenericDomTreeConstruction.h
+5-5llvm/test/Transforms/JumpThreading/domtree-updates.ll
+2-2llvm/test/CodeGen/AMDGPU/si-lower-control-flow-preserve-dom-tree.mir
+28-254 files

LLVM/project acddcdaflang/unittests/Evaluate CMakeLists.txt

[flang][test] Link designator-path test with FortranParser (#218204)

This is the missing build dependency that wasn't added to
https://github.com/llvm/llvm-project/pull/211606.
It should resolve a some of the build bot failures that have been
reported there.
DeltaFile
+1-0flang/unittests/Evaluate/CMakeLists.txt
+1-01 files

LLVM/project 724201cllvm/lib/Target/SPIRV SPIRVPassRegistry.def

fix

Created using spr 1.3.7
DeltaFile
+11-11llvm/lib/Target/SPIRV/SPIRVPassRegistry.def
+11-111 files

LLVM/project a8d8ed0llvm/lib/Target/SPIRV SPIRVPrepareFunctions.h SPIRVLegalizeZeroSizeArrays.h

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+106-0llvm/lib/Target/SPIRV/SPIRV.h
+0-34llvm/lib/Target/SPIRV/SPIRVFinalizeShaderLinkage.h
+0-29llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.h
+0-29llvm/lib/Target/SPIRV/SPIRVLegalizeZeroSizeArrays.h
+0-29llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.h
+0-29llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.h
+106-15023 files not shown
+108-37829 files

LLVM/project 5607c45llvm/lib/Target/SPIRV SPIRVPrepareFunctions.h SPIRVLegalizeZeroSizeArrays.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+110-0llvm/lib/Target/SPIRV/SPIRV.h
+0-34llvm/lib/Target/SPIRV/SPIRVFinalizeShaderLinkage.h
+0-29llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.h
+0-29llvm/lib/Target/SPIRV/SPIRVLegalizeZeroSizeArrays.h
+0-29llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.h
+0-29llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.h
+110-15023 files not shown
+135-37829 files

LLVM/project 6409ff1llvm/lib/Target/SPIRV SPIRVLegalizeImplicitBinding.h SPIRVFinalizeShaderLinkage.h

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+2-2llvm/lib/Target/SPIRV/SPIRVPassRegistry.def
+1-1llvm/lib/Target/SPIRV/SPIRVLegalizeImplicitBinding.h
+1-1llvm/lib/Target/SPIRV/SPIRVFinalizeShaderLinkage.h
+1-1llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.h
+1-1llvm/lib/Target/SPIRV/SPIRVCtorDtorLowering.h
+1-1llvm/lib/Target/SPIRV/SPIRVCBufferAccess.h
+7-78 files not shown
+15-1514 files

LLVM/project 45dd695llvm/lib/Target/SPIRV SPIRVPrepareFunctions.h SPIRVLegalizeZeroSizeArrays.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+106-0llvm/lib/Target/SPIRV/SPIRV.h
+0-34llvm/lib/Target/SPIRV/SPIRVFinalizeShaderLinkage.h
+0-29llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.h
+0-29llvm/lib/Target/SPIRV/SPIRVLegalizeZeroSizeArrays.h
+0-29llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.h
+0-29llvm/lib/Target/SPIRV/SPIRVEmitIntrinsics.h
+106-15023 files not shown
+108-37829 files

LLVM/project 844b687clang/lib/AST/ByteCode EvaluationResult.cpp

[clang][bytecode] Use a SmallPtrSet in collectBlocks() (#218192)

Not sure why I used a SetVector here, but switch it to a SmallPtrSet
(this also gets rid of an additional include when #186045 gets merged).
DeltaFile
+4-3clang/lib/AST/ByteCode/EvaluationResult.cpp
+4-31 files

LLVM/project d964190mlir/include/mlir/Bindings/Python IRAttributes.h

[MLIR][Python] Don't throw in PyDenseArrayIterator dunderNext (#218193)

`PyDenseArrayIterator::dunderNext` signaled iterator exhaustion by
throwing `nanobind::stop_iteration()`. Raising a C++ exception to signal
`StopIteration` incurs stack-unwinding cost on every loop over a dense
array attribute.

#175377 replaced this pattern with `PyErr_SetNone(PyExc_StopIteration)`
(return a null object after setting the Python error indicator) for the
other iterators in the bindings. `PyDenseArrayIterator` was missed in
that change and still throws. This PR applies the same conversion to
`PyDenseArrayIterator::dunderNext`.

Assisted by: Claude
DeltaFile
+10-5mlir/include/mlir/Bindings/Python/IRAttributes.h
+10-51 files

LLVM/project ebc9d86llvm/include/llvm/ADT FoldingSet.h, llvm/lib/Support FoldingSet.cpp

[FoldingSet] Invalidate iterators on mutation (#218179)

Tighten FoldingSet's iterator contract so that, like DenseMap (#199369)
and StringMap (#202237), mutating the set invalidates iterators obtained
before the call. insert / remove (successful) / clear / move bump the
epoch, so a stale iterator fails under LLVM_ENABLE_ABI_BREAKING_CHECKS.

LLM-aided
DeltaFile
+48-0llvm/unittests/ADT/FoldingSet.cpp
+21-11llvm/include/llvm/ADT/FoldingSet.h
+10-1llvm/lib/Support/FoldingSet.cpp
+79-123 files

LLVM/project 0a1ed5cllvm/test/Feature codegen-plugin-passes.mir, llvm/tools/llc NewPMDriver.cpp llc.cpp

Reapply "[llc] Register pass plugin callbacks with the new pass manager" (#217727) (#218163)

Reapplies #217727 (aa8d1afeed37), reverted in #218119 (91b04b4d45d9).

The test hardcoded Clang's spelling of an anonymous namespace in
--print-pipeline-passes output. The pass name comes from getTypeName(),
which scrapes __PRETTY_FUNCTION__; that spells anonymous namespaces as
"(anonymous namespace)" under Clang but "{anonymous}" under GCC. Relax
the FileCheck pattern so it is compiler-agnostic.
DeltaFile
+17-0llvm/test/Feature/codegen-plugin-passes.mir
+8-8llvm/tools/llc/NewPMDriver.h
+4-4llvm/tools/llc/llc.cpp
+4-1llvm/tools/llc/NewPMDriver.cpp
+33-134 files

LLVM/project 94ce03bllvm/lib/Target/SPIRV SPIRVPassRegistry.def

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+2-2llvm/lib/Target/SPIRV/SPIRVPassRegistry.def
+2-21 files

LLVM/project 9518291llvm/lib/Target/SPIRV SPIRVStructurizerWrapper.h SPIRVRegularizer.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+2-2llvm/lib/Target/SPIRV/SPIRVPassRegistry.def
+1-1llvm/lib/Target/SPIRV/SPIRVStructurizerWrapper.h
+1-1llvm/lib/Target/SPIRV/SPIRVRegularizer.h
+1-1llvm/lib/Target/SPIRV/SPIRVPushConstantAccess.h
+1-1llvm/lib/Target/SPIRV/SPIRVPrepareGlobals.h
+1-1llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.h
+7-78 files not shown
+15-1514 files

LLVM/project a980881llvm/lib/Target/SPIRV SPIRVPassRegistry.def

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+2-2llvm/lib/Target/SPIRV/SPIRVPassRegistry.def
+2-21 files

LLVM/project 4c2a5f6llvm/include/llvm/IR PassManager.h, llvm/include/llvm/Transforms/Instrumentation CopyProf.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+9-10llvm/include/llvm/IR/PassManager.h
+3-3llvm/include/llvm/Transforms/Instrumentation/CopyProf.h
+12-132 files

LLVM/project cfba34ellvm/include/llvm/Transforms/Instrumentation CopyProf.h

[𝘀𝗽𝗿] changes to main this commit is based on

Created using spr 1.3.7

[skip ci]
DeltaFile
+3-3llvm/include/llvm/Transforms/Instrumentation/CopyProf.h
+3-31 files

LLVM/project 62d19d5llvm/include/llvm/Transforms/Instrumentation CopyProf.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+3-3llvm/include/llvm/Transforms/Instrumentation/CopyProf.h
+3-31 files

LLVM/project 2f4a2d5clang/include/clang/ScalableStaticAnalysis BuiltinAnchorSources.def, clang/include/clang/ScalableStaticAnalysis/SourceTransformation/Transformations CppBoundedBuffers.h

[clang][ssaf] Add cpp-bounded-buffers source transformation (#210457)

Adds the first built-in transformation, `cpp-bounded-buffers`, which
rewrites buffers -- raw pointers and arrays -- into bounded types
(`bounded_ptr<T>`, `bounded_array<T, N>`) using the reachability
computed by `UnsafeBufferReachableAnalysis`.

The transformation collects every reachable pointer/array declarator and
function return declared in the translation unit, then either rewrites
it or records a SARIF note explaining why it did not. Shapes that are
not yet handled -- multi-level pointers, pointer to array, references to
pointers, multi-dimensional and unbounded arrays, multi-declarator
groups, macro-spelled declarators, and trailing return types -- are
reported rather than rewritten, and a final pass reports any reachable
entity that was neither rewritten nor otherwise accounted for. Edits are
validated and committed atomically, so a declarator whose edit cannot be
formed (such as a raw array of function pointers) is reported instead of
mangled.


    [4 lines not shown]
DeltaFile
+672-0clang/unittests/ScalableStaticAnalysis/SourceTransformation/CppBoundedBuffersTest.cpp
+611-0clang/lib/ScalableStaticAnalysis/SourceTransformation/Transformations/CppBoundedBuffers.cpp
+83-0clang/include/clang/ScalableStaticAnalysis/SourceTransformation/Transformations/CppBoundedBuffers.h
+2-0clang/lib/ScalableStaticAnalysis/SourceTransformation/CMakeLists.txt
+1-0clang/unittests/ScalableStaticAnalysis/CMakeLists.txt
+1-0clang/include/clang/ScalableStaticAnalysis/BuiltinAnchorSources.def
+1,370-06 files