LLVM/project b7086e6llvm/test/Transforms/LoopInterchange fp-reductions.ll reductions-across-inner-and-outer-loop.ll

[LoopInterchange] Use UTC as much as possible (NFC)
DeltaFile
+364-49llvm/test/Transforms/LoopInterchange/fp-reductions.ll
+209-117llvm/test/Transforms/LoopInterchange/reductions-across-inner-and-outer-loop.ll
+251-37llvm/test/Transforms/LoopInterchange/reductions-non-wrapped-operations.ll
+188-40llvm/test/Transforms/LoopInterchange/legality-for-scalar-deps.ll
+148-33llvm/test/Transforms/LoopInterchange/profitability-vectorization-heuristic.ll
+97-45llvm/test/Transforms/LoopInterchange/currentLimitation.ll
+1,257-32116 files not shown
+2,063-56222 files

LLVM/project b542c92flang/lib/Optimizer/CodeGen CodeGen.cpp, flang/test/Fir/CUDA cuda-code-gen.mlir

[flang][CUDA] Allocate converted kernel descriptors in device-accessible storage (#201950)

Fix CUDA descriptor lowering when an `fir.embox` result reaches a
`gpu.launch_func` through an intermediate `fir.convert`.

CodeGen previously failed to recognize this use chain and could place
the descriptor in host stack storage. Since CUDA kernels may dereference
assumed-shape descriptors on the device, such descriptors must be
allocated through the CUDA descriptor allocation path. Teach the
GPU-launch-use check to look through `fir.convert` so these descriptors
are lowered with `_FortranACUFAllocDescriptor`.

Also adds a regression test for the `fir.embox -> fir.convert ->
gpu.launch_func` case.
DeltaFile
+30-0flang/test/Fir/CUDA/cuda-code-gen.mlir
+24-5flang/lib/Optimizer/CodeGen/CodeGen.cpp
+54-52 files

LLVM/project 2aa5210.ci compute_projects_test.py compute_projects.py, .github/workflows libclang-python-tests.yml

CI: move libclang python byindings tests to main CI

This removes the separate python bindings CI, which run on the GitHub free
runners and take more than one hour to build libclang.

The tests are executed instead in the monolithic pipelines,
whenever clang would be tested.

This is fine in terms of resources because all the dependencies are
built anyway, and the tests themselves take less than one second to
run on the free runners.
DeltaFile
+0-60.github/workflows/libclang-python-tests.yml
+13-12.ci/compute_projects_test.py
+1-1.ci/compute_projects.py
+2-0clang/bindings/python/tests/cindex/test_source_range.py
+1-0clang/bindings/python/tests/cindex/test_translation_unit.py
+17-735 files

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

[clang] Reland: fix getTemplateInstantiationArgs (#202088)

Relands https://github.com/llvm/llvm-project/pull/199528
Previous: #201373

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

    [2 lines not shown]
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,05756 files not shown
+1,505-1,71762 files

LLVM/project dfae3c0.ci compute_projects_test.py compute_projects.py, .github/workflows libclang-python-tests.yml

CI: move libclang python byindings tests to main CI

This removes the separate python bindings CI, which run on the GitHub free
runners and take more than one hour to build libclang.

The tests are executed instead in the monolithic pipelines,
whenever clang would be tested.

This is fine in terms of resources because all the dependencies are
built anyway, and the tests themselves take less than one second to
run on the free runners.
DeltaFile
+0-60.github/workflows/libclang-python-tests.yml
+13-12.ci/compute_projects_test.py
+6-3clang/bindings/python/tests/cindex/test_source_range.py
+3-1clang/bindings/python/tests/cindex/test_translation_unit.py
+1-1.ci/compute_projects.py
+23-775 files

LLVM/project 197282cllvm/test/Transforms/LoopInterchange reduction-anyof.ll reductions-non-wrapped-operations.ll

[LoopInterchange] Add test for loop contains AnyOf reduction (NFC)
DeltaFile
+90-0llvm/test/Transforms/LoopInterchange/reduction-anyof.ll
+0-42llvm/test/Transforms/LoopInterchange/reductions-non-wrapped-operations.ll
+90-422 files

LLVM/project 498307bllvm/lib/Transforms/Scalar LoopInterchange.cpp, llvm/test/Transforms/LoopInterchange reduction-anyof.ll

[LoopInterchange] Reject interchange when AnyOf reduction exists
DeltaFile
+10-22llvm/test/Transforms/LoopInterchange/reduction-anyof.ll
+0-1llvm/lib/Transforms/Scalar/LoopInterchange.cpp
+10-232 files

LLVM/project 11496fallvm/include/llvm/ADT DenseMapInfo.h CachedHashString.h

[ADT] Remove unused DenseMapInfo::getEmptyKey (#201998)

After #201281 DenseMapInfo<T>::getEmptyKey() is no longer used by
DenseMap. Remove the unused getEmptyKey definitions and dead sentinel
uses.
DeltaFile
+6-65llvm/include/llvm/ADT/DenseMapInfo.h
+5-20llvm/include/llvm/ADT/CachedHashString.h
+1-11llvm/include/llvm/ADT/ArrayRef.h
+1-10llvm/include/llvm/ADT/StringRef.h
+0-9llvm/include/llvm/ADT/PointerSumType.h
+0-8llvm/include/llvm/ADT/APFixedPoint.h
+13-12320 files not shown
+15-19026 files

LLVM/project c44a8fflibc/include/llvm-libc-macros stdfix-macros.h, libc/src/__support/FPUtil/arm sqrt.h

[libc][math] Fix arm-linux-gnueabihf target when building with gcc/g++. (#202090)

- `arm-linux-gnueabihf-gcc` defines fixed point macros (like
`__FRACT_FBIT__`) but does not support `_Fract` and `_Accum` types by
default. We just limit the fixed point support to clang for now.
- Specify the types for the sqrt instructions we use for ARM target.

Tested with:
```
$ cmake ../runtimes -GNinja -DLLVM_ENABLE_RUNTIMES=libc -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc-12 \
    -DCMAKE_CXX_COMPILER=arm-linux-gnueabihf-g++-12 \
    -DLIBC_TARGET_TRIPLE=arm-linux-gnueabihf
$ export QEMU_LD_PREFIX=/usr/arm-linux-gnueabihf
$ ninja libc-shared-tests
```

https://github.com/llvm/llvm-project/issues/201678.
DeltaFile
+2-2libc/src/__support/FPUtil/arm/sqrt.h
+1-1libc/include/llvm-libc-macros/stdfix-macros.h
+3-32 files

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