LLVM/project 1de6d35 — bolt/include/bolt/Passes BinaryPasses.h, bolt/lib/Passes FrameOptimizer.cpp ShrinkWrapping.cpp

[BOLT] Use LLVM statistics for pass counters (NFC) (#246445)
DeltaFile
+71-35bolt/lib/Passes/BinaryPasses.cpp
+21-11bolt/lib/Passes/IdenticalCodeFolding.cpp
+16-8bolt/lib/Passes/ShrinkWrapping.cpp
+18-1bolt/lib/Passes/FrameOptimizer.cpp
+16-0bolt/test/X86/stats.test
+0-11bolt/include/bolt/Passes/BinaryPasses.h
+142-667 files not shown
+161-9113 files

LLVM/project b3aee63 — clang-tools-extra/clang-tidy/misc ExplicitConstructorCheck.cpp, clang-tools-extra/docs ReleaseNotes.md

[clang-tidy] Respect explicit(false) on conversion operators (#240521)

Commit eb3b063995d6 (#82689) taught `ExplicitConstructorCheck`
(`misc-explicit-constructor`, aliased as `google-explicit-constructor`
and `cppcoreguidelines-explicit-constructor`) to ignore C++20
`explicit(false)` and instantiation-dependent `explicit(...)`
expressions on constructors, and to diagnose non-literal `false`
expressions without emitting an invalid `explicit` fix-it.

However, the `CXXConversionDecl` branch still unconditionally warned on
any conversion operator where `isExplicit()` was false and suggested
inserting `explicit `, even when `explicit(false)` or a dependent
`explicit(...)` specifier was already written. Apply the same
`ExplicitSpecifier` inspection to conversion operators so deliberately
implicit C++20 `explicit(false)` and dependent `explicit(...)`
conversion operators are not diagnosed.

Assisted-by: Gemini
DeltaFile
+51-1clang-tools-extra/test/clang-tidy/checkers/misc/explicit-constructor-cxx20.cpp
+16-2clang-tools-extra/clang-tidy/misc/ExplicitConstructorCheck.cpp
+5-0clang-tools-extra/docs/ReleaseNotes.md
+1-0clang-tools-extra/docs/clang-tidy/checks/misc/explicit-constructor.rst
+73-34 files

LLVM/project d7e2583 — clang/include/clang/ScalableStaticAnalysis/Analyses/PointerFlow PointerFlowPairs.h

Replace deprecated PointerUnion::dyn_cast with dyn_cast_if_present
DeltaFile
+2-2clang/include/clang/ScalableStaticAnalysis/Analyses/PointerFlow/PointerFlowPairs.h
+2-21 files

LLVM/project c064c26 — llvm/lib/Transforms/IPO AttributorAttributes.cpp, llvm/test/Transforms/Attributor value-simplify-duplicate-scope.ll

[Attributor] Merge the scopes of potential values with a `|=`

`recurseForValue` merges the scopes of a value with `+=`. If a value appears
more than once in the values of one scope, the sum is not a valid scope.

This PR was assisted by AI but I reviewed all the changes.
DeltaFile
+38-0llvm/test/Transforms/Attributor/value-simplify-duplicate-scope.ll
+2-1llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+40-12 files

LLVM/project fcdd266 — clang/test/Analysis lifetime-end-path-notes.cpp

Update the RUN line.
DeltaFile
+1-5clang/test/Analysis/lifetime-end-path-notes.cpp
+1-51 files

LLVM/project 5630e1a — llvm/lib/CodeGen RegAllocFast.cpp, llvm/test/CodeGen/X86 regallocfast-tied.mir

[RegAllocFast] Keep inline asm uses off a tied physical def's register (#246907)

```
%1:gr32 = MOV32ri 0
INLINEASM ..., def %2, implicit-def $ecx, %0(tied-def 3), %0(tied-def 5), %1
$edx = COPY %0
```

%0 is used after the asm, so both tied uses are copies of it. %1 is
assigned $ecx, and the copy into $ecx overwrites it:

```
renamable $ecx = MOV32ri 0
$eax = COPY $edx
$ecx = COPY $edx
INLINEASM ..., killed renamable $ecx
```

lowerTiedUse frees the tied def's register after inserting the copy. A

    [4 lines not shown]
DeltaFile
+7-5llvm/test/CodeGen/X86/regallocfast-tied.mir
+4-2llvm/lib/CodeGen/RegAllocFast.cpp
+11-72 files

LLVM/project 42dfc4e — llvm/lib/Target/Sparc/AsmParser SparcAsmParser.cpp, llvm/test/MC/Sparc sparc-mem-asi-instructions.s sparc-asm-errors.s

[Sparc][MC] Don't report "unexpected token" after an operand error (#245208)

When an operand failed to parse, parseInstruction always reported
"unexpected token", even when the operand parser had already reported a
more specific error. So most operand errors were followed by a second,
less useful one, e.g.:

```
error: invalid register name
error: unexpected token
```

Make the operand parsers follow the ParseStatus convention, where
Failure means an error was reported and NoMatch means nothing was
consumed and no error was reported, and only report "unexpected token"
for NoMatch:

- parseSparcAsmOperand returns NoMatch for tokens it does not handle,
  and Failure only after an error.

    [19 lines not shown]
DeltaFile
+76-44llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp
+44-11llvm/test/MC/Sparc/sparc-asm-errors.s
+1-2llvm/test/MC/Sparc/Relocations/data-directive-specifier.s
+1-1llvm/test/MC/Sparc/sparc-mem-asi-instructions.s
+122-584 files

LLVM/project f77efa3 — clang/test/Analysis lifetime-end-order.cpp

Add helper to the foor loop test case.
DeltaFile
+3-0clang/test/Analysis/lifetime-end-order.cpp
+3-01 files

LLVM/project d141802 — clang/test/Analysis lifetime-end-order.cpp

Add a simple test case.
DeltaFile
+12-0clang/test/Analysis/lifetime-end-order.cpp
+12-01 files

LLVM/project 6011249 — clang/test/Analysis lifetime-end-order.cpp

Exercise the lifetime end of variables in the inner scope.
DeltaFile
+5-0clang/test/Analysis/lifetime-end-order.cpp
+5-01 files

LLVM/project 845ec2f — clang/test/Analysis nonreturn-destructors-cfg-output.cpp lifetime-end-simple-cfg-output.cpp

Remove cfg-lifetime from RUN lines in test files.
DeltaFile
+4-0clang/test/Analysis/lifetime-end-path-notes.cpp
+1-1clang/test/Analysis/nonreturn-destructors-cfg-output.cpp
+1-1clang/test/Analysis/lifetime-end-simple-cfg-output.cpp
+1-1clang/test/Analysis/lifetime-cfg-output.cpp
+1-1clang/test/Analysis/lifetime-bound.cpp
+1-1clang/test/Analysis/exprwithcleanups-lifetime-marker-cfg.cpp
+9-52 files not shown
+10-78 files

LLVM/project e6399e8 — clang/docs/analyzer checkers.md

remove the cfg-lifetime prerequisite note from the documentation.
DeltaFile
+0-4clang/docs/analyzer/checkers.md
+0-41 files

LLVM/project dca65b1 — clang/test/Analysis cxx20-range-for-cfg.cpp auto-obj-dtors-cfg-output.cpp

Update the CFG output in the test files.
DeltaFile
+3-3clang/test/Analysis/scopes-cfg-output.cpp
+4-1clang/test/Analysis/cfg-range-for-init-order.cpp
+2-2clang/test/Analysis/cxx20-range-for-cfg.cpp
+2-2clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
+11-84 files

LLVM/project 6c4287a — clang/test/Analysis lifetime-end-order.cpp

Update the test file.
DeltaFile
+39-33clang/test/Analysis/lifetime-end-order.cpp
+39-331 files

LLVM/project 0868aeb — clang/test/Analysis end-function-return-stmt.cpp lifetime-end-order.cpp

[analyzer] Turn on CFGLifetimeEnds elements by default
DeltaFile
+68-0clang/test/Analysis/lifetime-end-order.cpp
+2-1clang/test/Analysis/end-function-return-stmt.cpp
+70-12 files

LLVM/project 4c8dd77 — clang/test/Analysis temp-obj-dtors-cfg-output.cpp cfg-rich-constructors.cpp, clang/test/Analysis/Inputs/expected-plists retain-release.m.objcpp.plist retain-release.m.objc.plist

[analyzer] Enable CFG::LifetimeEnd elements by default
DeltaFile
+310-185clang/test/Analysis/scopes-cfg-output.cpp
+306-185clang/test/Analysis/auto-obj-dtors-cfg-output.cpp
+206-106clang/test/Analysis/cfg-rich-constructors.cpp
+142-89clang/test/Analysis/temp-obj-dtors-cfg-output.cpp
+36-11clang/test/Analysis/Inputs/expected-plists/retain-release.m.objcpp.plist
+36-11clang/test/Analysis/Inputs/expected-plists/retain-release.m.objc.plist
+1,036-58719 files not shown
+1,156-63225 files

LLVM/project 3649f70 — llvm/lib/Transforms/Instrumentation MemorySanitizer.cpp, llvm/test/Instrumentation/MemorySanitizer masked-store-load.ll

[msan][test] Show masked_store with zero mask incorrectly sets origin (#246161)

handleMaskedStore() unconditionally sets the origin, even in cases where
the mask ends up being zero (as evaluated at compile-time or runtime)
i.e., no bytes were stored. This PR adds a regression test case and a
TODO in the MSan instrumentation pass.

---------

Co-authored-by: Vitaly Buka <vitalybuka at google.com>
DeltaFile
+67-0llvm/test/Instrumentation/MemorySanitizer/masked-store-load.ll
+3-0llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+70-02 files

LLVM/project f5492c2 — compiler-rt/test/asan/TestCases/Linux dlopen-mixed-c-cxx.c

[ASan][test] Use %run in dlopen-mixed-c-cxx.c (#246215)

The test ran its binary directly, so it failed on targets that need an
emulator or a remote device.

Assisted-by: Claude Code
DeltaFile
+1-1compiler-rt/test/asan/TestCases/Linux/dlopen-mixed-c-cxx.c
+1-11 files

LLVM/project 14f5342 — clang/test/Analysis lifetime-end-path-notes.cpp

Update the test file.
DeltaFile
+6-6clang/test/Analysis/lifetime-end-path-notes.cpp
+6-61 files

LLVM/project d2ca9de — clang/lib/ScalableStaticAnalysis/Analyses/PointerFlow PointerFlowPairs.cpp

fix clang-format
DeltaFile
+4-2clang/lib/ScalableStaticAnalysis/Analyses/PointerFlow/PointerFlowPairs.cpp
+4-21 files

LLVM/project f0a6223 — libc/test/src/math/exhaustive cos.wc sin.wc, llvm/test/CodeGen/AMDGPU amdgcn.bitcast.960bit.ll frem.ll

Merge remote-tracking branch 'origin/main' into users/ziqingluo/PR-187125348-1
DeltaFile
+1,091,085-0libc/test/src/math/exhaustive/sin.wc
+1,090,178-0libc/test/src/math/exhaustive/cos.wc
+118,393-140,328llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+39,195-46,216llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.512bit.ll
+32,671-17,355llvm/test/CodeGen/AMDGPU/frem.ll
+21,244-27,281llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.960bit.ll
+2,392,766-231,18046,930 files not shown
+6,686,330-1,986,61246,936 files

LLVM/project bf7e013 — clang/include/clang/StaticAnalyzer/Core/PathSensitive ProgramState.h, clang/lib/StaticAnalyzer/Core RangeConstraintManager.cpp

[analyzer][NFC] Memoize inferred symbol ranges per ProgramState

The inferred range of a symbol is a pure function of the ProgramState, yet
simplifying an SVal queries the range of every sub-expression again and again
against the same state. Memoize the ranges for the most recently queried
state in RangeConstraintManager (a DenseMap<SymbolRef, RangeSet> plus the
state it belongs to; it is cleared when a different state is queried).
SymbolicRangeInferrer takes the cache as an optional, nullable pointer; the
static inferRange() call sites pass none (a stack-local cache there never got
a lookup: 0 hits over 76406 instances on the corpus below).

Why this is safe: the cache holds a ProgramStateRef, so the state stays alive
and its address cannot be recycled for a different state while it is the
cache key. To make that hold at destruction time, ConstraintMgr is now
declared last in ProgramStateManager and is destroyed first, while the state
set, the allocator and the GDM contexts are still alive. ~ProgramStateManager
is declared out of line because the defaulted one needs the complete types
used by the members. Behavior is unchanged: the diagnostics are
byte-identical on every input below, and check-clang-analysis passes

    [72 lines not shown]
DeltaFile
+38-12clang/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp
+5-1clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h
+43-132 files

LLVM/project 5016aa4 — mlir/lib/Target/SPIRV/Deserialization Deserializer.cpp, mlir/lib/Target/SPIRV/Serialization Serializer.cpp

[mlir][SPIR-V] Support Centroid and NonUniform decorations (#245443)

Adds serialization and deserialization support for the `Centroid` and
`NonUniform` SPIR-V unit decorations (both enums are already defined in
`SPIRVBase.td`).

Assisted by Google Antigravity Gemini 4.0 Neon Model
DeltaFile
+17-0mlir/test/Target/SPIRV/decorations.mlir
+2-0mlir/lib/Target/SPIRV/Serialization/Serializer.cpp
+2-0mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp
+21-03 files

LLVM/project 1892526 — mlir/include/mlir/Dialect/SPIRV/IR SPIRVGLOps.td, mlir/test/Dialect/SPIRV/IR gl-ops.mlir

[mlir][SPIR-V] Add spirv.GL.Refract op (#245349)

Adds the `spirv.GL.Refract` op corresponding to `GLSL.std.450` extended
instruction `Refract` (opcode 72).

Per the `GLSL.std.450` specification:
- `I`, `N`, and the result must all have the same floating-point scalar
or vector type.
- `eta` must be a floating-point scalar.

Serialization and deserialization are automatically generated via
`SPIRV_GLOp`.

Assisted with Google Antigravity Gemini 4 Neon model
DeltaFile
+56-0mlir/test/Dialect/SPIRV/IR/gl-ops.mlir
+45-0mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGLOps.td
+4-0mlir/test/Target/SPIRV/gl-ops.mlir
+105-03 files

LLVM/project 04826db — mlir/include/mlir/Dialect/SPIRV/IR SPIRVBase.td SPIRVMemoryOps.td, mlir/lib/Dialect/SPIRV/IR MemoryOps.cpp

[mlir][SPIR-V] Add spirv.ArrayLength op (#245462)

This PR adds support for  SPIR-V's `OpArrayLength` (opcode 68).

What changed:

Op definition & serialization: Registered `OpArrayLength` in
`SPIRVBase.td` and defined `SPIRV_ArrayLengthOp` in `SPIRVMemoryOps.td`
with binary serialization and deserialization.

Verification: Implemented `ArrayLengthOp::verify()` to ensure the
structure operand points to a struct ending in a RuntimeArrayType, and
that array_member correctly indexes that final member.

Assisted with Google Antigravity Gemini 4 Neon model
DeltaFile
+47-0mlir/test/Dialect/SPIRV/IR/memory-ops.mlir
+38-0mlir/include/mlir/Dialect/SPIRV/IR/SPIRVMemoryOps.td
+15-1mlir/test/Target/SPIRV/memory-ops.mlir
+16-0mlir/lib/Dialect/SPIRV/IR/MemoryOps.cpp
+2-1mlir/include/mlir/Dialect/SPIRV/IR/SPIRVBase.td
+118-25 files

LLVM/project 7c65fb7 — llvm/lib/Target/Hexagon HexagonDepInstrInfo.td HexagonDepIICHVX.td, llvm/test/CodeGen/AMDGPU memintrinsic-unroll.ll

Rebase, address comments, improvements

Created using spr 2.0.0-beta.1
DeltaFile
+15,373-16,115llvm/lib/Target/Hexagon/HexagonDepIICScalar.td
+7,746-8,018llvm/lib/Target/Hexagon/HexagonDepIICHVX.td
+4,870-4,906llvm/test/CodeGen/AMDGPU/memintrinsic-unroll.ll
+11-7,510mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+3,141-3,182llvm/test/CodeGen/RISCV/clmul.ll
+2,907-2,931llvm/lib/Target/Hexagon/HexagonDepInstrInfo.td
+34,048-42,66211,169 files not shown
+523,858-384,64811,175 files

LLVM/project feb62bb — lld/MachO Symbols.h Relocations.h

[lld][MachO] Avoid redundant work in Writer::scanRelocations()

During relocation scanning, `Writer::scanRelocations()` looks up
`target->getRelocAttrs(r.type)` up to three times per symbol relocation
(in `scanRelocations()`, `validateSymbolRelocation()`, and
`prepareSymbolRelocation()`), tests `r.referent` twice for symbol
referents, and makes an out-of-line call to `validateSymbolRelocation()`
on every symbol relocation even though it only rejects two rare
thread-local-variable cases.

Move `validateSymbolRelocation()` (whose only caller is
`Writer::scanRelocations()`) into `Writer.cpp`, split the rare TLV
validation logic into a `LLVM_ATTRIBUTE_NOINLINE` helper, and mark
`DylibSymbol` `final` so `dysym->isTlv()` avoids a virtual call on the
fast path. Fetch `RelocAttrs` once per relocation, pass it to
`validateSymbolRelocation()` and `prepareSymbolRelocation()`, hoist
loop-invariant `target->relocAttrs` and `config->emitChainedFixups`, and
dispatch on `r.referent` once for non-subtractor relocations.
DeltaFile
+74-12lld/MachO/Writer.cpp
+0-47lld/MachO/Relocations.cpp
+6-1lld/MachO/Target.h
+0-3lld/MachO/Relocations.h
+1-1lld/MachO/Symbols.h
+81-645 files

LLVM/project 2510c11 — llvm/lib/Target/AArch64 AArch64TargetTransformInfo.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 non-power-of-2-with-adjusted-gathers.ll store-chain-split-wide-stored-values.ll

[𝘀𝗽𝗿] initial version

Created using spr 2.0.0-beta.1
DeltaFile
+53-120llvm/test/Transforms/SLPVectorizer/AArch64/or-reduction-byte-pack.ll
+53-57llvm/test/Transforms/SLPVectorizer/AArch64/reassoc-copyable-sched-deps.ll
+57-21llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+24-23llvm/test/Transforms/SLPVectorizer/AArch64/loop-accumulator-reduction.ll
+14-32llvm/test/Transforms/SLPVectorizer/AArch64/store-chain-split-wide-stored-values.ll
+22-22llvm/test/Transforms/SLPVectorizer/AArch64/non-power-of-2-with-adjusted-gathers.ll
+223-2756 files not shown
+288-32412 files

LLVM/project 9b1287d — compiler-rt/lib/sanitizer_common sanitizer_fuchsia.cpp sanitizer_suppressions.cpp, compiler-rt/test/ubsan/TestCases/Integer suppressions.cpp

[sanitizer] Ensure suppression files' buffer is null terminated. (#236826)

Function ReadFileToBuffer does not terminate string 'file_contents'.
SuppressionContext::Parse internal_strcspn expects a null-terminated
string.
The issue was found through static analysis.
DeltaFile
+5-8compiler-rt/lib/sanitizer_common/sanitizer_suppressions.cpp
+8-0compiler-rt/lib/sanitizer_common/sanitizer_fuchsia.cpp
+5-0compiler-rt/test/ubsan/TestCases/Integer/suppressions.cpp
+18-83 files

LLVM/project e2ef902 — clang/lib/StaticAnalyzer/Core ExplodedGraph.cpp, clang/test/Analysis lifetime-end-path-notes.cpp

Add changes back correctly.
DeltaFile
+1-2clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp
+2-1clang/test/Analysis/lifetime-end-path-notes.cpp
+3-32 files