LLVM/project 6f9f7f1 — clang/include/clang/CodeGen CGFunctionInfo.h, clang/lib/CodeGen CGCall.h CGCall.cpp

[Clang][CUDA] Preserve addresses of scalar grid-constant parameters (#231567)

Partially fixes #230158.

Clang currently passes scalar `__grid_constant__` parameters by value,
so taking their addresses creates local copies instead of referring to
the original kernel parameters.

This patch passes scalar and vector grid-constant parameters as `byval`
pointers, avoids unnecessary local copies, and updates `CGFunctionInfo`
to account for the ABI differences.

Host-side kernel argument handling remains unchanged.

Added CodeGen tests for scalar, vector, and aggregate parameters.

`__isGridConstant()` is not addressed by this patch.
DeltaFile
+220-0clang/test/CodeGenCUDA/grid-constant-args.cu
+62-20clang/lib/CodeGen/CGCall.cpp
+26-3clang/include/clang/CodeGen/CGFunctionInfo.h
+15-11clang/lib/CodeGen/Targets/NVPTX.cpp
+4-1clang/lib/CodeGen/CGCall.h
+1-2clang/test/CodeGenCUDA/grid-constant.cu
+328-371 files not shown
+329-387 files

LLVM/project 395d1ad — clang/test/SemaCXX deduced-return-type-cxx14.cpp

[Clang] Add regression test for enum class with dependent decltype bottom type (#247197)

### What this patch does

Adds a regression test for the pattern reported in #114124: an `enum
class`
whose underlying type is deduced from a member function call
(`enum class e : decltype(f())`), where `f` is a member of the class
that is
currently being defined, so its return type has not been deduced yet.

The test checks that the code is rejected with

error: function 'f' with deduced return type cannot be used before it is
defined
    note: 'f' declared here

instead of crashing in `ASTContext::getTypeInfoImpl`, which is what
clang 18

    [22 lines not shown]
DeltaFile
+13-0clang/test/SemaCXX/deduced-return-type-cxx14.cpp
+13-01 files

LLVM/project 2489ee3 — mlir/include/mlir/Analysis AnalysisInstrumentation.h AnalysisManager.h, mlir/include/mlir/Pass AnalysisManager.h

[mlir] Split analysis management from the pass library

Let analysis clients own a cache or use one supplied by a pass. Send cache construction events through AnalysisInstrumentation and forward the pass instrumentor through the executor for pipeline and pass callbacks.
DeltaFile
+402-0mlir/include/mlir/Analysis/AnalysisManager.h
+1-396mlir/include/mlir/Pass/AnalysisManager.h
+17-84mlir/lib/Pass/Pass.cpp
+77-0mlir/lib/Analysis/AnalysisManager.cpp
+26-0mlir/include/mlir/Analysis/AnalysisInstrumentation.h
+9-9mlir/unittests/Pass/AnalysisManagerTest.cpp
+532-4898 files not shown
+560-50314 files

LLVM/project a57a666 — mlir/include/mlir/Interfaces SideEffectInterfaces.h SideEffectInterfaces.td, mlir/lib/Interfaces SideEffectInterfaces.cpp

[mlir] Pass analyses to speculation hooks and LICM

Let ConditionallySpeculatable models implement either the simple hook or one that accepts a nullable AnalysisManager. Forward the manager through recursive purity queries and loop-invariant code motion. Exercise the simple external model through both entry points.
DeltaFile
+26-8mlir/include/mlir/Interfaces/SideEffectInterfaces.td
+21-0mlir/unittests/Interfaces/SideEffectInterfacesTest.cpp
+12-8mlir/lib/Transforms/Utils/LoopInvariantCodeMotionUtils.cpp
+11-1mlir/unittests/Interfaces/CMakeLists.txt
+5-5mlir/lib/Interfaces/SideEffectInterfaces.cpp
+5-5mlir/include/mlir/Interfaces/SideEffectInterfaces.h
+80-278 files not shown
+106-4114 files

LLVM/project df6a944 — lldb/source/Host/common XMLParser.cpp

make the comments in line
DeltaFile
+38-33lldb/source/Host/common/XMLParser.cpp
+38-331 files

LLVM/project 0f4d84e — llvm/include/llvm LinkAllPasses.h InitializePasses.h, llvm/include/llvm/Analysis Passes.h DependenceAnalysis.h

[DA] Remove the unused legacy DependenceAnalysisWrapperPass (NFC) (#247164)

Nothing requests the legacy pass any more; all users of dependence
information use the new pass manager's DependenceAnalysis.

PR: https://github.com/llvm/llvm-project/pull/247164
DeltaFile
+0-44llvm/lib/Analysis/DependenceAnalysis.cpp
+0-20llvm/include/llvm/Analysis/DependenceAnalysis.h
+0-7llvm/include/llvm/Analysis/Passes.h
+0-1llvm/lib/Analysis/Analysis.cpp
+0-1llvm/include/llvm/LinkAllPasses.h
+0-1llvm/include/llvm/InitializePasses.h
+0-746 files

LLVM/project 1ec1b4d — llvm/lib/Target/X86 X86FastISel.cpp, llvm/test/CodeGen/X86 fast-isel-bitcast-addr.ll

[X86][FastISel] Don't look through bitcasts when forming an address (#242973)

Fixes #242844

`X86SelectAddress` and `X86SelectCallAddress` looked through any
bitcast, so a bitcast that changes the register class (`bitcast double
%x to i64` feeding an `inttoptr`) put an XMM register in the address.
With opaque pointers the only bitcast still worth folding here is a
no-op one, which `selectBitCast` already handles, so remove the two
cases.
DeltaFile
+69-0llvm/test/CodeGen/X86/fast-isel-bitcast-addr.ll
+0-10llvm/lib/Target/X86/X86FastISel.cpp
+69-102 files

LLVM/project b0840a4 — llvm/lib/IR Module.cpp

clang-format
DeltaFile
+0-1llvm/lib/IR/Module.cpp
+0-11 files

LLVM/project f07110e — llvm/include/llvm/Analysis ScalarEvolutionExpressions.h ScalarEvolution.h, llvm/lib/Analysis ScalarEvolution.cpp

[SCEV] Move getFlagsToPropagate to SCEVUse (NFC). (#247117)

This removes one level of indirection and hasNo(Un)SignedWrap helpers,
replacing them with the existing any(Op.getNoWrapFlags()) idiom used
throughout SCEV.

In the future patches, we will likely need to check more properties of
the use to determine what flags are safe to propagate.

PR: https://github.com/llvm/llvm-project/pull/247117
DeltaFile
+4-21llvm/include/llvm/Analysis/ScalarEvolution.h
+12-0llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h
+4-6llvm/lib/Analysis/ScalarEvolution.cpp
+20-273 files

LLVM/project 0128353 — llvm/include/llvm/IR DebugLocConversion.h Module.h, llvm/lib/IR LLVMContextImpl.h LLVMContext.cpp

Move storage to Module, use IntrusiveRefCntPtr
DeltaFile
+0-12llvm/lib/IR/LLVMContextImpl.cpp
+10-0llvm/lib/IR/Module.cpp
+0-6llvm/lib/IR/LLVMContext.cpp
+3-3llvm/include/llvm/IR/DebugLocConversion.h
+6-0llvm/include/llvm/IR/Module.h
+0-5llvm/lib/IR/LLVMContextImpl.h
+19-262 files not shown
+21-328 files

LLVM/project 9eb4822 — mlir/include/mlir/Dialect/SCF/Utils Utils.h, mlir/lib/Dialect/SCF/Utils Utils.cpp

[mlir][scf] Reduce the values of all unrolled iterations of scf.parallel (#240948)

Example:
```mlir
%r = scf.parallel (%i) = (%c0) to (%c8) step (%c1) init (%init) -> f32 {
  %v = memref.load %a[%i] : memref<8xf32>
  scf.reduce(%v : f32) {
  ^bb0(%lhs: f32, %rhs: f32):
    %s = arith.addf %lhs, %rhs : f32
    scf.reduce.return %s : f32
  }
}
```

In this code, parallelLoopUnrollByFactors() with a factor of 2 clones
the load, but scf.reduce kept only the value of the last copy, so the
loop summed every other element.

Fix: combine the values of all the copies with the reduction function

    [2 lines not shown]
DeltaFile
+166-0mlir/test/Dialect/SCF/parallel-loop-unroll.mlir
+49-4mlir/lib/Dialect/SCF/Utils/Utils.cpp
+15-2mlir/test/lib/Dialect/SCF/TestParallelLoopUnrolling.cpp
+9-4mlir/include/mlir/Dialect/SCF/Utils/Utils.h
+239-104 files

LLVM/project 8cb663c — llvm/lib/CodeGen ModuloSchedule.cpp, llvm/test/CodeGen/Hexagon swp-phi-loop-invariant-backedge.mir

[MachinePipeliner] Fix PHIs with loop-invariant backedge

Assisted-By: Gemini
DeltaFile
+12-6llvm/lib/CodeGen/ModuloSchedule.cpp
+5-4llvm/test/CodeGen/Hexagon/swp-phi-loop-invariant-backedge.mir
+17-102 files

LLVM/project 6072e27 — llvm/lib/Target/AArch64 AArch64InstrInfo.cpp

Update CFIInstBuilder names to better reflect their function
DeltaFile
+8-7llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+8-71 files

LLVM/project 546ee95 — llvm/test/CodeGen/Hexagon swp-phi-loop-invariant-backedge.mir

[Hexagon] [Pipeliner] precommit repro test (#238600)

Assisted-By: Gemini
DeltaFile
+72-0llvm/test/CodeGen/Hexagon/swp-phi-loop-invariant-backedge.mir
+72-01 files

LLVM/project 6865957 — clang/lib/StaticAnalyzer/Checkers IvarInvalidationChecker.cpp

[analyzer][NFC] Use llvm::StringLiteral (#247207)

Addresses
https://github.com/llvm/llvm-project/pull/246864#discussion_r4740782234
DeltaFile
+4-3clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp
+4-31 files

LLVM/project ad1ec5a — llvm/test/Transforms/AtomicExpand/Xtensa atomicrmw-expand.ll

[Xtensa] Regenerate test checks after 128ff090fb9a (#241617) (#247186)

Fix atomic test for Xtensa backend after improvements in
RuntimeLibcalls.
DeltaFile
+220-220llvm/test/Transforms/AtomicExpand/Xtensa/atomicrmw-expand.ll
+220-2201 files

LLVM/project 83ac634 — clang/docs ReleaseNotes.md, clang/lib/Sema SemaTemplateDeduction.cpp

[Clang] Ensure NTTP decls are traversed when building parameter mapping (#246548)

They were not traversed when their types were dependent, hence we were
not checking them correctly.

Mirrors fixes in 92d8313

Fixes https://github.com/llvm/llvm-project/issues/246501
DeltaFile
+23-0clang/test/SemaTemplate/concepts.cpp
+6-0clang/lib/Sema/SemaTemplateDeduction.cpp
+2-0clang/docs/ReleaseNotes.md
+31-03 files

LLVM/project 9f1d88f — llvm/include/llvm/CodeGen TargetLoweringObjectFileImpl.h, llvm/lib/CodeGen TargetLoweringObjectFileImpl.cpp

[SystemZ] [HLASM] Set .&ppa2 alias (#246121)

'.' and '&' are not allowed in HLASM symbol names, but `.&ppa2` is
currently generated for the PPA2 section. Use ALIAS to fix the PPA2
section naming.
DeltaFile
+3-2llvm/test/CodeGen/SystemZ/zos-ppa2.ll
+4-1llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+2-2llvm/test/CodeGen/SystemZ/zos-section-2.ll
+2-1llvm/lib/MC/MCObjectFileInfo.cpp
+1-1llvm/test/CodeGen/SystemZ/zos-section-1.ll
+1-0llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h
+13-76 files

LLVM/project 260b7ef — mlir/lib/Dialect/LLVMIR/IR NVVMTcgen05Ops.cpp

[mlir][nvvm] Add unreachable for invalid enum (#247190)

Silence compiler warning by explicitly rejecting the invalid tcgen05.mma
enum values.
DeltaFile
+1-0mlir/lib/Dialect/LLVMIR/IR/NVVMTcgen05Ops.cpp
+1-01 files

LLVM/project ff59ac5 — llvm/lib/Target/Hexagon HexagonDepTimingClasses.h HexagonDepInstrInfo.td, llvm/test/CodeGen/Hexagon misched-hlx-tc2-conversions.mir hlx-timings.test

[Hexagon] Update HLX instruction timings (#246386)

- Move the existing HLX arithmetic timing classes (absdiff, mpa, mpy,
and shra) from TC1 to TC2.
- Add dedicated HLX timing classes for abs, add, and mux operations, and
assign them to the related abs, assignment, conversion, logical,
comparison, and min/max instructions. These previously shared scalar
timing classes.
- Update the HLX itineraries for every architecture version with the new
operand cycles and execution slots, so that the disassembler can decode
HLX packets when no V85 CPU is specified.

Fixes #246424

Signed-off-by: Rishabh Bali <rbali at qti.qualcomm.com>
DeltaFile
+436-144llvm/lib/Target/Hexagon/HexagonDepIICScalar.td
+48-48llvm/lib/Target/Hexagon/HexagonDepInstrInfo.td
+80-0llvm/test/CodeGen/Hexagon/hlx-timings.test
+44-0llvm/test/CodeGen/Hexagon/misched-hlx-tc2-conversions.mir
+8-4llvm/lib/Target/Hexagon/HexagonDepTimingClasses.h
+616-1965 files

LLVM/project e281331 — clang/lib/StaticAnalyzer/Checkers BasicObjCFoundationChecks.cpp NullabilityChecker.cpp, clang/lib/StaticAnalyzer/Checkers/UninitializedObject UninitializedObjectChecker.cpp

[analyzer][NFC] Use more llvm range algorithms (#246877)

Assisted-By: Claude Code
DeltaFile
+10-17clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp
+6-13clang/lib/StaticAnalyzer/Checkers/UninitializedObject/UninitializedObjectChecker.cpp
+7-7clang/lib/StaticAnalyzer/Checkers/LLVMConventionsChecker.cpp
+5-6clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp
+7-4clang/lib/StaticAnalyzer/Checkers/MIGChecker.cpp
+4-6clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp
+39-533 files not shown
+47-699 files

LLVM/project 3b27b03 — libsycl/docs index.md, libsycl/include/sycl/__impl/info device.hpp

[libsycl] Extend supported device info queries (#244699)

Enables all device information queries that currently have a liboffload
counterpart. Caching will be done as a follow up change.

Assisted-by: Claude Code
DeltaFile
+269-0libsycl/unittests/device/device_info.cpp
+160-0libsycl/test/basic/device_info.cpp
+91-11libsycl/src/detail/device_impl.hpp
+61-16libsycl/include/sycl/__impl/info/device.hpp
+54-1libsycl/docs/index.md
+37-0libsycl/src/device.cpp
+672-284 files not shown
+719-2810 files

LLVM/project c9d8ddf — llvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange convergent.ll

[LoopInterchange] Don't interchange loops with convergent calls (#241912)

Interchange moves the outer loop header and latch into the new inner
loop, so a convergent call there ends up inside both loops. That can
change the set of threads that execute it together:

```c
for (i = 0; i < 128; ++i) {
  m = subgroup_reduce_add(x);   // runs in all threads
  for (j = 0; j < n; ++j)       // n differs between threads
    A[j][i] = m;
}
```
After interchange the reduction is inside the loop over j. For j >= 1
only the threads with n > j run it, so it sums over fewer threads and
A[j][i] gets a different value.

Reject the interchange if either of the two loops contains a convergent
call. This is conservative: it also rejects convergent calls in the

    [2 lines not shown]
DeltaFile
+113-0llvm/test/Transforms/LoopInterchange/convergent.ll
+13-0llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+126-02 files

LLVM/project 60969d5 — llvm/lib/Transforms/Scalar GVN.cpp

[GVN] Delete pointer cast traversal in collecting invariant_group. NFC (#246940)

Typed ptr is retired in previous LLVM version. Adding this to queue
performs no-op in here. Drop this directly.
DeltaFile
+13-32llvm/lib/Transforms/Scalar/GVN.cpp
+13-321 files

LLVM/project 0fb1dd4 — clang/lib/CodeGen CGBuiltin.cpp, clang/lib/Sema SemaType.cpp SemaExpr.cpp

[OpenCL][Clang] Add initial support for cooperative matrix extension (#221328)

Add initial frontend support for OpenCL cooperative matrix types and builtins.

Represent cooperative matrix types in LLVM IR using TargetExtType rather
than ordinary matrix or aggregate types. Add Sema handling to recognize
cooperative matrix declarations and validate their type parameters,
uses, and builtin calls.

Lower cooperative matrix builtins through the OpenCL CodeGen path,
including
emitting the corresponding target-specific operations and converting
their arguments to the expected types.

Document the `coop_mat` attribute and note that the cooperative matrix
extension specification is experimental and still in draft, so the
implementation and its interfaces may change.

The corresponding specification document is under review in OpenCL-Docs

    [10 lines not shown]
DeltaFile
+345-0clang/lib/CodeGen/CGBuiltin.cpp
+304-0clang/lib/Sema/SemaChecking.cpp
+223-0clang/test/SemaOpenCL/coop-mat-diagnostics.cl
+219-1clang/lib/Sema/SemaExpr.cpp
+169-0clang/test/CodeGenOpenCL/coop-mat.cl
+151-0clang/lib/Sema/SemaType.cpp
+1,411-163 files not shown
+2,574-369 files

LLVM/project 2661aa3 — mlir/include/mlir/Dialect/SPIRV/IR SPIRVStructureOps.td, mlir/lib/Dialect/SPIRV/IR SPIRVOps.cpp

[mlir][SPIR-V] Support untyped pointers in GlobalVariable (#246156)

Add an optional data_type for the object type and serialize module scope
variables as OpUntypedVariableKHR
DeltaFile
+61-2mlir/test/Dialect/SPIRV/IR/structure-ops.mlir
+47-10mlir/lib/Dialect/SPIRV/IR/SPIRVOps.cpp
+37-15mlir/lib/Target/SPIRV/Deserialization/Deserializer.cpp
+24-0mlir/test/Target/SPIRV/untyped-pointers.mlir
+22-0mlir/test/Dialect/SPIRV/Transforms/vce-deduction.mlir
+14-5mlir/include/mlir/Dialect/SPIRV/IR/SPIRVStructureOps.td
+205-3211 files not shown
+297-4717 files

LLVM/project f92ab23 — llvm/lib/Transforms/IPO WholeProgramDevirt.cpp

Drop the guard on the fallback branch weights from #237377
DeltaFile
+1-2llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
+1-21 files

LLVM/project 859e883 — libsycl/unittests/mock helpers.hpp mock.cpp, libsycl/unittests/platform get_platforms.cpp

[libsycl] Fix unit-test mock after olCreateContext const change (#247208)

PR https://github.com/llvm/llvm-project/pull/244215 made the `Devices`
parameter of `olCreateContext` a
`const ol_device_handle_t *`. The libsycl unit-test mock still defined
the function with a non-const pointer, which declares a separate C++
overload instead of the `extern "C"` entry point, so the unit tests
failed to link with an undefined `olCreateContext`.

Update the mock definition, the gmock method and the test lambdas to
the new signature, and stop casting away const in the default action.

Assisted-by: Claude
DeltaFile
+4-2libsycl/unittests/mock/helpers.cpp
+2-1libsycl/unittests/mock/mock.cpp
+1-1libsycl/unittests/platform/get_platforms.cpp
+1-1libsycl/unittests/mock/helpers.hpp
+8-54 files

LLVM/project 987b772 — mlir/lib/Dialect/Arith/Transforms IntRangeOptimizations.cpp, mlir/test/Dialect/Arith int-range-narrowing.mlir

[mlir][arith] Narrow arith.select via int ranges

Add a `NarrowSelect` pattern to `populateIntRangeNarrowingPatterns` so
`arith-int-range-narrowing` narrows `arith.select` operations over
signless integer or index scalars, vectors, and tensors when both arms
and the result fit in a narrower target bitwidth under a common signed
or unsigned extension.

`NarrowElementwise` requires all operands to share the result type and
therefore skips `arith.select` due to its `i1` condition operand,
leaving redundant widen/truncate pairs around selects inside narrowed
arithmetic chains.

Assisted-by: gemini-4-carbon
DeltaFile
+96-0mlir/test/Dialect/Arith/int-range-narrowing.mlir
+66-2mlir/lib/Dialect/Arith/Transforms/IntRangeOptimizations.cpp
+162-22 files

LLVM/project 290ef63 — mlir/include/mlir/Interfaces InferIntRangeInterface.h, mlir/lib/Dialect/Arith/Transforms IntRangeOptimizations.cpp

[mlir][IntRange] Unwrap nested shaped value types

Update `ConstantIntRanges::getStorageBitwidth` to recursively unwrap
nested `ShapedType` containers that carry the `ValueSemantics` trait
(such as `tensor<...xvector<...xi32>>`), returning 0 for shaped types
without value semantics (such as `memref`).

This ensures a tensor type and its element type always agree on storage
bitwidth, enabling integer range inference to propagate through
`tensor.extract`, `tensor.from_elements`, `tensor.insert`, and
`tensor.splat` on tensors of integer vectors and removing the
`!isIntOrIndex()` workarounds introduced in 2c7efd6f6e1b.

Tighten `IntRangeOptimizations` to reject types with zero storage
bitwidth during constant materialization and to skip elementwise
narrowing when the immediate element type is not an integer or index.

Assisted-by: gemini-4-carbon
DeltaFile
+49-13mlir/test/Dialect/Tensor/int-range-inference.mlir
+36-0mlir/unittests/Interfaces/InferIntRangeInterfaceTest.cpp
+19-6mlir/lib/Dialect/Arith/Transforms/IntRangeOptimizations.cpp
+2-18mlir/lib/Dialect/Tensor/IR/TensorOps.cpp
+16-0mlir/test/Dialect/Arith/int-range-narrowing.mlir
+5-3mlir/include/mlir/Interfaces/InferIntRangeInterface.h
+127-401 files not shown
+132-427 files