LLVM/project c800efaclang/docs ReleaseNotes.rst, clang/lib/Sema SemaTemplateDeduction.cpp

[clang] create local instantiation scope for matching template template parameters

This fixes a bug where a partial substitution from the enclosing scope
is used to prepopulate an unrelated template argument deduction.

Fixes #181166
DeltaFile
+5-3clang/docs/ReleaseNotes.rst
+7-0clang/test/SemaTemplate/temp_arg_template_p0522.cpp
+2-0clang/lib/Sema/SemaTemplateDeduction.cpp
+14-33 files

LLVM/project 37538belldb/source/Plugins/SymbolFile/DWARF DWARFASTParserClang.cpp DWARFASTParserClang.h

[lldb][DWARFASTParserClang][NFC] Make ParsedDWARFTypeAttributes parameter a const-ref (#183024)

In https://github.com/llvm/llvm-project/pull/182956 we stopped using
access specifiers from DWARF for most Clang decls we create. This
parameter no longer needs to be modified and we can make it a
`const-ref`.
DeltaFile
+3-4lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+1-1lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h
+4-52 files

LLVM/project 9a42d3amlir/include/mlir/Dialect/XeGPU/Transforms Transforms.h, mlir/include/mlir/Dialect/XeGPU/Utils XeGPUUtils.h

[MLIR][XeGPU] Enable one-step subgroup distribution of cross-lane reduction to shuffle op (#182698)

This PR simplifies the current two-step distribution implementation for
vector.multi-reduction op on cross-lane reduction. Instead of first
lowering to vector.reduction op and further distribution, it directly
lowers to shuffles op. This removes the complexity of setting xegpu
layout for the intermediate operations (extract/insert/reduction)
generated on the fly during subgroup distribution pass.
DeltaFile
+102-73mlir/test/Dialect/XeGPU/sg-to-wi-experimental-unit.mlir
+24-71mlir/lib/Dialect/XeGPU/Transforms/XeGPUSgToWiDistributeExperimental.cpp
+54-0mlir/lib/Dialect/XeGPU/Utils/XeGPUUtils.cpp
+0-18mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+11-0mlir/include/mlir/Dialect/XeGPU/Utils/XeGPUUtils.h
+0-8mlir/include/mlir/Dialect/XeGPU/Transforms/Transforms.h
+191-1706 files

LLVM/project abcbe83

retrigger checks
DeltaFile
+0-00 files

LLVM/project 73228aallvm/include/llvm/Transforms/Utils ValueMapper.h, llvm/lib/Target/AMDGPU AMDGPULowerBufferFatPointers.cpp

[NFC] Thread `DataLayout` through helper function signatures for aggregate construction

Add `const DataLayout *DL` parameter to helper functions and classes that
construct aggregate constants but previously had no access to `DataLayout`. This
is the final preparatory step before the `ConstantPointerNull` semantic change,
ensuring aggregate collapse-to-`ConstantAggregateZero` checks have `DataLayout`
awareness in all remaining call sites.
DeltaFile
+28-17llvm/include/llvm/Transforms/Utils/ValueMapper.h
+19-11llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp
+12-9llvm/lib/Transforms/Utils/ValueMapper.cpp
+7-5llvm/lib/Target/DirectX/DXILDataScalarization.cpp
+6-6llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp
+4-4llvm/lib/Target/DirectX/DXILFlattenArrays.cpp
+76-522 files not shown
+81-548 files

LLVM/project eae5062llvm/lib/IR Constants.cpp ConstantFold.cpp, llvm/test/Transforms/InferAddressSpaces/AMDGPU ptrmask.ll icmp.ll

WIP
DeltaFile
+66-2llvm/lib/IR/Constants.cpp
+37-14llvm/lib/IR/ConstantFold.cpp
+5-11llvm/test/Transforms/InferAddressSpaces/AMDGPU/ptrmask.ll
+7-7llvm/test/Transforms/InstCombine/gep-inbounds-null.ll
+9-0llvm/lib/IR/AsmWriter.cpp
+3-5llvm/test/Transforms/InferAddressSpaces/AMDGPU/icmp.ll
+127-3913 files not shown
+168-6219 files

LLVM/project 3225f7aclang/lib/CodeGen MicrosoftCXXABI.cpp CGExprConstant.cpp, llvm/lib/Analysis ConstantFolding.cpp

[NFC] Pass `DataLayout` to aggregate constant factory call sites

Update callers of `ConstantArray::get`, `ConstantStruct::get`/`getAnon`,
`ConstantVector::get`, and `ConstantVector::getSplat` to pass the `DataLayout`
pointer where available.

This is preparatory work for the `ConstantPointerNull` semantic change. After
that change, aggregates containing pointer-null elements need `DataLayout` to
correctly determine whether they can collapse to `ConstantAggregateZero`.
Threading `DL` through callers now (NFC) ensures the eventual semantic change
does not break aggregate collapse for zero-null targets.
DeltaFile
+27-23llvm/lib/Analysis/ConstantFolding.cpp
+22-20llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+26-15llvm/lib/Frontend/Offloading/OffloadWrapper.cpp
+23-13clang/lib/CodeGen/MicrosoftCXXABI.cpp
+20-12llvm/lib/Target/X86/X86ISelLowering.cpp
+15-12clang/lib/CodeGen/CGExprConstant.cpp
+133-9566 files not shown
+482-32472 files

LLVM/project abc165cllvm/include/llvm/IR Constants.h, llvm/lib/IR Constants.cpp ConstantFold.cpp

[NFCI][IR] Thread `DataLayout` through aggregate construction for collapse checks

Add `const DataLayout *DL = nullptr` to `ConstantArray::get`,
`ConstantStruct::get`, `ConstantVector::get`, and `ConstantVector::getSplat`
so the collapse-to-`ConstantAggregateZero` check uses `isZeroValue(DL)`
instead of `isZeroValue()`.

This is preparatory work for the upcoming `ConstantPointerNull` semantic
change, where `getZeroValue(ptrTy)` will diverge from
`ConstantPointerNull`. Without DL-aware collapse, aggregates containing
CPN would stop collapsing to CAZ, causing widespread test churn. With
this change, callers that pass DL will see correct collapse behavior,
while callers without DL fall back to a conservative identity check.
DeltaFile
+19-14llvm/lib/IR/Constants.cpp
+18-10llvm/include/llvm/IR/Constants.h
+5-5llvm/lib/IR/ConstantFold.cpp
+42-293 files

LLVM/project 2f870e6. add_dl_to_getnullvalue.py, llvm/lib/Analysis InstructionSimplify.cpp

[NFC] Pass `DataLayout` to `Constant::getNullValue` call sites
DeltaFile
+71-59llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
+62-62llvm/lib/Analysis/InstructionSimplify.cpp
+68-40llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
+80-0add_dl_to_getnullvalue.py
+49-24llvm/lib/IR/AutoUpgrade.cpp
+40-28llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+370-21376 files not shown
+708-47082 files

LLVM/project b9a6994llvm/docs LangRef.rst, llvm/include/llvm/IR DataLayout.h

[DataLayout] Add null pointer value infrastructure

Add support for specifying the null pointer bit representation per
address space in DataLayout via new pointer spec flags:
- 'z': null pointer is all-zeros (assumed if unspecified)
- 'o': null pointer is all-ones
- 'c': custom/unknown null value (LLVM will not fold)

This adds:
- `std::optional<APInt> NullPtrValue` field to `PointerSpec`
- Parsing of z/o/c flags in pointer spec strings
- `getNullPtrValue(unsigned AS)` query API
- `isNullPointerAllZeroes(unsigned AS)` convenience method
- LangRef documentation for the new flags
- Unit tests for all new functionality

No target DataLayout strings are updated in this change. This is
pure infrastructure for a future ConstantPointerNull semantic change
to support targets with non-zero null pointers (e.g. AMDGPU).
DeltaFile
+87-1llvm/unittests/IR/DataLayoutTest.cpp
+25-6llvm/lib/IR/DataLayout.cpp
+17-1llvm/include/llvm/IR/DataLayout.h
+5-1llvm/docs/LangRef.rst
+134-94 files

LLVM/project bc01369llvm/include/llvm/IR Constant.h, llvm/lib/IR Constants.cpp

[NFCI][IR] Add DataLayout-aware `isZeroValue`/`getNullValue` and `getZeroValue` APIs

Modify `Constant::isZeroValue()` and `Constant::getNullValue()` to accept an
optional `const DataLayout *DL = nullptr` parameter, and add a new
`Constant::getZeroValue()` factory method. This establishes the API
distinction between "null value" (semantic null pointer, which may be
non-zero on some targets) and "zero value" (all-zero bits).

When DataLayout is provided:
- `isZeroValue()` checks `ConstantPointerNull` against the target's null
  pointer bit pattern via `DL->isNullPointerAllZeroes(AS)`, returning
  false for address spaces where null is not zero.
- `getNullValue()` constructs aggregates element-by-element when they
  contain pointer elements in non-zero-null address spaces, preserving
  ConstantPointerNull instead of collapsing to ConstantAggregateZero.

When DataLayout is not provided, both functions behave identically to
their previous implementations, ensuring full backward compatibility.


    [3 lines not shown]
DeltaFile
+124-0llvm/unittests/IR/ConstantsTest.cpp
+27-2llvm/lib/IR/Constants.cpp
+14-1llvm/include/llvm/IR/Constant.h
+165-33 files

LLVM/project a899485llvm/include/llvm/IR ConstantFold.h, llvm/lib/Analysis ConstantFolding.cpp

[NFCI][IR] Thread `DataLayout` through `ConstantFold`; fix CAZ extraction and aggregate collapse

Prepare the constant folding infrastructure for the `ConstantPointerNull`
semantic change, where null may have a non-zero bit pattern.

Thread `const DataLayout *DL = nullptr` through `ConstantFoldCastInstruction`,
`ConstantFoldCompareInstruction`, and `ConstantFoldGetElementPtr`. When DL is
present and the null pointer is not zero for the relevant address space,
pointer-involving folds (e.g., ptrtoint null -> 0, icmp uge X null -> true)
are deferred to the DL-aware folder instead of producing incorrect results.
Without DL, behavior is unchanged.

Fix `ConstantAggregateZero` element extraction to return `getZeroValue` (not
`getNullValue`), ensuring CAZ always yields all-zero-bit elements regardless
of the address space's null pointer value.

Fix aggregate collapse checks to use `isZeroValue()` instead of `isNullValue()`.
This correctly prevents collapsing aggregates of FP -0.0 (non-zero bit
pattern) into `ConstantAggregateZero`, and will prevent incorrect collapse of
non-zero-null `ConstantPointerNull` after the semantic change.
DeltaFile
+186-1llvm/unittests/IR/ConstantsTest.cpp
+50-20llvm/lib/IR/ConstantFold.cpp
+11-11llvm/lib/IR/Constants.cpp
+18-2llvm/lib/Analysis/ConstantFolding.cpp
+8-7llvm/include/llvm/IR/ConstantFold.h
+4-2llvm/lib/Target/RISCV/RISCVGatherScatterLowering.cpp
+277-431 files not shown
+278-447 files

LLVM/project ca1efd9llvm/lib/CodeGen/AsmPrinter AsmPrinter.cpp, llvm/lib/CodeGen/SelectionDAG FastISel.cpp InstrEmitter.cpp

[NFCI] Use `DataLayout::getNullPtrValue` in codegen and analysis paths

Replace hardcoded 0 for null pointer materialization with
`DataLayout::getNullPtrValue(AS)` across codegen, analysis, and
transform paths. This prepares these paths for a future semantic
change where `ConstantPointerNull` may represent a non-zero null
pointer value on certain targets.

NFC because all address spaces currently have all-zero null pointer
values, so `getNullPtrValue` returns 0 for every address space.
DeltaFile
+17-11llvm/lib/CodeGen/SelectionDAG/FastISel.cpp
+12-6llvm/lib/Target/X86/X86FastISel.cpp
+9-6llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp
+9-2llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+9-2llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
+7-3llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+63-309 files not shown
+103-5015 files

LLVM/project cb7fc4aflang/lib/Lower/OpenMP ClauseProcessor.cpp Utils.cpp, flang/test/Lower/OpenMP task-affinity.f90

Fix build and tests

- Update due to rebase of omp.iterators -> omp.iterator
- Fix build by moving HLFIROps.h from Utils.h to Utils.cpp
DeltaFile
+4-4mlir/test/Dialect/OpenMP/ops.mlir
+2-2flang/test/Lower/OpenMP/task-affinity.f90
+1-1flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+0-1flang/lib/Lower/OpenMP/Utils.cpp
+1-0flang/lib/Lower/OpenMP/Utils.h
+8-85 files

LLVM/project 6801a3fclang/lib/CIR/CodeGen CIRGenCUDARuntime.h

format yo
DeltaFile
+1-1clang/lib/CIR/CodeGen/CIRGenCUDARuntime.h
+1-11 files

LLVM/project 809c002clang/lib/CIR/CodeGen CIRGenExpr.cpp CIRGenCUDANV.cpp, clang/test/CIR/CodeGenCUDA kernel-call.cu

[CIR][CUDA][HIP] Emit host-side kernel calls
DeltaFile
+17-2clang/test/CIR/CodeGenCUDA/kernel-call.cu
+6-1clang/lib/CIR/CodeGen/CIRGenExpr.cpp
+6-0clang/lib/CIR/CodeGen/CIRGenCUDANV.cpp
+4-1clang/lib/CIR/CodeGen/CIRGenModule.cpp
+2-0clang/lib/CIR/CodeGen/CIRGenCUDARuntime.h
+0-2clang/lib/CIR/CodeGen/CIRGenCUDARuntime.cpp
+35-66 files

LLVM/project 65215d5clang/include/clang/CIR CIRToCIRPasses.h, clang/include/clang/CIR/Dialect Passes.td

[CIR] Initial upstreaming of idiom recognizer pass (#172486)

This PR Upstreams the Idiom Recognizer pass

cc @bcardosolopes
DeltaFile
+96-0clang/lib/CIR/Dialect/Transforms/IdiomRecognizer.cpp
+7-5clang/lib/CIR/Lowering/CIRPasses.cpp
+11-0clang/include/clang/CIR/Dialect/Passes.td
+4-5clang/include/clang/CIR/CIRToCIRPasses.h
+6-2clang/include/clang/Frontend/FrontendOptions.h
+3-3clang/lib/CIR/FrontendAction/CIRGenAction.cpp
+127-154 files not shown
+137-1510 files

LLVM/project 5496267llvm/lib/Target/SPIRV SPIRVLegalizePointerCast.cpp, llvm/test/CodeGen/SPIRV/pointers ptrcast-bitcast.ll

[SPIRV] Add Intermediate cast when Vector From/To types are of different element size and type (#182166)

fixes https://github.com/llvm/llvm-project/issues/177838

- Replaced assert(TargetTypeSize == SourceTypeSize) with a conditional:
when sizes differ, compute a BitcastType with the target's element type
but sized to match the source's total bitwidth
- Instead of unconditionally returning after bitcast, only return early
if BitcastType == TargetType (same-size case), otherwise fall through to
the shuffle logic
- Updated the final assert to use AssignValue->getType() since that may
now be the intermediate type rather than SourceType
DeltaFile
+60-14llvm/test/CodeGen/SPIRV/pointers/ptrcast-bitcast.ll
+56-10llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.cpp
+116-242 files

LLVM/project f9d4170flang/lib/Lower/OpenMP ClauseProcessor.cpp, flang/test/Lower/OpenMP task-affinity.f90

Update due to rebase of omp.iterators -> omp.iterator
DeltaFile
+4-4mlir/test/Dialect/OpenMP/ops.mlir
+2-2flang/test/Lower/OpenMP/task-affinity.f90
+1-1flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+7-73 files

LLVM/project 7a84f3cmlir/test/Target/LLVMIR openmp-todo.mlir

Fix LLVMIR openmp todo test for affinity clause
DeltaFile
+6-4mlir/test/Target/LLVMIR/openmp-todo.mlir
+6-41 files

LLVM/project 351236eflang/lib/Lower/OpenMP Utils.cpp ClauseProcessor.cpp, flang/test/Lower/OpenMP task-affinity.f90

Rewrite functions in affinity utility functions with hlfir apis
DeltaFile
+124-125flang/lib/Lower/OpenMP/Utils.cpp
+69-46flang/test/Lower/OpenMP/task-affinity.f90
+23-47flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+5-3flang/lib/Lower/OpenMP/Utils.h
+221-2214 files

LLVM/project 937cb4dflang/lib/Lower/OpenMP ClauseProcessor.cpp Utils.cpp, mlir/include/mlir/Dialect/OpenMP OpenMPClauses.td

Emit omp.iterator in affinity clause from Flang
DeltaFile
+143-20flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+70-18mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+83-0flang/lib/Lower/OpenMP/Utils.cpp
+16-0flang/lib/Lower/OpenMP/Utils.h
+4-2mlir/include/mlir/Dialect/OpenMP/OpenMPClauses.td
+316-405 files

LLVM/project 1eaded7flang/lib/Lower/OpenMP Utils.cpp ClauseProcessor.cpp, flang/test/Lower/OpenMP task-affinity.f90

[Flang][mlir][OpenMP] Support affinity clause codegen in Flang

This patch translate flang ast to OpenMP dialect for affinity clause
including the iterator modifier.
DeltaFile
+103-0flang/lib/Lower/OpenMP/Utils.cpp
+52-14flang/test/Lower/OpenMP/task-affinity.f90
+64-2flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+31-19mlir/test/Dialect/OpenMP/ops.mlir
+17-0mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
+9-0flang/lib/Lower/OpenMP/Utils.h
+276-352 files not shown
+285-368 files

LLVM/project 104d60dflang/test/Lower/OpenMP task-affinity.f90, flang/test/Lower/OpenMP/Todo affinity-clause.f90

Add iterator test and remove redundant check lines
DeltaFile
+53-35flang/test/Lower/OpenMP/task-affinity.f90
+53-0mlir/test/Dialect/OpenMP/ops.mlir
+0-10flang/test/Lower/OpenMP/Todo/affinity-clause.f90
+106-453 files

LLVM/project 873cdddmlir/include/mlir/Dialect/OpenMP OpenMPOps.td, mlir/lib/Dialect/OpenMP/IR OpenMPDialect.cpp

Fix based on feedback

- omp.iterators -> omp.iterator
- add return type in verifier
- Use OpenMP_LoopRelatedClause in omp.iterator for consistent bounds
definition
DeltaFile
+26-17mlir/test/Dialect/OpenMP/ops.mlir
+24-12mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+24-4mlir/test/Dialect/OpenMP/invalid.mlir
+11-12mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
+85-454 files

LLVM/project 845b191mlir/include/mlir/Dialect/OpenMP OpenMPOps.td OpenMPOpBase.td, mlir/lib/Dialect/OpenMP/IR OpenMPDialect.cpp

[mlir][OpenMP] Introduce 'omp.iterator' for OpenMP iterator modifier

`omp.iterator` provides information of induction variables and iterator
range in OpenMP iterator modifier.

Example:
```
  %it = omp.iterator(%i0: index, %i1: index) =
        (%lb0 to %ub0 step %st0,
         %lb1 to %ub1 step %st1) {
    omp.yield(%i0, %i1 : index, index)
  } -> !omp.iterated<!llvm.struct<(!llvm.ptr, i64)>>
```

Here's how we can use the omp.iteraters to generate multi-dimensional
loop in llvm ir:
```
  // Induction variables can be translated from the block arguments
  // in omp.iterator.

    [8 lines not shown]
DeltaFile
+108-0mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+42-5mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
+29-0mlir/test/Dialect/OpenMP/ops.mlir
+20-0mlir/test/Dialect/OpenMP/invalid.mlir
+7-0mlir/include/mlir/Dialect/OpenMP/OpenMPOpBase.td
+206-55 files

LLVM/project 8c3e8e5flang/lib/Lower/OpenMP ClauseProcessor.cpp, flang/test/Lower/OpenMP simd-linear.f90 composite_simd_linear.f90

[flang][mlir][OpenMP] Allow for flexible typing of linear step variables (#182816)

This PR allows for flexible typing of linear step variables. The format
of the linear clause is also changed to: `linear(linear_var : type =
linear_step : type)`; this format closely follows the formatting of the
allocate/allocators clauses.

Fixes https://github.com/llvm/llvm-project/issues/178793

Co-authored-by: urvi-rav <urvi.rav at hpe.com>
DeltaFile
+31-6flang/test/Lower/OpenMP/simd-linear.f90
+15-15mlir/test/Dialect/OpenMP/ops.mlir
+12-9mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+6-6flang/lib/Lower/OpenMP/ClauseProcessor.cpp
+6-6flang/test/Lower/OpenMP/composite_simd_linear.f90
+4-4mlir/test/Target/LLVMIR/openmp-llvm.mlir
+74-466 files not shown
+85-5712 files

LLVM/project 4e64dcbmlir/include/mlir/Dialect/OpenMP OpenMPOps.td, mlir/lib/Dialect/OpenMP/IR OpenMPDialect.cpp

Fix based on feedback

- omp.iterators -> omp.iterator
- add return type in verifier
- Use OpenMP_LoopRelatedClause in omp.iterator for consistent bounds
definition
DeltaFile
+26-17mlir/test/Dialect/OpenMP/ops.mlir
+24-12mlir/lib/Dialect/OpenMP/IR/OpenMPDialect.cpp
+24-4mlir/test/Dialect/OpenMP/invalid.mlir
+11-12mlir/include/mlir/Dialect/OpenMP/OpenMPOps.td
+85-454 files

LLVM/project 8e43a5alldb/test/API/lang/objc/hidden-ivars TestHiddenIvars.py, lldb/test/API/lang/objc/objc-ivar-stripped TestObjCIvarStripped.py

[lldb] Disable shared build for TestHiddenIvars.py and TestObjCIvarStripped.py (#183188)

These tests sporadically fail on Green Dragon. My hypothesis is that one
test is rebuilding while another is trying to load a dSYM leading to a
mismatch.
DeltaFile
+2-1lldb/test/API/lang/objc/hidden-ivars/TestHiddenIvars.py
+2-1lldb/test/API/lang/objc/objc-ivar-stripped/TestObjCIvarStripped.py
+4-22 files

LLVM/project d7347c0llvm/include/llvm/ExecutionEngine/Orc WaitingOnGraph.h

Revert "[ORC] Simplify WaitingOnGraph::Coalescer::remove. (#183175)"

Revert commit 85354c6d8bc while I investigate the bot failure at
https://lab.llvm.org/buildbot/#/builders/187/builds/17163.
DeltaFile
+22-37llvm/include/llvm/ExecutionEngine/Orc/WaitingOnGraph.h
+22-371 files