LLVM/project 26ba308llvm/lib/Transforms/Vectorize SLPVectorizer.cpp

[SLP][NFC] Simplify range/type accessors

Use the range-friendly llvm::accumulate() overload instead of the
two-iterator std::accumulate() form, drop redundant cast<>/dyn_cast<>
calls where the source already provides a typed accessor.

Reviewers: 

Pull Request: https://github.com/llvm/llvm-project/pull/192811
DeltaFile
+71-76llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+71-761 files

LLVM/project f8db23allvm/lib/Transforms/Vectorize SLPVectorizer.cpp

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+71-76llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+71-761 files

LLVM/project 0053d66mlir/test/Interfaces/TilingInterface tile-elementwise.mlir

[mlir][linalg][elementwise] Add tests for tiling elementwise operation. (#192798)
DeltaFile
+265-0mlir/test/Interfaces/TilingInterface/tile-elementwise.mlir
+265-01 files

LLVM/project 5bcac7bllvm/lib/Transforms/Vectorize VPlanVerifier.cpp VPlanUtils.cpp, llvm/unittests/Transforms/Vectorize VPlanVerifierTest.cpp VPlanTestBase.h

[VPlan] Fix isLatch to handle BranchOnTwoConds, check verifier.(NFC) (#192808)

Update `isLatch` to handle BranchOnTwoConds,
in preparation to enable running the verifier on earlier VPlans.
DeltaFile
+58-0llvm/unittests/Transforms/Vectorize/VPlanVerifierTest.cpp
+7-0llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
+4-2llvm/unittests/Transforms/Vectorize/VPlanTestBase.h
+3-3llvm/lib/Transforms/Vectorize/VPlanUtils.cpp
+72-54 files

LLVM/project f660ae2clang/include/clang/AST ASTContext.h, clang/lib/AST ASTContext.cpp ItaniumMangle.cpp

[clang] implement CWG2064: ignore value dependence for decltype

The 'decltype' for a value-dependent (but non-type-dependent) should be known,
so this patch makes them non-opaque instead.

This patch also implements what's neceessary to allow overloading
on pure differences in instantiation dependence, making `std::void_t`
usable for SFINAE purposes.

This also readds a few test cases from da98651, which was a previous attempt
at resolving CWG2064.

Fixes #8740
Fixes #61818
Fixes #190388
DeltaFile
+906-175clang/lib/AST/ASTContext.cpp
+312-12clang/test/SemaTemplate/instantiation-dependence.cpp
+151-93clang/lib/AST/ItaniumMangle.cpp
+76-68clang/lib/AST/Type.cpp
+76-48clang/lib/Sema/SemaTemplate.cpp
+93-16clang/include/clang/AST/ASTContext.h
+1,614-41282 files not shown
+2,369-77588 files

LLVM/project e70a2e8llvm/lib/Transforms/Vectorize VPlanVerifier.cpp, llvm/unittests/Transforms/Vectorize VPlanVerifierTest.cpp

[VPlan] Allow same predecessor multiple times in the verifier. (NFC) (#192809)

IR instructions like switch lead to initial VPlans with blocks that have
the same predecessor multiple times. Allow it in the verifier.
DeltaFile
+0-25llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp
+4-16llvm/unittests/Transforms/Vectorize/VPlanVerifierTest.cpp
+4-412 files

LLVM/project 28e6b46clang/docs ReleaseNotes.rst, clang/lib/AST StmtProfile.cpp

[clang] fix profiling of pack index expressions

This replaces a few incorrect calls of VisitExpr on subcomponents,
which should have been plain `Visit` instead, because the former
just implements the commonality between all kind-specific profile
functions (marking the class kind and visiting children).

So this for example would visit a DeclRefExpr but not actually profile
any of it's properties, like the parameter declaration, so it would fail
to distinguish between DeclRefExps referencing distinct entities.

This also adds a call to record the PackIndexExpr's kind in the profile,
to avoid false positives when comparing expressions with different kinds.
DeltaFile
+10-0clang/test/SemaCXX/cxx2c-pack-indexing.cpp
+3-3clang/lib/AST/StmtProfile.cpp
+2-1clang/docs/ReleaseNotes.rst
+15-43 files

LLVM/project b462cdfclang/docs ReleaseNotes.rst, clang/lib/Sema SemaTemplateInstantiate.cpp SemaTemplateDeductionGuide.cpp

[clang] fix a bug matching constrained out-of-line definitions of class member functions

The method which gathered the template arguments for transforming constraints
was incorrectly skipping adding the arguments for function templates which are
class members.

This fixes that, and removes an undocumented workaround for template alias CTAD.

Also adds a test case showing #139276 causes a profiling issue with PackIndexExprs,
which for the tests added in that PR gave the false impression they were fixing the
problem, but were actually causing the implementation to be too accepting, which
masked the bug solved in this patch.
DeltaFile
+46-48clang/lib/Sema/SemaTemplateInstantiate.cpp
+76-2clang/test/SemaTemplate/concepts-out-of-line-def.cpp
+6-45clang/lib/Sema/SemaTemplateDeductionGuide.cpp
+1-0clang/docs/ReleaseNotes.rst
+129-954 files

LLVM/project 34c864cclang/docs ReleaseNotes.rst, clang/lib/Sema SemaTemplateInstantiate.cpp SemaTemplateDeductionGuide.cpp

[clang] fix a bug matching constrained out-of-line definitions of class member functions

The method which gathered the template arguments for transforming constraints
was incorrectly skipping adding the arguments for function templates which are
class members.

This fixes that, and removes an undocumented workaround for template alias CTAD.

Also adds a test case showing #139276 causes a profiling issue with PackIndexExprs,
which for the tests added in that PR gave the false impression they were fixing the
problem, but were actually causing the implementation to be too accepting, which
masked the bug solved in this patch.
DeltaFile
+46-48clang/lib/Sema/SemaTemplateInstantiate.cpp
+63-2clang/test/SemaTemplate/concepts-out-of-line-def.cpp
+6-45clang/lib/Sema/SemaTemplateDeductionGuide.cpp
+1-0clang/docs/ReleaseNotes.rst
+116-954 files

LLVM/project 9a608ballvm/lib/Transforms/Vectorize SLPVectorizer.cpp

Address comments

Created using spr 1.3.7
DeltaFile
+16-3llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+16-31 files

LLVM/project cc261c5clang/docs ReleaseNotes.rst, clang/lib/Sema SemaTemplateInstantiate.cpp SemaTemplateDeductionGuide.cpp

[clang] fix a bug matching constrained out-of-line definitions of class member functions

The method which gathered the template arguments for transforming constraints
was incorrectly skipping adding the arguments for function templates which are
class members.

This fixes that, and removes an undocumented workaround for template alias CTAD.

Also adds a test case showing #139276 causes a profiling issue with PackIndexExprs,
which for the tests added in that PR gave the false impression they were fixing the
problem, but were actually causing the implementation to be too accepting, which
masked the bug solved in this patch.
DeltaFile
+46-48clang/lib/Sema/SemaTemplateInstantiate.cpp
+63-2clang/test/SemaTemplate/concepts-out-of-line-def.cpp
+6-45clang/lib/Sema/SemaTemplateDeductionGuide.cpp
+1-0clang/docs/ReleaseNotes.rst
+116-954 files

LLVM/project b7f54fdlibc/shared/math logbbf16.h, libc/src/__support/math logbbf16.h CMakeLists.txt

[libc][math] Refactor logbbf16 to header-only (#189194)

Co-authored-by: bassiounix <muhammad.m.bassiouni at gmail.com>
DeltaFile
+27-0libc/src/__support/math/logbbf16.h
+23-0libc/shared/math/logbbf16.h
+16-0utils/bazel/llvm-project-overlay/libc/BUILD.bazel
+11-0libc/src/__support/math/CMakeLists.txt
+4-5libc/src/math/generic/logbbf16.cpp
+1-5libc/src/math/generic/CMakeLists.txt
+82-104 files not shown
+89-1010 files

LLVM/project f8921c6clang/docs ReleaseNotes.rst, clang/lib/Sema SemaTemplateInstantiate.cpp SemaTemplateDeductionGuide.cpp

[clang] fix a bug matching constrained out-of-line definitions of class member functions

The method which gathered the template arguments for transforming constraints
was incorrectly skipping adding the arguments for function templates which are
class members.

This fixes that, and removes an undocumented workaround for template alias CTAD.

Also adds a test case showing #139276 causes a profiling issue with PackIndexExprs,
which for the tests added in that PR gave the false impression they were fixing the
problem, but were actually causing the implementation to be too accepting, which
masked the bug solved in this patch.
DeltaFile
+46-48clang/lib/Sema/SemaTemplateInstantiate.cpp
+64-2clang/test/SemaTemplate/concepts-out-of-line-def.cpp
+6-45clang/lib/Sema/SemaTemplateDeductionGuide.cpp
+1-0clang/docs/ReleaseNotes.rst
+117-954 files

LLVM/project 6ad7d55llvm/lib/Target/AArch64 AArch64ConditionalCompares.cpp AArch64.h, llvm/test/CodeGen/AArch64 ccmp-look-through-copy.mir ccmp-successor-probs.mir

[NewPM] Adds a port for AArch64ConditionalComparesPass (#192755)

Adds a standard porting for AArch64ConditionalCompares.
DeltaFile
+76-26llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp
+8-1llvm/lib/Target/AArch64/AArch64.h
+1-1llvm/lib/Target/AArch64/AArch64TargetMachine.cpp
+1-0llvm/lib/Target/AArch64/AArch64PassRegistry.def
+1-0llvm/test/CodeGen/AArch64/ccmp-look-through-copy.mir
+1-0llvm/test/CodeGen/AArch64/ccmp-successor-probs.mir
+88-286 files

LLVM/project 5809100llvm/lib/FileCheck FileCheck.cpp, llvm/test/FileCheck/diff diff-multi-mismatch.txt diff-multi-block.txt

Revert "[FileCheck] Add a diff output option for FileCheck (#187120)" (#192803)

This reverts commit 40333cde2bbd62936d67478eab15ed1fa55b0532.

The implementation is buggy. There are thousands of failures in
```
FILECHECK_OPTS=--diff ninja -C /tmp/Rel check-llvm-mc
FILECHECK_OPTS=--diff ninja -C /tmp/Rel check-lld-elf
```
DeltaFile
+24-220llvm/lib/FileCheck/FileCheck.cpp
+0-36llvm/test/FileCheck/diff/diff-multi-mismatch.txt
+0-32llvm/test/FileCheck/diff/diff-multi-block.txt
+0-30llvm/test/FileCheck/diff/diff-resync-after-noise.txt
+0-25llvm/test/FileCheck/diff/diff-multi-failres.txt
+0-23llvm/test/FileCheck/diff/diff-resync-high-noise.txt
+24-36613 files not shown
+29-55219 files

LLVM/project 9d193adlldb/scripts gen-property-docs-from-json.py

[lldb] Avoid NotRequired for Python < 3.11 compatibility (#192723)

NotRequired was added in Python 3.11, while the minimum supported Python
for LLDB is 3.8. Avoid it by using `Dict[str, Any]` instead.
DeltaFile
+2-19lldb/scripts/gen-property-docs-from-json.py
+2-191 files

LLVM/project 769d8d2llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/AArch64 externally-used-copyables.ll

[𝘀𝗽𝗿] initial version

Created using spr 1.3.7
DeltaFile
+98-126llvm/test/Transforms/SLPVectorizer/AArch64/externally-used-copyables.ll
+173-46llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+27-27llvm/test/Transforms/SLPVectorizer/X86/parent-node-schedulable-with-multi-copyables.ll
+20-23llvm/test/Transforms/SLPVectorizer/X86/parent-node-split-non-schedulable.ll
+13-22llvm/test/Transforms/SLPVectorizer/X86/reduced-val-extracted-and-externally-used.ll
+12-14llvm/test/Transforms/SLPVectorizer/X86/deleted-node-with-copyable-operands.ll
+343-2586 files not shown
+377-29212 files

LLVM/project d1dcce6llvm/test/CodeGen/X86 pr169485.ll

[X86] Add crash test coverage for #169485 (#192797)
DeltaFile
+24-0llvm/test/CodeGen/X86/pr169485.ll
+24-01 files

LLVM/project 54257d3flang/lib/Semantics resolve-directives.cpp check-omp-structure.cpp, flang/test/Semantics/OpenMP deprecation.f90 clause-validity01.f90

[flang][OpenMP] Move directive deprecation check to semantic checks

Replace IssueNonConformanceWarning in resolve-directives.cpp with
CheckDirectiveDeprecation in check-omp-structure.cpp.
DeltaFile
+0-59flang/lib/Semantics/resolve-directives.cpp
+31-0flang/lib/Semantics/check-omp-structure.cpp
+6-6flang/test/Semantics/OpenMP/deprecation.f90
+2-2flang/test/Semantics/OpenMP/clause-validity01.f90
+1-0flang/lib/Semantics/check-omp-structure.h
+40-675 files

LLVM/project 06d91cfllvm/lib/Target/AMDGPU AMDGPUMCResourceInfo.cpp AMDGPUResourceUsageAnalysis.cpp, llvm/test/CodeGen/AMDGPU object-linking-local-resources.ll

[AMDGPU] Report only local per-function resource usage when object linking is enabled

With object linking the linker aggregates resource usage across TUs, so
compile-time pessimism and call-graph propagation duplicate the linker's work or
pollute its inputs.

In this mode, skip the per-callsite conservative bumps in
`AMDGPUResourceUsageAnalysis` and assign each resource symbol in
`AMDGPUMCResourceInfo` a concrete local constant instead of building call-graph
`max`/`or` expressions.
DeltaFile
+104-0llvm/test/CodeGen/AMDGPU/object-linking-local-resources.ll
+26-8llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.cpp
+10-1llvm/lib/Target/AMDGPU/AMDGPUResourceUsageAnalysis.cpp
+4-0llvm/lib/Target/AMDGPU/AMDGPUMCResourceInfo.h
+144-94 files

LLVM/project 4fb21a1llvm/include/llvm/IR PatternMatch.h, llvm/lib/Analysis ValueTracking.cpp InstructionSimplify.cpp

[IR] Add icmp like matcher (NFC) (#192746)

matches icmp and trunc nuw x to i1 (icmp ne x,0)
DeltaFile
+10-22llvm/lib/Analysis/ValueTracking.cpp
+29-0llvm/include/llvm/IR/PatternMatch.h
+2-6llvm/lib/Analysis/InstructionSimplify.cpp
+41-283 files

LLVM/project da6ca20llvm/lib/Transforms/Vectorize VPlanCFG.h VPlanConstruction.cpp

[VPlan] Strip vp_post_order_{deep,shallow} (NFC) (#192787)

Post 691a130 ([ADT] Refactor post order traversal, #191047),
PostOrderTraversal's lifetime needs to exceed the lifetime of the
iterator. The vp_post_order_{deep,shallow} helpers now have the
potential for being used incorrectly: hence, strip them, and require the
PostOrderTraversal to be constructed explictly, similar to RPOT.
DeltaFile
+0-14llvm/lib/Transforms/Vectorize/VPlanCFG.h
+3-1llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+3-152 files

LLVM/project 90b1416clang-tools-extra/clang-tidy/cppcoreguidelines ProTypeMemberInitCheck.cpp, clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines pro-type-member-init.cpp

[clang-tidy] Fix crash in `cppcoreguidelines-pro-type-member-init` with alias template in constructor initializer (#192786)

Closes #192510.
DeltaFile
+19-0clang-tools-extra/test/clang-tidy/checkers/cppcoreguidelines/pro-type-member-init.cpp
+7-3clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
+26-32 files

LLVM/project 113e055flang/include/flang/Parser openmp-utils.h, flang/lib/Parser openmp-utils.cpp

[flang][OpenMP] Move ALLOCATE + privatize check to semantic checks

Move the check from symbol resolution to semantic checks.

The check now seems to be more accurate, catching some cases that were
not detected before.
DeltaFile
+61-1flang/lib/Semantics/check-omp-structure.cpp
+0-35flang/lib/Semantics/resolve-directives.cpp
+28-0flang/include/flang/Parser/openmp-utils.h
+18-0flang/lib/Parser/openmp-utils.cpp
+8-6flang/test/Lower/OpenMP/sections.f90
+7-2flang/lib/Semantics/check-omp-structure.h
+122-441 files not shown
+124-447 files

LLVM/project b144b9cclang/include/clang/ScalableStaticAnalysisFramework/Core/Serialization JSONFormat.h, clang/lib/ScalableStaticAnalysisFramework/Core/Serialization/JSONFormat JSONFormatImpl.cpp

[clang][ssaf] Rework NestedBuildNamespaces of TU and LU summaries (#191489)

Problem:

ASTEntityMapping::getEntityName() creates EntityName with an empty
NestedBuildNamespace, but the linker expected the TU namespace to
already be present in the EntityName. This caused internal linkage
symbols to conflict during linking: since their NestedBuildNamespace was
empty, they all inherited the same LU namespace during resolution,
making internal symbols from different TUs appear identical. For
example, two "static inline" functions with the same USR in separate TUs
would be incorrectly merged into a single LU entity instead of remaining
distinct.

This is now fixed and demonstrated by the
InternalLinkageWithEmptyNamespaceAcrossTUs test, which creates two
internal linkage symbols across two TUs and verifies they remain
separate after linking.


    [27 lines not shown]
DeltaFile
+23-323clang/unittests/ScalableStaticAnalysisFramework/Serialization/JSONFormatTest/TUSummaryTest.cpp
+155-37clang/lib/ScalableStaticAnalysisFramework/Core/Serialization/JSONFormat/JSONFormatImpl.cpp
+0-36clang/test/Analysis/Scalable/ssaf-linker/Inputs/tu-2.json
+0-36clang/test/Analysis/Scalable/ssaf-linker/Inputs/tu-1.json
+30-1clang/unittests/ScalableStaticAnalysisFramework/EntityLinkerTest.cpp
+17-6clang/include/clang/ScalableStaticAnalysisFramework/Core/Serialization/JSONFormat.h
+225-43924 files not shown
+250-53830 files

LLVM/project 0d69fb3llvm/lib/Target/AArch64/GISel AArch64RegisterBankInfo.cpp, llvm/test/CodeGen/AArch64 arm64-neon-3vdiff.ll concat-vector.ll

[AArch64][GISel] Regbank G_BITCAST using src regbank. (#191522)

This takes the regbank of a G_BITCAST from the input srcreg that has
already been allocated, keeping the bitcast on the same bank. A copy
then might be added to the dst if needed.

onlyUsesFP is also improved for G_BITCAST, allowing operations to guess
the correct type through a onlyUsesFP too.

Originally from #177158 by Ryan Cowan with modifications.
DeltaFile
+24-48llvm/test/CodeGen/AArch64/arm64-neon-3vdiff.ll
+20-28llvm/test/CodeGen/AArch64/concat-vector.ll
+18-27llvm/test/CodeGen/AArch64/GlobalISel/arm64-regbankselect.mir
+17-23llvm/test/CodeGen/AArch64/qmovn.ll
+20-19llvm/test/CodeGen/AArch64/popcount.ll
+23-4llvm/lib/Target/AArch64/GISel/AArch64RegisterBankInfo.cpp
+122-14913 files not shown
+140-18219 files

LLVM/project 28c43a6lldb/source/Target Target.cpp, lldb/test/API lit.cfg.py

[lldb][windows] do not use ConPTY in tests (#192657)
DeltaFile
+79-0lldb/test/API/windows/conpty/TestConPTY.py
+22-0lldb/test/API/windows/conpty/main.c
+6-0lldb/test/Shell/lit.cfg.py
+4-0lldb/test/API/lit.cfg.py
+3-0lldb/test/API/windows/conpty/Makefile
+2-1lldb/source/Target/Target.cpp
+116-11 files not shown
+119-17 files

LLVM/project 5e0e863clang/test/CodeGenCXX homogeneous-aggregates.cpp

Fix typo in comment about MSVC sret convention (#168162)

The comment mis-spelled the word convention with convetion.
DeltaFile
+1-1clang/test/CodeGenCXX/homogeneous-aggregates.cpp
+1-11 files

LLVM/project 9732fa7mlir/lib/Dialect/Arith/Transforms ExpandOps.cpp, mlir/test/Dialect/Arith expand-flush-denormals.mlir

address comments
DeltaFile
+16-31mlir/lib/Dialect/Arith/Transforms/ExpandOps.cpp
+15-27mlir/test/Dialect/Arith/expand-flush-denormals.mlir
+31-582 files

LLVM/project 5a0b4c9clang/lib/Format DefinitionBlockSeparator.cpp, clang/unittests/Format DefinitionBlockSeparatorTest.cpp

[clang-format] Preserve trailing NOLINTEND placement with SeparateDefinitionBlocks (#190741)

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

When `SeparateDefinitionBlocks: Always` is enabled, clang-format may
separate a clearly trailing comment block by inserting an empty line
before it.

For example, it may format:

```c++
// NOLINTBEGIN
int x = 1;
int y = 2;
// NOLINTEND

void some_function() {}
```


    [23 lines not shown]
DeltaFile
+16-0clang/unittests/Format/DefinitionBlockSeparatorTest.cpp
+8-4clang/lib/Format/DefinitionBlockSeparator.cpp
+24-42 files