LLVM/project 869e315clang/lib/Sema SemaTemplateDeduction.cpp, clang/test/SemaCXX deduced-return-type-cxx14.cpp

fixup
DeltaFile
+8-0clang/test/SemaCXX/deduced-return-type-cxx14.cpp
+2-0clang/lib/Sema/SemaTemplateDeduction.cpp
+10-02 files

LLVM/project 9f3f973clang/include/clang/AST DeclTemplate.h, clang/lib/AST DeclTemplate.cpp

[clang] fix getTemplateInstantiationArgs

This implements a new strategy for collecting the template arguments, by
relying on the qualifiers and template parameter lists to navigate the template
context of out-of-line definitions.

This greatly simplifies the signature of that function, by removing a bunch
of workarounds, and simpliffying a couple that weren't removed yet.

Since this now relies on qualifiers and template parameter lists,
this patch expends most of its effort making sure these are placed,
transformed and propagated to template instantiations.

Also makes the explicit specialization AST nodes stop abusing the template
parameter lists by storing it's own template parameter list, creating a
dedicated field for them, similar to partial specializations.
DeltaFile
+194-429clang/lib/Sema/SemaTemplateInstantiate.cpp
+275-165clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+151-147clang/lib/Sema/SemaTemplate.cpp
+96-95clang/include/clang/AST/DeclTemplate.h
+59-129clang/lib/Sema/SemaConcept.cpp
+60-92clang/lib/AST/DeclTemplate.cpp
+835-1,05755 files not shown
+1,495-1,71761 files

LLVM/project 547cb15clang/include/clang/Serialization ASTReader.h

