LLVM/project 642630aclang/lib/Sema SemaDecl.cpp, clang/test/Modules pr212170.cppm

[C++20] [Modules] Preserve the initializer for unused static variable in modules (#218304)

Close https://github.com/llvm/llvm-project/issues/212170

See the discussion above for the details.
DeltaFile
+54-0clang/test/Modules/pr212170.cppm
+11-6clang/lib/Sema/SemaDecl.cpp
+65-62 files

LLVM/project 4639fa2llvm/lib/Target/Mips MipsInstrInfo.td, llvm/test/MC/Mips macro-bcc-imm-delay-slot.s

[Mips] Mark immediate branch macros as having delay slots (#217565)

Immediate conditional branch macros expand to real branches with delay
slots, but their pseudo-instruction definitions did not carry
`hasDelaySlot`. Mark them consistently with the register forms so IAS
inserts a delay-slot `nop` under `.set reorder`.

Adds `llvm/test/MC/Mips/macro-bcc-imm-delay-slot.s` covering reordered
and non-reordered expansion.

Fixes #217368
DeltaFile
+33-0llvm/test/MC/Mips/macro-bcc-imm-delay-slot.s
+1-1llvm/lib/Target/Mips/MipsInstrInfo.td
+34-12 files

LLVM/project 904188ellvm/include/llvm/Analysis AssumptionCache.h, llvm/lib/Analysis AssumptionCache.cpp

[AssumptionCache] Limit the number of assumptions inspected per value (#217525)

Example:
```llvm
loop.5:
  %iv.5 = phi i64 [ %next.5, %body.5 ], [ 0, %body.4 ]
  %value.5 = phi i32 [ %arg, %body.5 ], [ 0, %body.4 ]
  %cmp.5 = icmp slt i64 %iv.5, 10
  br i1 %cmp.5, label %body.5, label %loop.4.latch

body.5:
  %negative = icmp slt i32 %value.5, 0
  call void @llvm.assume(i1 %negative)
  %next.5 = add i64 %iv.5, 1
  br label %loop.5
```

In this code, fully unrolling the enclosing nest clones the assumption
once per iteration, and every clone constrains `%arg`, leaving 10,009

    [157 lines not shown]
DeltaFile
+51-18llvm/lib/Analysis/AssumptionCache.cpp
+37-0llvm/test/Analysis/AssumptionCache/max-assumes-per-value.ll
+15-0llvm/include/llvm/Analysis/AssumptionCache.h
+1-1llvm/lib/Transforms/Utils/CodeExtractor.cpp
+104-194 files

LLVM/project 8c6b849llvm/include/llvm/IR VPIntrinsics.def, llvm/lib/CodeGen/SelectionDAG MatchContext.h LegalizeVectorOps.cpp

[DAG] Remove trivial VP SDNodes. NFC (#217866)

This removes the codegen parts of the trivial VP intrinsics. It's quite
far reaching, but the general categories of code removed are:

- Removing definitions from VPIntrinsics.def
- Legalization and expansion code
- MatchContext used to match over both VP and non-VP nodes
- Some dead DAGCombines and folds in SelectionDAGBuilder

There are still more things to be cleaned up after this, e.g. removing
more of the VPIntrinsic class hierarchy, removing
ExpandVectorPredication/moving expansion into other places, removing
MatchContext from SDPatternMatch
DeltaFile
+80-283llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+3-340llvm/include/llvm/IR/VPIntrinsics.def
+6-336llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+47-282llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+7-217llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
+0-182llvm/lib/CodeGen/SelectionDAG/MatchContext.h
+143-1,64011 files not shown
+194-2,02217 files

LLVM/project c8aa1c9llvm/include/llvm/IR VPIntrinsics.def, llvm/lib/CodeGen/SelectionDAG MatchContext.h LegalizeVectorOps.cpp

[DAG] Remove trivial VP SDNodes. NFC

This removes the codegen parts of the trivial VP intrinsics. It's quite far reaching, but the general categories of code removed are:

- Removing definitions from VPIntrinsics.def
- Legalization and expansion code
- MatchContext used to match over both VP and non-VP nodes
- Some dead DAGCombines and folds in SelectionDAGBuilder

There are still more things to be cleaned up after this, e.g. removing more of the VPIntrinsic class hierarchy, removing ExpandVectorPredication/moving expansion into other places, removing MatchContext from SDPatternMatch
DeltaFile
+80-283llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+3-340llvm/include/llvm/IR/VPIntrinsics.def
+6-336llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+47-282llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
+7-217llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
+0-182llvm/lib/CodeGen/SelectionDAG/MatchContext.h
+143-1,64011 files not shown
+188-2,01417 files

LLVM/project 2ca48b8llvm/include/llvm/CodeGen TargetLowering.h

Reflow comment
DeltaFile
+11-13llvm/include/llvm/CodeGen/TargetLowering.h
+11-131 files

LLVM/project 51a0034flang/include/flang/Evaluate tools.h, flang/lib/Evaluate fold-logical.cpp fold-implementation.h

Backport typekind-traits changes
Use kind instead of bits in conversion functions

Address review comment
cleanup

Backport typekind-traits changes

Use kind instead of bits in conversion functions

Post-merge fixes

cleanup

Improve code reuse

Avoid UnwrapExpr duplication

Post-merge fixes

    [6 lines not shown]
DeltaFile
+11-56flang/include/flang/Evaluate/tools.h
+25-26flang/lib/Evaluate/tools.cpp
+10-15flang/lib/Evaluate/fold-implementation.h
+4-8flang/lib/Evaluate/fold-logical.cpp
+3-3flang/lib/Semantics/type.cpp
+2-2flang/lib/Semantics/tools.cpp
+55-1107 files not shown
+61-11613 files

LLVM/project ec1b336llvm/test/CodeGen/AMDGPU buffer-fat-pointer-atomicrmw-fmax.ll buffer-fat-pointer-atomicrmw-fadd.ll

Merge commit 'b9c547a7a7e6e254009552a2bc20fbed169fd2d7' into HEAD
DeltaFile
+3,815-3,810llvm/test/CodeGen/AMDGPU/flat-atomicrmw-fmin.ll
+3,815-3,810llvm/test/CodeGen/AMDGPU/flat-atomicrmw-fmax.ll
+3,513-3,467llvm/test/CodeGen/AMDGPU/global-atomicrmw-fmin.ll
+3,513-3,467llvm/test/CodeGen/AMDGPU/global-atomicrmw-fmax.ll
+3,252-3,311llvm/test/CodeGen/AMDGPU/buffer-fat-pointer-atomicrmw-fadd.ll
+2,533-2,603llvm/test/CodeGen/AMDGPU/buffer-fat-pointer-atomicrmw-fmax.ll
+20,441-20,4684,688 files not shown
+203,346-141,8784,694 files

LLVM/project b9c547aflang/include/flang/Evaluate integer-value.h typekind-traits.h, flang/lib/Evaluate integer-value-impl.h integer-value.cpp

Backport typekind-traits changes
Use kind instead of bits in conversion functions
DeltaFile
+118-21flang/include/flang/Evaluate/typekind-traits.h
+12-6flang/unittests/Evaluate/IntegerValueTest.cpp
+8-6flang/lib/Evaluate/integer-value-impl.cpp
+4-4flang/lib/Evaluate/integer-value.cpp
+2-2flang/lib/Evaluate/integer-value-impl.h
+2-2flang/include/flang/Evaluate/integer-value.h
+146-416 files

LLVM/project 9f0047fllvm/test/CodeGen/AMDGPU buffer-fat-pointer-atomicrmw-fmax.ll buffer-fat-pointer-atomicrmw-fadd.ll

Merge commit 'a1a8dc205f45a69c20f758349af6548f4d665b55' into HEAD
DeltaFile
+3,815-3,810llvm/test/CodeGen/AMDGPU/flat-atomicrmw-fmin.ll
+3,815-3,810llvm/test/CodeGen/AMDGPU/flat-atomicrmw-fmax.ll
+3,513-3,467llvm/test/CodeGen/AMDGPU/global-atomicrmw-fmin.ll
+3,513-3,467llvm/test/CodeGen/AMDGPU/global-atomicrmw-fmax.ll
+3,252-3,311llvm/test/CodeGen/AMDGPU/buffer-fat-pointer-atomicrmw-fadd.ll
+2,533-2,603llvm/test/CodeGen/AMDGPU/buffer-fat-pointer-atomicrmw-fmax.ll
+20,441-20,4684,682 files not shown
+203,310-141,8514,688 files

LLVM/project a1a8dc2llvm/test/CodeGen/AMDGPU buffer-fat-pointer-atomicrmw-fmin.ll buffer-fat-pointer-atomicrmw-fadd.ll

Merge commit 'acddcda77d5d9470ead6fd172d4b658d8fdfa191' into HEAD
DeltaFile
+3,815-3,810llvm/test/CodeGen/AMDGPU/flat-atomicrmw-fmin.ll
+3,815-3,810llvm/test/CodeGen/AMDGPU/flat-atomicrmw-fmax.ll
+3,513-3,467llvm/test/CodeGen/AMDGPU/global-atomicrmw-fmin.ll
+3,513-3,467llvm/test/CodeGen/AMDGPU/global-atomicrmw-fmax.ll
+3,252-3,311llvm/test/CodeGen/AMDGPU/buffer-fat-pointer-atomicrmw-fadd.ll
+2,533-2,603llvm/test/CodeGen/AMDGPU/buffer-fat-pointer-atomicrmw-fmin.ll
+20,441-20,4684,682 files not shown
+203,310-141,8514,688 files

LLVM/project be5c26fllvm/test/CodeGen/AMDGPU fptoui-sat-vector.ll fptosi-sat-vector.ll

Legalize sgpr16 in sdag
DeltaFile
+2,231-2,790llvm/test/CodeGen/AMDGPU/minimumnum.bf16.ll
+2,231-2,790llvm/test/CodeGen/AMDGPU/maximumnum.bf16.ll
+1,527-1,576llvm/test/CodeGen/AMDGPU/float-to-arbitrary-fp-widen.ll
+1,324-1,324llvm/test/CodeGen/AMDGPU/amdgcn.bitcast.1024bit.ll
+213-220llvm/test/CodeGen/AMDGPU/fptosi-sat-vector.ll
+139-146llvm/test/CodeGen/AMDGPU/fptoui-sat-vector.ll
+7,665-8,84632 files not shown
+8,771-10,10038 files

LLVM/project c8eb2a1llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 shl-to-add-transformation5.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+18-1llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+5-5llvm/test/Transforms/SLPVectorizer/X86/shl-to-add-transformation5.ll
+23-62 files

LLVM/project dbd185allvm/lib/Target/AArch64 AArch64MIPeepholeOpt.cpp, llvm/test/CodeGen/AArch64 mipeephole-undef-operand.mir

AArch64: Fix MIPeepholeOpt null dereference on undef source operands

Fix unchecked getUniqueVRegDef calls. This is also an SSA pass, and has
no reason to use getUniqueVRegDef over getVRegDef, so also make that
change.

Co-Authored-By: Claude <noreply at anthropic.com> (Claude Opus 4.8)
DeltaFile
+57-0llvm/test/CodeGen/AArch64/mipeephole-undef-operand.mir
+6-4llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
+63-42 files

LLVM/project 1f7bed0utils/bazel/llvm-project-overlay/libc BUILD.bazel

[bazel] Port a454a3cdaf82dea7b6293d29628b70eaec918723 (#218289)
DeltaFile
+55-8utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+55-81 files

LLVM/project 50c44d8utils/bazel/llvm-project-overlay/clang BUILD.bazel

[bazel] Port 2f4a2d57cbea5d0c2a51e2ba1737be692bbc559f (#218288)
DeltaFile
+2-0utils/bazel/llvm-project-overlay/clang/BUILD.bazel
+2-01 files

LLVM/project b6b9e6cutils/bazel/llvm-project-overlay/clang BUILD.bazel, utils/bazel/llvm-project-overlay/clang/unittests BUILD.bazel

[bazel] Port 3ff8254afdb28be14735814be8d66d6bde5fbbb6 (#218287)
DeltaFile
+7-0utils/bazel/llvm-project-overlay/clang/BUILD.bazel
+2-0utils/bazel/llvm-project-overlay/clang/unittests/BUILD.bazel
+9-02 files

LLVM/project 6b130f6clang/test/CXX/drs cwg20xx.cpp, clang/www cxx_dr_status.html

[clang] Add test for CWG 2006 and update status (#215259)

Clang already supports CWG 2006. Adding test cases and updating
`cxx_dr_status.html` to 2.7.

https://cplusplus.github.io/CWG/issues/2006.html

Assisted by Claude.
DeltaFile
+86-0clang/test/CXX/drs/cwg20xx.cpp
+1-1clang/www/cxx_dr_status.html
+87-12 files

LLVM/project 8b6fd97.github/workflows release-binaries.yml

workflows/release-binaries: Install Wix on Windows ARM64 (#217707)

Wix is used for generating the installer and is not installed by default
on Windows ARM64.

(cherry picked from commit f75f48e3ce41227c5a0ae5d2c6d6ea90100b9bc4)
DeltaFile
+8-0.github/workflows/release-binaries.yml
+8-01 files

LLVM/project fb7dcc2clang/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.

(cherry picked from commit ec5c9182be2aa168b7c843374c5c7497dd3bef17)
DeltaFile
+63-0clang/test/Interpreter/extern-c-error-recovery.cpp
+9-5clang/lib/Interpreter/IncrementalParser.cpp
+72-52 files

LLVM/project 996c97f.github/workflows release-tasks.yml release-documentation.yml

workflows: Merge release-doxygen into release-documenation (#214366)

These two workflows use the same script and have the same structure,
so it's easier just to have one job that builds both.

(cherry picked from commit 2d47daa636204868874ce88e55992b096904411e)
DeltaFile
+0-130.github/workflows/release-doxygen.yml
+40-13.github/workflows/release-documentation.yml
+0-16.github/workflows/release-tasks.yml
+40-1593 files

LLVM/project 66a285cclang/lib/Format UnwrappedLineFormatter.cpp, clang/unittests/Format FormatTest.cpp

[clang-format] Honor new lines before // clang-format on (#218022)

Fixes #217872.

(cherry picked from commit 6978738e1efe0c33a9540b70697ce0c83852d9c7)
DeltaFile
+8-0clang/unittests/Format/FormatTest.cpp
+2-0clang/lib/Format/UnwrappedLineFormatter.cpp
+10-02 files

LLVM/project 9a30d9bclang-tools-extra/clang-tidy/utils ExceptionAnalyzer.cpp, clang-tools-extra/test/clang-tidy/checkers/bugprone exception-escape-treat-functions-without-specification-as-throwing.cpp exception-escape-coro-unknown.cpp

[clang-tidy] Fix crashes when analyzing unknown exceptions in bugprone-exception-escape (#218067)

`ExceptionAnalyzer` represents exceptions of unknown type with a null
`Type`, but some consumers dereferenced it unconditionally, resulting in
a crash when `TreatFunctionsWithoutSpecificationAsThrowing` is enabled.
This commit fixes the problem by skipping type-dependent processing for
unknown exceptions.

Fixes #217649

(cherry picked from commit c0feba8bedbfda4f1a2f3727f2ef270fcc6ca138)
DeltaFile
+42-0clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-coro-unknown.cpp
+17-1clang-tools-extra/test/clang-tidy/checkers/bugprone/exception-escape-treat-functions-without-specification-as-throwing.cpp
+4-0clang-tools-extra/clang-tidy/utils/ExceptionAnalyzer.cpp
+63-13 files

LLVM/project d99278bclang/docs/analyzer checkers.md

Resolve nits from superseeded PR review.
DeltaFile
+5-5clang/docs/analyzer/checkers.md
+5-51 files

LLVM/project fcfc91bclang/lib/Sema SemaRISCV.cpp, clang/test/Sema riscv-rvv-int64-scalar-type.c

[RISCV] Use correct type for (u)int64_t in RVV intrinsics on OpenBSD (#217211)

The intrinsics are documented to use (u)int64_t for 64-bit scalars.

OpenBSD on RV64 uses long long for int64_t while Linux uses long. The
current code finds the first 64 bit type which is long for both OpenBSD
and Linux.

This patch looks up the type that corresponds to (u)int64_t.

Fixes #216531.

Assisted-by: Claude
(cherry picked from commit fd6d7a608909dc4ecea57e0155042d16f7b4e61a)
DeltaFile
+35-0clang/test/Sema/riscv-rvv-int64-scalar-type.c
+16-2clang/lib/Sema/SemaRISCV.cpp
+51-22 files

LLVM/project 190c84fclang/lib/CodeGen CodeGenModule.cpp, clang/test/CodeGenCXX msvc-global-delete-llvm-used.cpp

[clang][win] Fix __global_delete breaking __attribute__((used)) (#217753)

The `__empty_global_delete` fallback introduced in #209585 was marked
used via `llvm::appendToUsed()`, which creates a global named
"llvm.used" during codegen. `CodeGenModule::emitLLVMUsed()` later
unconditionally creates its own global of that same name at end-of-TU,
so the name collision renamed the latter to "llvm.used.1" -- a name LLVM
ignores. The result was that every `__attribute__((used))` global in the
TU silently lost its used semantics whenever a `__global_delete` wrapper
was emitted, letting those symbols be dropped.

Mark the fallback used via `CodeGenModule::addUsedGlobal()` instead, so
it joins the single llvm.used that `emitLLVMUsed()` emits.
`emitLLVMUsed()` runs well after `emitGlobalDeleteForwardingBodies()` in
`Release()`, so the fallback is still recorded in time.

Fixes a regression reported on #209585.

(cherry picked from commit 061865f32607cd064ab944407cc863186702d6f1)
DeltaFile
+17-0clang/test/CodeGenCXX/msvc-global-delete-llvm-used.cpp
+1-1clang/lib/CodeGen/CodeGenModule.cpp
+18-12 files

LLVM/project 692fdd9llvm/lib/Target/Mips MipsSEISelLowering.cpp, llvm/test/CodeGen/Mips/msa buildvector-undef-loop.ll

[Mips] Legalize vector UNDEF instead of expanding to zero BUILD_VECTOR (#211503)

Currently, MIPS MSA expands ISD::UNDEF into a BUILD_VECTOR of all zeros
during legalization. This creates an infinite loop in DAGCombiner when
the following occurs:
1.Mips lower BUILD_VECTOR expands non-splat vectors into
INSERT_VECTOR_ELT with creating undef node
2.Then legalization expands UNDEF back to BUILD_VECTOR zero
3.Mips lower BUILD_VECTOR converts zero vector to BITCAST
4.DAGCombiner optimizes BITCAST(zero) to UNDEF
5.Back to step 2, infinite loop

Fix #210229.

(cherry picked from commit b1c24ea77d2aab84f9e8ccb9389bc4366c41e8dd)
DeltaFile
+37-0llvm/test/CodeGen/Mips/msa/buildvector-undef-loop.ll
+1-0llvm/lib/Target/Mips/MipsSEISelLowering.cpp
+38-02 files

LLVM/project c935849clang/docs/analyzer checkers.md

[analyzer][docs] Add documentation for the UseAfterLifetimeEnd checker
DeltaFile
+59-0clang/docs/analyzer/checkers.md
+59-01 files

LLVM/project 42f085ellvm/lib/Target/SPIRV SPIRVStructurizerWrapper.h SPIRVPrepareFunctions.h

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

Created using spr 1.3.7

[skip ci]
DeltaFile
+110-0llvm/lib/Target/SPIRV/SPIRV.h
+0-34llvm/lib/Target/SPIRV/SPIRVFinalizeShaderLinkage.h
+0-29llvm/lib/Target/SPIRV/SPIRVStructurizerWrapper.h
+0-29llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.h
+0-29llvm/lib/Target/SPIRV/SPIRVLegalizeZeroSizeArrays.h
+0-29llvm/lib/Target/SPIRV/SPIRVLegalizePointerCast.h
+110-15024 files not shown
+145-38830 files

LLVM/project 21b1551llvm/lib/Target/SPIRV SPIRVStructurizerWrapper.h SPIRVPrepareFunctions.h

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+199-0llvm/lib/Target/SPIRV/SPIRVCodeGenPassBuilder.cpp
+110-0llvm/lib/Target/SPIRV/SPIRV.h
+0-34llvm/lib/Target/SPIRV/SPIRVFinalizeShaderLinkage.h
+0-29llvm/lib/Target/SPIRV/SPIRVStructurizerWrapper.h
+0-29llvm/lib/Target/SPIRV/SPIRVPrepareFunctions.h
+0-29llvm/lib/Target/SPIRV/SPIRVLegalizeZeroSizeArrays.h
+309-12127 files not shown
+352-39333 files