LLVM/project 98f84f9clang-tools-extra/clangd CodeComplete.cpp, clang-tools-extra/clangd/unittests CodeCompleteTests.cpp

[clangd] Code completion for declaration of class method (#165916)

Code completion previously could not tell apart the declaration of
a method from a call to it, and provided call-like behaviour even
in declaration contexts. This included things like not offering 
completion for private methods, and inserting placeholders for
the parameters as though the user was going to fill in arguments.

This patch adds support to Parser and SemaCodeComplete to
detect and provide dedicated behaviour for declaration contexts.
In these contexts, the flag CodeCompletionResult::DeclaringEntity
is set, and createCodeCompletionString() is adjusted to handle this
flag, e.g. by inserting parameter declarations as text chunks rather
than placeholder chunks.

The DeclaringEntity flag is also available for consumers of
SemaCodeComplete, such as clangd, to customize their behaviour.

In addition, the patch tweaks the conditions under which the

    [6 lines not shown]
DeltaFile
+159-55clang/lib/Sema/SemaCodeComplete.cpp
+118-19clang-tools-extra/clangd/unittests/CodeCompleteTests.cpp
+40-2clang/include/clang/Parse/Parser.h
+6-4clang/lib/Parse/Parser.cpp
+6-4clang-tools-extra/clangd/CodeComplete.cpp
+6-3clang/include/clang/Sema/SemaCodeCompletion.h
+335-876 files not shown
+350-9812 files

LLVM/project ce288f4mlir/lib/Dialect/XeGPU/Transforms XeGPUSgToWiDistributeExperimental.cpp, mlir/test/Dialect/XeGPU sg-to-wi-experimental-unit.mlir

[MLIR][XeGPU] Add distribution patterns for vector insert & extract ops in sg to wi pass (#184665)

This PR adds patterns for following vector ops in the new sg-to-wi pass
1. ExtractOp
2. ExtractStridedSliceOp
3. InsertStridedSliceOp
4. InsertOp
DeltaFile
+292-2mlir/lib/Dialect/XeGPU/Transforms/XeGPUSgToWiDistributeExperimental.cpp
+199-0mlir/test/Dialect/XeGPU/sg-to-wi-experimental-unit.mlir
+7-1mlir/test/lib/Dialect/XeGPU/TestXeGPUTransforms.cpp
+498-33 files

LLVM/project 8d64f56clang/docs ReleaseNotes.rst, clang/lib/Sema Sema.cpp

[Clang] Honour [[maybe_unused]] on private fields (#187940)

Before this commit, [[maybe_unused]] on private fields was ignored. In
conjunction with `-Wunused-private-field`, false warnings were emitted
by clang. This commit fixes this by checking if an unused private field
is annotated with [[maybe_unused]].
DeltaFile
+11-0clang/test/SemaCXX/warn-maybe-unused-private-field.cpp
+4-0clang/docs/ReleaseNotes.rst
+1-1clang/lib/Sema/Sema.cpp
+16-13 files

LLVM/project b2ba795llvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer insert-element-build-vector.ll insert-element-build-vector-inseltpoison.ll

[SLP]Fix patterns for compile time blow up with ordered reductions

Excluded patterns, leading to compile time blow up for integer ordered
reductions.
DeltaFile
+41-119llvm/test/Transforms/SLPVectorizer/insert-element-build-vector.ll
+41-119llvm/test/Transforms/SLPVectorizer/insert-element-build-vector-inseltpoison.ll
+38-2llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+5-5llvm/test/Transforms/SLPVectorizer/X86/reduced-ordered-values-update.ll
+125-2454 files

LLVM/project c079372llvm/lib/Transforms/Vectorize VPlanTransforms.cpp VPlanPatternMatch.h

[VPlan] Add m_VPPhi pattern matcher and use in removeDeadRecipes (NFC).

Add m_VPPhi to match VPPhi instructions with exactly 2 operands.

Split off from https://github.com/llvm/llvm-project/pull/156262.
DeltaFile
+4-4llvm/lib/Transforms/Vectorize/VPlanTransforms.cpp
+6-0llvm/lib/Transforms/Vectorize/VPlanPatternMatch.h
+10-42 files

LLVM/project 6514822llvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysisFramework/Tool BUILD.gn, llvm/utils/gn/secondary/clang/tools/clang-ssaf-format BUILD.gn

[gn] port a2c0c436999
DeltaFile
+10-0llvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysisFramework/Tool/BUILD.gn
+1-0llvm/utils/gn/secondary/clang/tools/clang-ssaf-format/BUILD.gn
+1-0llvm/utils/gn/secondary/clang/tools/clang-ssaf-linker/BUILD.gn
+12-03 files

LLVM/project 0e7a8acllvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysisFramework/Core BUILD.gn, llvm/utils/gn/secondary/clang/unittests/ScalableStaticAnalysisFramework BUILD.gn

[gn build] Port c6ba0e00161e
DeltaFile
+3-2llvm/utils/gn/secondary/clang/unittests/ScalableStaticAnalysisFramework/BUILD.gn
+3-0llvm/utils/gn/secondary/clang/lib/ScalableStaticAnalysisFramework/Core/BUILD.gn
+6-22 files

LLVM/project c58f322llvm/utils/gn/secondary/llvm/unittests/Target/SPIRV BUILD.gn

[gn build] Port 78729251fbb2
DeltaFile
+1-0llvm/utils/gn/secondary/llvm/unittests/Target/SPIRV/BUILD.gn
+1-01 files

LLVM/project ea489fellvm/benchmarks PointerUnionBM.cpp CMakeLists.txt

[llvm][ADT] Add PointerUnion benchmarks. NFC. (#187874)

Add microbenchmarks for `PointerUnion`'s `isa` and `isNull` operations
across union sizes of 2, 4, and 8 types. This it to establish baseline
performance numbers before making changes to the implementation.

I plan to refactor the implementation a bit and add support for more
variants using sparse encoding.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply at anthropic.com>
DeltaFile
+121-0llvm/benchmarks/PointerUnionBM.cpp
+1-0llvm/benchmarks/CMakeLists.txt
+122-02 files

LLVM/project 6e66da1mlir/include/mlir/Dialect/LLVMIR LLVMIntrinsicOps.td, mlir/test/Dialect/LLVMIR roundtrip.mlir

[mlir][LLVM] Add more `llvm.intr.experimental.constrained.*` ops
DeltaFile
+105-0mlir/test/Target/LLVMIR/llvmir-intrinsics.mlir
+77-0mlir/test/Target/LLVMIR/Import/intrinsic.ll
+67-2mlir/include/mlir/Dialect/LLVMIR/LLVMIntrinsicOps.td
+49-0mlir/test/Dialect/LLVMIR/roundtrip.mlir
+298-24 files

LLVM/project ca3d045.github new-prs-labeler.yml

[llubi][Github] Add llubi labelling support (#187877)

So that one can easily subscribe to llubi PRs which are currently not
labelled at all.
DeltaFile
+6-0.github/new-prs-labeler.yml
+6-01 files

LLVM/project 45039dfclang/unittests/Analysis CFGBackEdgesTest.cpp

[clang] On Windows, silence warning in `CFGBackEdgesTest` with MSVC (#187939)

This fixes:
```
[5804/7029] Building CXX object tools\clang\unittests\CMakeFiles\AllClangUnitTests.dir\Analysis\CFGBackEdgesTest.cpp.obj
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.44.35207\include\xutility(721): warning C4018: '>': signed/unsigned mismatch
...
C:\git\llvm-project\clang\unittests\Analysis\CFGBackEdgesTest.cpp(170): note: see the first reference to 'testing::internal::PredicateFormatterFromMatcher<testing::internal::SizeIsMatcher<testing::internal::GtMatcher<int>>>::operator ()' in 'clang::analysis::`anonymous-namespace'::CFGBackEdgesTest_WhileWithContinueLoop_Test::TestBody'
```
DeltaFile
+1-1clang/unittests/Analysis/CFGBackEdgesTest.cpp
+1-11 files

LLVM/project 33a14cbllvm/lib/Target/RISCV RISCVMoveMerger.cpp, llvm/test/CodeGen/RISCV rv32-move-merge-crash.ll

[RISCV] Add guard to prevent GPRPair merge on targets without Zdinx or P (#186600)

Resolves #186527.

The issue points out that GPRPair merge logic in the RISCVMoveMerger
pass was being called on a target without `zdinx` or `experimental-P`,
triggering an unreachable in `getGPRPairCopyOpcode`.

This patch fixes this issue by guarding `isEvenRegisterCopy` and
`isOddRegisterCopy` to return false when neither Zdinx nor P is present.
DeltaFile
+82-0llvm/test/CodeGen/RISCV/rv32-move-merge-crash.ll
+10-6llvm/lib/Target/RISCV/RISCVMoveMerger.cpp
+92-62 files

LLVM/project 88f830allvm/lib/Transforms/Vectorize SLPVectorizer.cpp, llvm/test/Transforms/SLPVectorizer/X86 deleted-inst-reduction-attempt.ll

[SLP]Do not try to reduced instruction, marked for deletion in previous attempts

Need to skip instructions, which were vectorized and marked for deletion
to prevent a compiler crash
DeltaFile
+59-0llvm/test/Transforms/SLPVectorizer/X86/deleted-inst-reduction-attempt.ll
+2-0llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+61-02 files

LLVM/project 34bc5d5clang/test/Misc noexecstack.c, clang/tools/driver cc1as_main.cpp

[MC,clang] Fix -Wa,--noexecstack not emitting .note.GNU-stack (#187880)

AsmPrinter (clang -c a.c) and AsmParser (clang -c a.s, llvm-mc
-filetype=obj a.s) have different ways to emit .note.GNU-stack section.

913c5b4d1fff removed a redundant initSections call from cc1as, but
that was the only place where NoExecStack was consumed for the
assembler path.

Unify the .note.GNU-stack emission in MCELFStreamer::finishImpl,
making the `initSections` parameter redundant.

Add a -filetype=obj test for Solaris (see
https://reviews.llvm.org/D159179), which doesn't use .note.GNU-stack

`initSections` has 20+ uses. The parameter cleanup will be deferred to a
subsequent change.

Fixes https://github.com/llvm/llvm-project/issues/186004
DeltaFile
+22-0clang/test/Misc/noexecstack.c
+0-17llvm/test/MC/ELF/noexec.s
+11-4llvm/lib/MC/MCELFStreamer.cpp
+11-0llvm/test/MC/ELF/noexecstack.s
+2-6llvm/tools/llvm-mc/llvm-mc.cpp
+1-0clang/tools/driver/cc1as_main.cpp
+47-276 files

LLVM/project cfefc82llvm/lib/Support CMakeLists.txt

fix support on windows
DeltaFile
+9-0llvm/lib/Support/CMakeLists.txt
+9-01 files

LLVM/project 2566961clang-tools-extra/clang-tidy/bugprone UseAfterMoveCheck.cpp, clang-tools-extra/docs ReleaseNotes.rst

[clang-tidy] use-after-move: Support null_after_move annotations (#186903)

Extend the bugprone-use-after-move check to recognize user defined
smart-pointer-like types that make guarantees on the state of a
moved-from object, leaving it in a valid and specified state that
matches the standard smart pointer's moved-from state (nullptr), where
it is safe to use but not dereference.

Following the RFC discussion:

* Use `[[clang::annotate]]` to mark the types.
* Use an schema for the `[[clang::annotate]]` annotation and arguments
to help avoid conflicts with other users of the attribute.
* The annotation will identify the tool ("clang-tidy") and the arguments
the plugin ("bugprone-use-after-move"), and the behavior of the type
("null_after_move"). E.g.:

`[[clang::annotate("clang-tidy", "bugprone-use-after-move",
"null_after_move")]]`

    [2 lines not shown]
DeltaFile
+101-0clang-tools-extra/test/clang-tidy/checkers/bugprone/use-after-move.cpp
+39-4clang-tools-extra/clang-tidy/bugprone/UseAfterMoveCheck.cpp
+9-4clang-tools-extra/docs/ReleaseNotes.rst
+5-2clang-tools-extra/docs/clang-tidy/checks/bugprone/use-after-move.rst
+154-104 files

LLVM/project 1248f3aclang/lib/ScalableStaticAnalysisFramework/Core CMakeLists.txt

fix AnalysisRegistry
DeltaFile
+5-0clang/lib/ScalableStaticAnalysisFramework/Core/CMakeLists.txt
+5-01 files

LLVM/project 88b81cbflang/lib/Optimizer/HLFIR/Transforms CMakeLists.txt, flang/lib/Optimizer/Transforms CMakeLists.txt

fix build errors
DeltaFile
+11-0flang/lib/Optimizer/Transforms/CMakeLists.txt
+10-0flang/lib/Optimizer/HLFIR/Transforms/CMakeLists.txt
+21-02 files

LLVM/project a344f0dclang-tools-extra/clangd/fuzzer CMakeLists.txt

LLVMFuzzerTestOneInput
DeltaFile
+3-0clang-tools-extra/clangd/fuzzer/CMakeLists.txt
+3-01 files

LLVM/project dda24c9. benchmark_build.sh

Change iteration count from 10 to 2
DeltaFile
+1-1benchmark_build.sh
+1-11 files

LLVM/project 2175d1f. benchmark_build.sh

normalize script
DeltaFile
+10-81benchmark_build.sh
+10-811 files

LLVM/project 60a7f7f. benchmark_build.sh

measure memory too
DeltaFile
+44-20benchmark_build.sh
+44-201 files

LLVM/project 62565b5. benchmark_build.sh

measure memory too
DeltaFile
+13-39benchmark_build.sh
+13-391 files

LLVM/project 4bed1c6. benchmark_build.sh

use time
DeltaFile
+29-10benchmark_build.sh
+29-101 files

LLVM/project 582451cclang/lib/CIR/CodeGen CMakeLists.txt, flang/lib/Evaluate CMakeLists.txt

fix debug for all targets
DeltaFile
+19-0clang/lib/CIR/CodeGen/CMakeLists.txt
+1-15mlir/lib/Dialect/Affine/Transforms/DecomposeAffineOps.cpp
+14-0flang/lib/Evaluate/CMakeLists.txt
+8-0mlir/lib/Dialect/XeGPU/IR/CMakeLists.txt
+7-0flang/lib/Optimizer/CodeGen/CMakeLists.txt
+6-0mlir/examples/toy/Ch3/CMakeLists.txt
+55-1511 files not shown
+100-1517 files

LLVM/project ed8ca19.ci monolithic-linux.sh monolithic-windows.sh

patch monolithic
DeltaFile
+46-44.ci/monolithic-linux.sh
+14-12.ci/monolithic-windows.sh
+60-562 files

LLVM/project caba060llvm CMakeLists.txt, mlir/lib/Dialect/SparseTensor/IR/Detail LvlTypeParser.cpp DimLvlMapParser.cpp

use `after`
DeltaFile
+23-0llvm/CMakeLists.txt
+2-0mlir/lib/Dialect/SparseTensor/Transforms/Utils/SparseTensorIterator.cpp
+2-0mlir/lib/Dialect/SparseTensor/IR/Detail/LvlTypeParser.cpp
+1-0mlir/lib/Dialect/SparseTensor/IR/Detail/DimLvlMapParser.cpp
+28-04 files

LLVM/project 4de73c6. benchmark_build.sh

add benchmark script
DeltaFile
+99-0benchmark_build.sh
+99-01 files

LLVM/project efaf7dbllvm/lib/CodeGen CMakeLists.txt, llvm/lib/CodeGen/SelectionDAG CMakeLists.txt

add comments
DeltaFile
+6-20llvm/lib/Transforms/Vectorize/CMakeLists.txt
+6-0llvm/lib/CodeGen/CMakeLists.txt
+3-0llvm/lib/Target/X86/CMakeLists.txt
+3-0llvm/lib/Target/RISCV/CMakeLists.txt
+3-0mlir/test/lib/Dialect/Affine/CMakeLists.txt
+3-0llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt
+24-2050 files not shown
+82-2056 files