[clang][NFC]: Fix typo in comment in `ASTReader.h` (#202022)

Similiar -> Similar
DeltaFile
+1-1clang/include/clang/Serialization/ASTReader.h
+1-11 files

LLVM/project 35823d1clang-tools-extra/clang-doc Representation.h Representation.cpp

[clang-doc] Use llvm RTTI over handrolled casting (#202059)

Clang-Doc has a limited amount of polymorphism over Info types.
Historically, these have just been cast directly in a few places, but we
can use the existing llvm RTTI implementation to more rigorously
dispatch and query the types involved with only limited extra code.
This should make future changes a bit harder to get wrong.
DeltaFile
+36-0clang-tools-extra/clang-doc/Representation.h
+10-17clang-tools-extra/clang-doc/Representation.cpp
+8-8clang-tools-extra/clang-doc/BitcodeWriter.cpp
+6-6clang-tools-extra/clang-doc/Serialize.cpp
+5-5clang-tools-extra/clang-doc/YAMLGenerator.cpp
+5-5clang-tools-extra/clang-doc/JSONGenerator.cpp
+70-412 files not shown
+77-528 files

LLVM/project e076ae4llvm/include/llvm/CodeGen MachineInstr.h, llvm/include/llvm/Transforms/IPO Attributor.h

[CodeGen][Transforms] Remove unused DenseMapInfo::getEmptyKey (#201994)

After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by
DenseMap. Remove the unused getEmptyKey definitions and dead sentinel
uses.
DeltaFile
+5-38llvm/lib/Transforms/Scalar/EarlyCSE.cpp
+0-21llvm/lib/Transforms/IPO/AttributorAttributes.cpp
+0-19llvm/include/llvm/Transforms/IPO/Attributor.h
+1-16llvm/lib/Transforms/Utils/Local.cpp
+1-12llvm/lib/CodeGen/MachineOutliner.cpp
+3-9llvm/include/llvm/CodeGen/MachineInstr.h
+10-11536 files not shown
+12-27542 files

LLVM/project 25a492bllvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 split-node-reused-and-reordered-operand.ll

[SLP]Keep reuse mask in sync when reordering split node operand

When reorderBottomToTop uses an operand order for a split vectorize
node and the operand has both reordered and reused scalars, only the
reorder indices were cleared while the reuse mask was left stale. This
diverged the split node scalars from the operand effective order.

Fixes #202003

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/202084
DeltaFile
+106-0llvm/test/Transforms/SLPVectorizer/X86/split-node-reused-and-reordered-operand.ll
+8-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+114-02 files

LLVM/project 825d760lld/wasm SyntheticSections.h

[lld][WebAssembly] Remove vestigial ImportKey::State after DenseMapInfo cleanup (#202082)

Unused after #201989 removed getEmptyKey()
DeltaFile
+3-10lld/wasm/SyntheticSections.h
+3-101 files

LLVM/project c5c9676clang-tools-extra/include-cleaner/include/clang-include-cleaner Types.h, clang/include/clang/Basic FileEntry.h DirectoryEntry.h

[clang][clang-tools-extra] Remove unused DenseMapInfo::getEmptyKey (#201987)

After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by
DenseMap. Remove the unused getEmptyKey definitions and dead sentinel
uses.
DeltaFile
+0-22clang/lib/AST/ItaniumCXXABI.cpp
+0-21clang/include/clang/Basic/FileEntry.h
+0-20clang/include/clang/Basic/DirectoryEntry.h
+0-17clang-tools-extra/include-cleaner/include/clang-include-cleaner/Types.h
+0-13clang/lib/APINotes/APINotesFormat.h
+0-13clang/include/clang/Basic/SourceLocation.h
+0-10645 files not shown
+2-35351 files

LLVM/project 02b26ecllvm/lib/Transforms/Scalar LoopInterchange.cpp

[LoopInterchange] Remove unnecessary type check (NFC) (#202073)

As mentioned in #200913, there is an unnecessay type check. Let's remove
it.
DeltaFile
+0-2llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+0-21 files

LLVM/project e910a52llvm/lib/Target/M68k M68kInstrFormats.td, llvm/lib/Target/M68k/Disassembler M68kDisassembler.cpp

[M68k] Disassemble index suppress in the full extension word correctly (#202080)

When the IS (Index Suppress) bit in the full extension word is set, we
need to use NoReg for the index register in the decoded MCInst. This was
not properly supported in the disassembler before.

This patch fixes this issue by using a pseudo 5-bit "register" binary
encoding for index register, where the first 4 bits carry the actual
register number and the last bit (at MSB) indicates whether we suppress
index register or not.
DeltaFile
+13-0llvm/lib/Target/M68k/Disassembler/M68kDisassembler.cpp
+2-5llvm/lib/Target/M68k/M68kInstrFormats.td
+4-1llvm/lib/Target/M68k/MCTargetDesc/M68kMCCodeEmitter.cpp
+3-0llvm/test/MC/Disassembler/M68k/data.txt
+22-64 files

LLVM/project 19f96a9llvm/lib/Object DXContainer.cpp

[DirectX][ObjectYAML] Fix SRCI Names parsing on Big Endian (#202020)

```
Names.Parameters = HeaderOnDisk;
```
converts SRCI Names section header from little endian to platform native
byte order (in converting constructor).
Therefore, extra
```
  if (sys::IsBigEndianHost)
    Names.Parameters.swapBytes();
```
can swap bytes of the header fields again, causing an error on SPARC:
```
SRCI Names section content ends beyond the section boundary
```

Fix that.
DeltaFile
+0-2llvm/lib/Object/DXContainer.cpp
+0-21 files

LLVM/project 3232b4dllvm/include/llvm/Analysis IRSimilarityIdentifier.h ScalarEvolution.h, llvm/include/llvm/IR ValueHandle.h ModuleSummaryIndex.h

[IR][Analysis] Remove unused DenseMapInfo::getEmptyKey (#201997)

After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by
DenseMap. Remove the unused getEmptyKey definitions and dead sentinel
uses.
DeltaFile
+0-34llvm/lib/IR/LLVMContextImpl.h
+1-13llvm/include/llvm/IR/ValueHandle.h
+1-13llvm/include/llvm/IR/ModuleSummaryIndex.h
+0-12llvm/include/llvm/IR/Attributes.h
+1-11llvm/include/llvm/Analysis/IRSimilarityIdentifier.h
+0-10llvm/include/llvm/Analysis/ScalarEvolution.h
+3-9314 files not shown
+5-16220 files

LLVM/project c384de1llvm/lib/Transforms/Vectorize VPlanTransforms.cpp

[VPlan] Prevent dangling references to trip count after expansion. (#201924)

Set trip count to Poison after expanding SCEVs to VPInstructions. getTripCount should not be used after that other than printing; setting to poison avoids accessing dangling references.
DeltaFile
+4-1llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+4-11 files

LLVM/project 3501495llvm/test/CodeGen/X86 kshift.ll

[X86] kshift.ll - regenerate VPTERNLOG asm comments (#202055)
DeltaFile
+12-12llvm/test/CodeGen/X86/kshift.ll
+12-121 files

LLVM/project 371dacdlldb/include/lldb/Host HostThread.h, lldb/include/lldb/Symbol SymbolContext.h

[lldb] Remove unused DenseMapInfo::getEmptyKey (#201990)

After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by
DenseMap. Remove the unused getEmptyKey definitions and dead sentinel
uses.
DeltaFile
+0-13lldb/include/lldb/Symbol/SymbolContext.h
+0-4lldb/include/lldb/Utility/ConstString.h
+0-4lldb/include/lldb/Host/HostThread.h
+1-2lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+0-3lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
+0-3lldb/include/lldb/Utility/UUID.h
+1-293 files not shown
+1-369 files

LLVM/project 82e436cllvm/include/llvm/BinaryFormat WasmTraits.h, llvm/include/llvm/CAS CASReference.h

[llvm] Remove unused DenseMapInfo::getEmptyKey (#201996)

After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by
DenseMap. Remove the unused getEmptyKey definitions and dead sentinel
uses.
DeltaFile
+0-34llvm/include/llvm/ExecutionEngine/Orc/SymbolStringPool.h
+13-2llvm/unittests/Object/MinidumpTest.cpp
+0-15llvm/include/llvm/BinaryFormat/WasmTraits.h
+0-14llvm/include/llvm/CAS/CASReference.h
+1-9llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h
+1-8llvm/tools/llvm-reduce/deltas/Delta.h
+15-8220 files not shown
+17-15726 files

LLVM/project f7f6e6fmlir/include/mlir/IR TypeRange.h Value.h, mlir/include/mlir/TableGen Pattern.h

[mlir] Remove unused DenseMapInfo::getEmptyKey (#201991)

After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by
DenseMap. Remove the unused getEmptyKey definitions and dead sentinel
uses.
DeltaFile
+0-18mlir/include/mlir/IR/TypeRange.h
+0-16mlir/include/mlir/IR/Value.h
+0-12mlir/include/mlir/IR/Attributes.h
+0-11mlir/lib/TableGen/Constraint.cpp
+0-8mlir/include/mlir/IR/OperationSupport.h
+0-8mlir/include/mlir/TableGen/Pattern.h
+0-7330 files not shown
+2-19036 files

LLVM/project 4f265ceclang-tools-extra/clang-tidy/altera IdDependentBackwardBranchCheck.cpp IdDependentBackwardBranchCheck.h, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] Fix `altera-id-dependent-backward-branch` false positives (#200660)

The check unconditionally marked the LHS of any assignment from a
variable or field as ID-dependent. As a result, ordinary assignments
like `x = y` or `i += chunk_size` could trigger false positives in later
loop conditions.

Only propagate ID-dependency when the RHS variable or field is already
known ID-dependent.

Based on the fix by @yeputons, with helper renaming and extra tests for
ordinary assignments, fields, macros, aliases, cv/ref cases, lambdas,
templates, concepts, and the #53777 range-for case.

Fix #52790
Fix #53777

Assisted by Codex.
DeltaFile
+165-0clang-tools-extra/test/clang-tidy/checkers/altera/id-dependent-backward-branch.cpp
+22-12clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.cpp
+10-10clang-tools-extra/clang-tidy/altera/IdDependentBackwardBranchCheck.h
+5-0clang-tools-extra/docs/ReleaseNotes.rst
+202-224 files

LLVM/project 2e0fd90llvm/lib/Transforms/Vectorize VPlan.cpp, llvm/test/Transforms/LoopVectorize/VPlan vplan-sink-scalars-and-merge.ll first-order-recurrence-sink-replicate-region.ll

[VPlan] Only print original trip count if it is used. (#202069)

Similarly to other VPlan-scope values, only print trip count when it has
users for consistency.
DeltaFile
+9-20llvm/test/Transforms/LoopVectorize/VPlan/vplan-sink-scalars-and-merge.ll
+1-7llvm/test/Transforms/LoopVectorize/VPlan/first-order-recurrence-sink-replicate-region.ll
+2-5llvm/unittests/Transforms/Vectorize/VPlanTest.cpp
+0-2llvm/test/Transforms/LoopVectorize/VPlan/vplan-printing-flags.ll
+0-2llvm/test/Transforms/LoopVectorize/VPlan/conditional-scalar-assignment-vplan.ll
+1-1llvm/lib/Transforms/Vectorize/VPlan.cpp
+13-376 files not shown
+13-4312 files

LLVM/project 8d5b7f7llvm/lib/Transforms/InstCombine InstCombineVectorOps.cpp, llvm/test/Transforms/InstCombine fold-zext-of-deinterleave.ll

[InstCombine] Fix incorrect insert point when folding zext of deinterleave (#201977)

Fix invalid module crash in
https://github.com/llvm/llvm-project/pull/195330#issuecomment-4635245035

The problem was caused by incorrect IRBuilder insertion point. The
insertion point used when generating new instructions might not dominate
all the de-interleave fields users. This patch fixes this issue by
explicitly setting the insertion point to either
`llvm.vector.deinterleave2` or the earliest `shufflevector` instruction
(in the de-interleaving group) within the same basicblock.
DeltaFile
+26-0llvm/test/Transforms/InstCombine/fold-zext-of-deinterleave.ll
+15-6llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
+41-62 files

LLVM/project 7ac94f8llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU/GlobalISel minmaxabs-i64.ll

AMDGPU/GlobalISel: RegBankLegalize rules for 64 bit s_min/max and u_min/max
DeltaFile
+6-2llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+1-1llvm/test/CodeGen/AMDGPU/GlobalISel/minmaxabs-i64.ll
+7-32 files

LLVM/project 5605eb0llvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU packed-fp32.ll

AMDGPU/GlobalISel: RegBankLegalize rules for v_pk_add/mul_f32
DeltaFile
+451-134llvm/test/CodeGen/AMDGPU/packed-fp32.ll
+3-1llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+454-1352 files

LLVM/project 969481cllvm/lib/Target/AMDGPU AMDGPURegBankLegalizeRules.cpp, llvm/test/CodeGen/AMDGPU llvm.amdgcn.cvt.scalef32.pk.gfx950.ll llvm.amdgcn.cvt.scale.pk.ll

AMDGPU/GlobalISel: RegBankLegalize rules for cvt_scale intrinsics
DeltaFile
+470-89llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.pk.gfx950.ll
+425-3llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scale.pk.ll
+216-0llvm/lib/Target/AMDGPU/AMDGPURegBankLegalizeRules.cpp
+161-9llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.pk.ll
+163-1llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.pk8.ll
+163-1llvm/test/CodeGen/AMDGPU/llvm.amdgcn.cvt.scalef32.sr.pk.gfx1250.ll
+1,598-1034 files not shown
+1,930-10610 files

LLVM/project 731dd05lldb/source/API SBDebugger.cpp, lldb/test/API/python_api/default-constructor sb_debugger.py

[lldb] Add nullptr check in GetBroadcaster (#201769)

I recently noticed LLDB crash during execution of `script
print(lldb.SBDebugger().GetBroadcaster().GetName())` command:
```
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.      Program arguments: /home/sergei/llvm-project/build/bin/lldb-dap
 #0 0x000062735c3403d2 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/sergei/llvm-project/build/bin/lldb-dap+0x7c3d2)
 #1 0x000062735c33d7ec llvm::sys::RunSignalHandlers() (/home/sergei/llvm-project/build/bin/lldb-dap+0x797ec)
 #2 0x000062735c33d94c SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x00007eaa6aa45330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
 #4 0x00007eaa6bb0c092 lldb::SBBroadcaster::GetName() const (/home/sergei/llvm-project/build/bin/../lib/liblldb.so.23.0git+0x90c092)
 #5 0x00007eaa6bcb9a5d _wrap_SBBroadcaster_GetName LLDBWrapPython.cpp:0:0
 #6 0x00007eaa6a1df5f5 (/lib/x86_64-linux-gnu/libpython3.12.so.1.0+0x1df5f5)
 #7 0x00007eaa6a182b2c PyObject_Vectorcall (/lib/x86_64-linux-gnu/libpython3.12.so.1.0+0x182b2c)
 #8 0x00007eaa6a11d5ee _PyEval_EvalFrameDefault (/lib/x86_64-linux-gnu/libpython3.12.so.1.0+0x11d5ee)
 #9 0x00007eaa6a2a091f PyEval_EvalCode (/lib/x86_64-linux-gnu/libpython3.12.so.1.0+0x2a091f)
#10 0x00007eaa6a29c8b0 (/lib/x86_64-linux-gnu/libpython3.12.so.1.0+0x29c8b0)

    [17 lines not shown]
DeltaFile
+5-2lldb/source/API/SBDebugger.cpp
+2-0lldb/test/API/python_api/default-constructor/sb_debugger.py
+7-22 files

LLVM/project 62889d4llvm/lib/TargetParser RISCVISAInfo.cpp

Update llvm/lib/TargetParser/RISCVISAInfo.cpp

Co-authored-by: Craig Topper <craig.topper at sifive.com>
DeltaFile
+3-5llvm/lib/TargetParser/RISCVISAInfo.cpp
+3-51 files

LLVM/project 8e1afdacompiler-rt/lib/asan asan_shadow_setup.cpp

[ASan] Skip high-shadow and gap setup when HighMem region is empty (#202037)

On targets where the shadow offset sits above all addressable user
memory (e.g. Alpha with ASAN_SHADOW_OFFSET=0x70000000000 and a 42-bit
user VAS), kHighMemBeg is set above kHighMemEnd so the HighMem region is
empty. Since MEM_TO_SHADOW is monotonically increasing, kHighMemBeg >
kHighMemEnd implies kHighShadowBeg > kHighShadowEnd. Calling
ReserveShadowMemoryRange(kHighShadowBeg, kHighShadowEnd) passes size =
kHighShadowEnd - kHighShadowBeg + 1, which underflows to a large
negative value, and mmap() fails with ENOMEM.

ProtectGap is also skipped: there is no meaningful shadow gap between
LowShadow and an empty HighShadow.

Guard both operations on kHighMemBeg <= kHighMemEnd.
DeltaFile
+13-5compiler-rt/lib/asan/asan_shadow_setup.cpp
+13-51 files

LLVM/project 7ef1b22llvm/test/CodeGen/AMDGPU vector-reduce-fmax.ll vector-reduce-fmin.ll

[AMDGPU][GISel] Fold 'min(min(x,y),z)' and 'max(max(x,y),z)' into min3 and max3 (#200410)

Original PR: https://github.com/llvm/llvm-project/pull/124263
Fixes: https://github.com/llvm/llvm-project/issues/123079
DeltaFile
+579-699llvm/test/CodeGen/AMDGPU/vector-reduce-fmax.ll
+579-699llvm/test/CodeGen/AMDGPU/vector-reduce-fmin.ll
+371-552llvm/test/CodeGen/AMDGPU/vector-reduce-smin.ll
+371-552llvm/test/CodeGen/AMDGPU/vector-reduce-smax.ll
+363-547llvm/test/CodeGen/AMDGPU/vector-reduce-umax.ll
+301-443llvm/test/CodeGen/AMDGPU/vector-reduce-umin.ll
+2,564-3,49211 files not shown
+4,046-3,74817 files

LLVM/project 1ab6164bolt/include/bolt/Passes DataflowAnalysis.h SplitFunctions.h, bolt/include/bolt/Profile DataReader.h

[BOLT] Remove unused DenseMapInfo::getEmptyKey (#201986)

After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by
DenseMap. Remove the unused getEmptyKey definitions and dead sentinel
uses.
DeltaFile
+0-5bolt/include/bolt/Passes/DataflowAnalysis.h
+0-3bolt/include/bolt/Profile/DataReader.h
+0-1bolt/include/bolt/Passes/SplitFunctions.h
+0-93 files

LLVM/project 6b5883bpolly/include/polly/Support VirtualInstruction.h

[Polly] Remove unused DenseMapInfo::getEmptyKey (#201992)

After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by
DenseMap. Remove the unused getEmptyKey definitions and dead sentinel
uses.
DeltaFile
+0-7polly/include/polly/Support/VirtualInstruction.h
+0-71 files

LLVM/project eafc7b6lld/COFF Chunks.h, lld/MachO ConcatOutputSection.h

[lld] Remove unused DenseMapInfo::getEmptyKey (#201989)

After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by
DenseMap. Remove the unused getEmptyKey definitions and dead sentinel
uses.
DeltaFile
+0-11lld/MachO/ConcatOutputSection.h
+0-5lld/wasm/SyntheticSections.h
+0-3lld/COFF/Chunks.h
+0-193 files