LLVM/project 3dc8f05llvm/include/llvm/ADT SmallPtrSet.h, llvm/unittests/ADT SmallPtrSetTest.cpp

[ADT] Use isComparableWith in SmallPtrSet (#221020)

This patch updates operator== in SmallPtrSet to use
DebugEpochBase::HandleBase::isComparableWith, bringing it in line with
DenseMap, FoldingSet, and StringMap.

Assisted-by: Antigravity
DeltaFile
+20-0llvm/unittests/ADT/SmallPtrSetTest.cpp
+2-1llvm/include/llvm/ADT/SmallPtrSet.h
+22-12 files

LLVM/project f1ec263clang/docs ReleaseNotes.md, clang/lib/Sema SemaTemplateDeductionGuide.cpp

Make Younan Zhang happy and  enhance deduction guide for type aliases to support template template parameters and reorder synthesized parameters accordingly
DeltaFile
+153-164clang/lib/Sema/SemaTemplateDeductionGuide.cpp
+24-0clang/test/SemaCXX/cxx20-ctad-type-alias.cpp
+6-4clang/docs/ReleaseNotes.md
+183-1683 files

LLVM/project 3a12e7bclang/include/clang/AST NestedNameSpecifier.h NestedNameSpecifierBase.h, clang/lib/AST ASTImporter.cpp

[clang] remove unused NestedNameSpecifier 'Invalid' constructor

These invalid NNS were used as thombstone keys for DenseMap, but
the DenseMap implementation changed and that's not needed anymore.
DeltaFile
+22-16clang/lib/AST/ASTImporter.cpp
+2-6clang/include/clang/AST/NestedNameSpecifierBase.h
+0-2clang/include/clang/AST/NestedNameSpecifier.h
+24-243 files

LLVM/project f6f1416llvm/include/llvm/ADT FoldingSet.h

[FoldingSet] Assert inserted node's profile matches its lookup (#220166)

In FoldingSetImpl::insert, assert the node profile matches the insert
token. Otherwise, a memoized node can never be matched, leading to
missing hash consing.

This would catch SelectionDAG's and clang's missing CSE bugs (#219911,
#220168)
DeltaFile
+6-0llvm/include/llvm/ADT/FoldingSet.h
+6-01 files

LLVM/project faf31b0clang/lib/AST/ByteCode EvalEmitter.h EvalEmitter.cpp

[clang][bytecode] Allocate EvalEmitter locals using InterpState allocator (#220922)

They have the same lifetime, so might as well use the existing
allocator.
DeltaFile
+6-14clang/lib/AST/ByteCode/EvalEmitter.cpp
+2-4clang/lib/AST/ByteCode/EvalEmitter.h
+8-182 files

LLVM/project 85081admlir/lib/Dialect/Linalg/Transforms Vectorization.cpp, mlir/test/Dialect/Linalg/vectorization contraction-interface.mlir

[mlir][linalg] Preserve cast semantics in named contraction vectorization (#216283)

This patch fixes correctness issues in named contraction vectorization
of Linalg ops whose operands require conversion to an integer
accumulator type.

When `create_named_contraction` is enabled, an op such as `linalg.matmul
{cast = #linalg.type_fn<cast_unsigned>}` was lowered directly to a
mixed-width `vector.contract` without materializing the implied
`arith.extui`. Since `vector.contract` promotes mixed-width integer
operands using sign extension, an `i8 x i8 -> i32` matmul could
interpret unsigned inputs as signed values and produce incorrect
results.

Floating-point operands were similarly passed directly to
`vector.contract` without materializing the `arith.fptosi` or
`arith.fptoui` conversion implied by the Linalg cast semantics.

Materialize `arith.extui` for narrower unsigned integer inputs and

    [5 lines not shown]
DeltaFile
+218-0mlir/test/Dialect/Linalg/vectorization/contraction-interface.mlir
+39-0mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp
+257-02 files

LLVM/project 822f549llvm/lib/Analysis LoopPass.cpp, llvm/lib/IR LegacyPassManager.cpp PrintPasses.cpp

[IR] Add source location filtering to pass dumps (#203393)

Large dumps from `-print-after-all` can be hard to use when only a few
source lines matter. Function filtering can still print too much and can
miss code after inlining.

Add `-filter-print-source-locs` to limit IR and machine-function dumps
to matching debug locations. The option accepts file names or paths with
selected lines and ranges. It also follows inlined locations and works
with legacy and new pass managers.
DeltaFile
+188-13llvm/lib/IR/PrintPasses.cpp
+157-0llvm/test/Other/source-loc-print-filter.ll
+86-49llvm/lib/Passes/StandardInstrumentations.cpp
+116-0llvm/test/CodeGen/X86/source-loc-print-filter.ll
+29-12llvm/lib/IR/LegacyPassManager.cpp
+17-4llvm/lib/Analysis/LoopPass.cpp
+593-789 files not shown
+673-9215 files

LLVM/project 8654574clang/lib/CIR/CodeGen CIRGenModule.h CIRGenModule.cpp, clang/test/CIR/CodeGenOpenCL version.cl

[CIR][OpenCL] Emit OpenCL language version metadata in CIR

Emit OpenCL and C++ for OpenCL language version attributes from CIRGen. Preserve the compatible OpenCL version and the C++ for OpenCL version separately so later lowering does not infer one from the other.

Assisted-by: Codex / GPT-5.6 Sol
DeltaFile
+15-0clang/test/CIR/CodeGenOpenCL/version.cl
+13-0clang/lib/CIR/CodeGen/CIRGenModule.cpp
+4-0clang/test/CodeGenCUDASPIRV/kernel-cc.cu
+1-0clang/lib/CIR/CodeGen/CIRGenModule.h
+33-04 files

LLVM/project a4afb73clang/lib/CIR/Lowering/DirectToLLVM LowerToLLVMOpenCLMetadata.h LowerToLLVM.cpp, clang/test/CIR/CodeGenOpenCL version.cl

[CIR][OpenCL] Lower OpenCL language version metadata to LLVM dialect

Propagate CIR OpenCL language version module attributes as LLVM dialect named metadata before LLVM IR translation.

Assisted-by: Codex / GPT-5.6 Sol
DeltaFile
+43-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVMOpenCLMetadata.cpp
+16-0clang/test/CIR/CodeGenOpenCL/version.cl
+16-0clang/test/CIR/Lowering/opencl-version-metadata.cir
+2-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVMOpenCLMetadata.h
+2-0clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp
+79-05 files

LLVM/project 3749685clang/include/clang/CIR/Dialect/IR CIRDialect.td CIROpenCLAttrs.td, clang/lib/CIR/Dialect/IR CIROpenCLAttrs.cpp CIRDialect.cpp

[CIR][OpenCL] Add OpenCL language version module attributes

Add structured CIR module attributes for OpenCL and C++ for OpenCL language versions. Verify their module-level placement and version components so lowering can consume explicit source-language version state.

Assisted-by: Codex / GPT-5.6 Sol
DeltaFile
+76-0clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+73-0clang/test/CIR/IR/invalid-version.cir
+28-0clang/include/clang/CIR/Dialect/IR/CIROpenCLAttrs.td
+19-0clang/test/CIR/IR/version.cir
+15-0clang/lib/CIR/Dialect/IR/CIROpenCLAttrs.cpp
+5-0clang/include/clang/CIR/Dialect/IR/CIRDialect.td
+216-01 files not shown
+219-17 files

LLVM/project 612ac21clang/lib/CIR/Dialect/IR CIRDialect.cpp

fix: separate CIR attribute dispatch from OpenCL verification
DeltaFile
+20-8clang/lib/CIR/Dialect/IR/CIRDialect.cpp
+20-81 files

LLVM/project edb7c70clang/docs ReleaseNotes.md, clang/lib/Sema SemaLambda.cpp SemaTemplateInstantiate.cpp

Fix crash in class template argument deduction with lambda closure types in deduction guides
DeltaFile
+35-0clang/test/CodeGenCXX/cxx20-ctad-lambda-in-deduction-guide.cpp
+29-0clang/test/SemaCXX/cxx20-ctad-type-alias.cpp
+8-2clang/test/AST/ByteCode/cxx2a.cpp
+10-0clang/lib/Sema/SemaTemplateInstantiate.cpp
+8-0clang/lib/Sema/SemaLambda.cpp
+7-0clang/docs/ReleaseNotes.md
+97-26 files

LLVM/project 9e3a733llvm/lib/Target/LoongArch LoongArchFloatInstrFormats.td LoongArchInstrInfo.td, llvm/lib/Target/LoongArch/MCTargetDesc LoongArchInstPrinter.h LoongArchInstPrinter.cpp

[LoongArch][MC] Add assembly syntax highlighting for LoongArch (#218946)

This PR adds color highlighting of registers and immediates in LoongArch
disassembly.

This is similar to #65853.
DeltaFile
+36-0llvm/test/MC/Disassembler/LoongArch/colored.txt
+23-2llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchInstPrinter.cpp
+8-0llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
+4-2llvm/lib/Target/LoongArch/LoongArchFloatInstrFormats.td
+4-0llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchInstPrinter.h
+2-0llvm/test/MC/Disassembler/LoongArch/lit.local.cfg
+77-46 files

LLVM/project 358cafellvm/lib/Target/RISCV RISCVProcessors.td, llvm/test/CodeGen/RISCV andes-45-unaligned-scalar-mem.ll

[RISCV] Andes: model fast unaligned accesses (#220756)

Mark the Andes 45 tuning profile as supporting efficient unaligned
scalar loads and stores. This lets fixed-size alignment-one copies lower
to scalar instructions instead of a memcpy call. On these in-order
cores, where performance is almost synonymous with instruction count,
this is a material win.
DeltaFile
+15-0llvm/test/CodeGen/RISCV/andes-45-unaligned-scalar-mem.ll
+2-1llvm/lib/Target/RISCV/RISCVProcessors.td
+17-12 files

LLVM/project f363dc6llvm/lib/Target/AArch64 AArch64ConditionalCompares.cpp, llvm/test/CodeGen/AArch64 cmpbr-ccmp.ll cmpbr-ccmp.mir

[AArch64] Form CCMP for CBB and CBH

AArch64ConditionalCompares forms CMP/CCMP chains to transform patterns
such as

                 Head                        Head
                 / |                         CmpBB
                /  |                         / |
               |  CmpBB        =>           /  |
               |  / |                    Tail  |
               | /  |                      |   |
              Tail  |                      |   |
                |   |                      |   |
               ... ...                    ... ...

where Head is terminated by a conditional branch and CmpBB contains
a cmp + conditional branch.

We usually try to split any fused conditional branches to be able to

    [8 lines not shown]
DeltaFile
+406-0llvm/test/CodeGen/AArch64/cmpbr-ccmp.mir
+232-0llvm/test/CodeGen/AArch64/cmpbr-ccmp.ll
+38-2llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
+676-23 files

LLVM/project 4832db9llvm/lib/Target/AArch64 AArch64InstrInfo.cpp, llvm/test/CodeGen/AArch64 cmpbr-early-ifcvt.mir

[AArch64][CMPBR] Fix splitting of CBB/CBH instructions into ext + cmp

We falsely split CBB/CBH instructions by explicitly extending the
second register operand instead of the first one, leading to the
following, wrong codegen:

  cbh $wn, $wm, cc, trgt  =>  sxth $wt, $wm
                              cmp  $wn, $wt, cc, sxth

Correct is

  cbh $wn, $wm, cc, trgt  =>  sxth $wt, $wn
                              cmp  $wt, $wm, cc, sxth

since cmp with extended register extends it's second, not its first
operand.
DeltaFile
+26-22llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+16-16llvm/test/CodeGen/AArch64/cmpbr-early-ifcvt.mir
+42-382 files

LLVM/project 1dabefallvm/lib/Target/AArch64 AArch64ConditionalCompares.cpp, llvm/test/CodeGen/AArch64 cmpbr-ccmp.ll cmpbr-ccmp.mir

[AArch64] Allow forming CCMPs for CB branches

AArch64ConditionalCompares currently doesn't consider FEAT_CMPBR CB
instructions when trying to form CCMPs. This leads to a lot more
branches which is usually hurtful for performance.

The patchs adds handling CB instructions, just like we do for other
fused conditional branches such as CBZ or CBNZ.
DeltaFile
+794-0llvm/test/CodeGen/AArch64/cmpbr-ccmp.mir
+519-0llvm/test/CodeGen/AArch64/cmpbr-ccmp.ll
+81-36llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
+1,394-363 files

LLVM/project ceabc54mlir/lib/Dialect/OpenACC/Transforms ACCDeclareGPUModuleInsertion.cpp

[mlir][openacc][NFC] Fix ACCDeclareGPUModuleInsertion header (#221106)
DeltaFile
+1-2mlir/lib/Dialect/OpenACC/Transforms/ACCDeclareGPUModuleInsertion.cpp
+1-21 files

LLVM/project dc8e837flang/include/flang/Optimizer/Support InternalNames.h, flang/lib/Optimizer/OpenACC/Support FIROpenACCOpsInterfaces.cpp

[mlir][openacc] Add isCompilerGenerated to GlobalVariableOpInterface (#221096)

This function is used to determine if a global is compiler generated or
coming from user variables. This is useful when determining the handling
of globals for unified memory mode.
DeltaFile
+27-0flang/unittests/Optimizer/InternalNamesTest.cpp
+20-0flang/lib/Optimizer/Support/InternalNames.cpp
+5-0flang/lib/Optimizer/OpenACC/Support/FIROpenACCOpsInterfaces.cpp
+4-0mlir/include/mlir/Dialect/OpenACC/OpenACCOpsInterfaces.td
+3-0flang/include/flang/Optimizer/Support/InternalNames.h
+2-0mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
+61-01 files not shown
+62-07 files

LLVM/project d9dbc70llvm/lib/Target/AArch64 AArch64InstrInfo.cpp AArch64MCInstLower.cpp, llvm/test/CodeGen/AArch64 wineh-try-catch.ll wineh-try-catch-vla.ll

[AArch64] Fix missing :lo12: on the catchret address pair (#219200)

`llc -mtriple=aarch64-pc-windows-msvc` emits assembly it cannot assemble
itself.
A function with a `catchret` materialises its continuation block like
this:

```asm
"?catch$2@?0?f at 4HA":
        adrp    x0, .LBB0_1
        add     x0, x0, .LBB0_1
        ret
```

Pipe that back through `llvm-mc` and you get:

```
error: expected compatible register, symbol or integer in range [0, 4095]
        add     x0, x0, .LBB0_1

    [43 lines not shown]
DeltaFile
+4-5llvm/lib/Target/AArch64/AArch64MCInstLower.cpp
+2-2llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
+1-1llvm/test/CodeGen/AArch64/wineh-try-catch.ll
+1-1llvm/test/CodeGen/AArch64/wineh-try-catch-vla.ll
+1-1llvm/test/CodeGen/AArch64/wineh-try-catch-realign.ll
+1-1llvm/test/CodeGen/AArch64/wineh-try-catch-nobase.ll
+10-113 files not shown
+13-149 files

LLVM/project 6632578clang/unittests/AST AttrTest.cpp

[clang][OpenMP] Add explicit default libomp value to test. (#221098)

The test OMPInvariantPredicateBoundOnIntraTileLoop, in AttrTest.cpp uses
'-fopenmp' without supplying an explcit value. In some places the
default value is 'libomp', which works just fine for this test. But in
envorinments where 'libomp' is not the default value (e.g. places that
use 'libgomp' by default) the test fails. This fixes that issue by
explicitly telling the test to use 'libomp'.
DeltaFile
+1-1clang/unittests/AST/AttrTest.cpp
+1-11 files

LLVM/project fe7155cclang/test/AST ast-dump-ctad-alias.cpp

chore: fix style
DeltaFile
+12-2clang/test/AST/ast-dump-ctad-alias.cpp
+12-21 files

LLVM/project 3d8a41aclang/docs ReleaseNotes.md, clang/lib/Sema SemaTemplateDeductionGuide.cpp

Fix crash in class template argument deduction with alias templates
DeltaFile
+46-11clang/lib/Sema/SemaTemplateDeductionGuide.cpp
+47-0clang/test/SemaCXX/cxx20-ctad-type-alias.cpp
+8-0clang/docs/ReleaseNotes.md
+101-113 files

LLVM/project f5d0b63clang/test/CIR/CodeGenOpenACC declare-copyout.cpp declare-copy.cpp

[CIR] Fixup OpenACC + 1 OMP test from modifiers attribute changes. (#221101)
DeltaFile
+39-39clang/test/CIR/CodeGenOpenACC/declare-create.cpp
+39-39clang/test/CIR/CodeGenOpenACC/declare-copyin.cpp
+32-32clang/test/CIR/CodeGenOpenACC/compute-copyin-copyout-create.c
+32-32clang/test/CIR/CodeGenOpenACC/combined-copyin-copyout-create.c
+30-30clang/test/CIR/CodeGenOpenACC/declare-copyout.cpp
+30-30clang/test/CIR/CodeGenOpenACC/declare-copy.cpp
+202-2026 files not shown
+281-28112 files

LLVM/project e97669bmlir/lib/Conversion/GPUToNVVM LowerGpuOpsToNVVMOps.cpp, mlir/lib/Conversion/GPUToROCDL LowerGpuOpsToROCDLOps.cpp

[mlir][gpu] Don't request C wrappers for private device functions (#214552)

GPU lowerings attach `llvm.emit_c_interface` to device functions
regardless of visibility. This causes private device functions to
receive external entry points and prevents such functions from being
culled by DCE.

On a real module lowered by a downstream compiler, we measured that
unconditional `llvm.emit_c_interface` inflated the generated PTX by 1.8x
by keeping unused private functions alive and by 7x for pipelines that
also give private functions internal linkage.

This change attaches `llvm.emit_c_interface` only to functions which are
not private for both the gpu->nvvm and gpu->rocdl lowerings. No behavior
change to existing unit tests, and new tests are added to witness the
new behavior for private functions.

Assisted-by: Claude Code
DeltaFile
+25-0mlir/test/Conversion/GPUToROCDL/private-func-no-c-interface.mlir
+25-0mlir/test/Conversion/GPUToNVVM/private-func-no-c-interface.mlir
+6-1mlir/lib/Conversion/GPUToROCDL/LowerGpuOpsToROCDLOps.cpp
+6-1mlir/lib/Conversion/GPUToNVVM/LowerGpuOpsToNVVMOps.cpp
+62-24 files

LLVM/project 6ba0802clang/lib/CodeGen CGDebugInfo.cpp, clang/test/DebugInfo/CXX limited-ctor.cpp

[DebugInfo] Ignore undefined constexpr constructors in constructor homing. (#218165)

The constructor homing optimization limits the amount of redundant debug
info generated for classes by only emitting forward declarations to
debug info in translation units that can't instantiate the class on
their own (i.e. they don't see the definitions of any constructors).

Currently, classes that have _any_ constexpr constructors are excluded
from the optimization. This is being changed to only exclude _defined_
constexpr constructors, as declared constexpr constructors are not
callable in a TU that doesn't see their definition.

Signed-off-by: Clayton Knittel <cknit1999 at gmail.com>
DeltaFile
+33-0clang/test/DebugInfo/CXX/limited-ctor.cpp
+15-5clang/lib/CodeGen/CGDebugInfo.cpp
+48-52 files

LLVM/project 20498c8llvm/test lit.cfg.py, llvm/test/ExecutionEngine/Orc throw-catch-no-frame-pointer.ll throw-catch-minimal.ll

[ORC] Add host-jit-triple lit feature, gate some JIT tests (#220929)

The JIT does not support throwing exceptions on Darwin/arm64e yet. Add
an llvm-lit feature flag, "host-jit-triple", that reports the process
triple as detected by `lli` so that we can mark exception-throwing tests
as unsupported when they would be run as arm64e. (Feature flags based on
build settings, e.g. host-triple and target-triple, don't reliably
report arm64e).

Adds a -host-jit-triple option to lli to print the value for the
feature-flag.

rdar://185482009
DeltaFile
+19-0llvm/test/lit.cfg.py
+10-0llvm/tools/lli/lli.cpp
+4-0llvm/test/ExecutionEngine/OrcLazy/minimal-throw-catch.ll
+4-0llvm/test/ExecutionEngine/Orc/throw-catch-no-frame-pointer.ll
+4-0llvm/test/ExecutionEngine/Orc/throw-catch-minimal.ll
+4-0llvm/test/ExecutionEngine/Orc/throw-catch-merged-compact-unwind.ll
+45-01 files not shown
+48-07 files

LLVM/project ae856abclang/test/CIR/CodeGenCoroutines coro-alloc.cpp, llvm/test/Transforms/LowerTypeTests cfi-jumptable-hotness-summary.ll

rebase

Created using spr 1.3.7
DeltaFile
+0-133orc-rt/test/unit/bedrock/ExecutorProcessInfoTest.cpp
+128-0llvm/unittests/ABI/TypesTest.cpp
+60-41mlir/lib/Dialect/OpenACC/IR/OpenACCCG.cpp
+41-41mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp
+80-0clang/test/CIR/CodeGenCoroutines/coro-alloc.cpp
+35-36llvm/test/Transforms/LowerTypeTests/cfi-jumptable-hotness-summary.ll
+344-25158 files not shown
+1,191-56264 files

LLVM/project 2f222c4clang/test/CIR/CodeGenCoroutines coro-alloc.cpp, flang/test/Semantics bug82684.f90

[𝘀𝗽𝗿] changes introduced through rebase

Created using spr 1.3.7

[skip ci]
DeltaFile
+0-133orc-rt/test/unit/bedrock/ExecutorProcessInfoTest.cpp
+128-0llvm/unittests/ABI/TypesTest.cpp
+60-41mlir/lib/Dialect/OpenACC/IR/OpenACCCG.cpp
+41-41mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp
+80-0clang/test/CIR/CodeGenCoroutines/coro-alloc.cpp
+65-0flang/test/Semantics/bug82684.f90
+374-21558 files not shown
+1,183-55464 files

LLVM/project caa05fcclang/test/CIR/CodeGenCoroutines coro-alloc.cpp, flang/test/Semantics bug82684.f90

rebase

Created using spr 1.3.7
DeltaFile
+0-133orc-rt/test/unit/bedrock/ExecutorProcessInfoTest.cpp
+128-0llvm/unittests/ABI/TypesTest.cpp
+60-41mlir/lib/Dialect/OpenACC/IR/OpenACCCG.cpp
+41-41mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp
+80-0clang/test/CIR/CodeGenCoroutines/coro-alloc.cpp
+65-0flang/test/Semantics/bug82684.f90
+374-21558 files not shown
+1,183-55464 files