1. [OMPIRBuilder] add minimalist reduction support (details)
  2. [SLP]Fix a crash in gathered loads analysis. (details)
  3. [clangd] Enable relative configs in check mode (details)
  4. [SLP]Do not consider deleted instruction as external users. (details)
  5. [SLP]Fix an assertion for the size of user nodes. (details)
  6. Revert "[lldb] [DWARF-5] Be lazier about loading .dwo files" (details)
  7. [hwasan] Detect use after scope within function. (details)
  8. [clangd] Make use of diagnostic tags for some clang diags (details)
  9. [X86][AVX] Add test case for PR51281 (details)
  10. [clangd] Unify compiler invocation creation (details)
  11. [clangd] Record remote index usage (details)
  12. [libc++] Handle arrays in std::destroy_at (details)
  13. [libomptarget][amdcgn] Add build dependency for opt (details)
  14. [ARM] Attempt to distribute reductions (details)
  15. [libc++][NFC] Fix copy-paste error in the transform_view tests (details)
  16. [AMDGPU][OpenMP] Support linking of math libraries (details)
  17. [clang][patch][FPEnv] Fix syntax errors in pragma float_control test (details)
  18. [OpenMP][NFC] libomp: silence warnings on unused variables. (details)
  19. [mlir][Vector] Add vector to outerproduct lowering for the [reduction, parallel] case. (details)
  20. [PowerPC] Emit error for Altivec vector initializations when -faltivec-src-compat=gcc is specified (details)
  21. [NFC] clang-format OptimizationLevel.h (details)
  22. [OpenMP][AMDGCN] Initial math headers support (details)
Commit aa426c372c71901df64d7bb2f61f351e0b9fd048 by zinenko
[OMPIRBuilder] add minimalist reduction support

This introduces a builder function for emitting IR performing reductions in
OpenMP. Reduction variable privatization and initialization to the
reduction-neutral value is expected to be handled separately. The caller
provides the reduction functions. Further commits can provide implementation of
reduction functions for the reduction operators defined in the OpenMP

This implementation was tested on an MLIR fork targeting OpenMP from C and
produced correct executable code.

Reviewed By: Meinersbur

Differential Revision:
The file was modifiedllvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPIRBuilder.h
The file was modifiedllvm/unittests/Frontend/OpenMPIRBuilderTest.cpp
The file was modifiedllvm/include/llvm/Frontend/OpenMP/OMPKinds.def
Commit c2deb2afafee991c06cc96dc5beecb6de448b9fc by a.bataev
[SLP]Fix a crash in gathered loads analysis.

Need to check that the minimum acceptable vector factor is at least 2,
not 0, to avoid compiler crash during gathered loads analysis.

Differential Revision:
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was addedllvm/test/Transforms/SLPVectorizer/AArch64/gather-load-min-required-vf-2.ll
Commit c3682a22c227652558764c67a2529399c59e58e6 by kadircet
[clangd] Enable relative configs in check mode

Also disables config support in lit tests to make sure tests are not affected by
clangd config files lying around.

Differential Revision:
The file was modifiedclang-tools-extra/clangd/test/check.test
The file was modifiedclang-tools-extra/clangd/test/check-lines.test
The file was modifiedclang-tools-extra/clangd/test/check-fail.test
The file was modifiedclang-tools-extra/clangd/tool/Check.cpp
Commit f4fb85481136daedfd7f302543f620b0340ec51d by a.bataev
[SLP]Do not consider deleted instruction as external users.

If the instruction was previously deleted, it should not be treated as
an external user. This fixes cost estimation and removes dead
extractelement instructions.

Differential Revision:
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was modifiedllvm/test/Transforms/SLPVectorizer/AArch64/gather-root.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/ordering-bug.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/SystemZ/pr34619.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/PR39774.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/resched.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/horizontal-minmax.ll
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/addsub.ll
Commit 4b25c113210e579a5346ca0abc0717ab1ce5d9df by a.bataev
[SLP]Fix an assertion for the size of user nodes.

For the nodes with reused scalars the user may be not only of the size
of the final shuffle but also of the size of the scalars themselves,
need to check for this. It is safe to just modify the check here, since
the order of the scalars themselves is preserved, only indeces of the
reused scalars are changed. So, the users with the same size as the
number of scalars in the node, will not be affected, they still will get
the operands in the required order.

Reported by @mstorsjo in D105020.

Differential Revision:
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
The file was addedllvm/test/Transforms/SLPVectorizer/AArch64/reorder-fmuladd-crash.ll
Commit d0e6d946b6db87a6310c43aac1788345c8990182 by jan.kratochvil
Revert "[lldb] [DWARF-5] Be lazier about loading .dwo files"

This reverts commit e7b8ba103a8411fb25237727c3822d4c431e4814.

It broke 32-bit ARM - lldb-arm-ubuntu, reported by omjavaid:
The file was removedlldb/test/Shell/SymbolFile/DWARF/dwarf5-lazy-dwo.c
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.h
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h
The file was modifiedlldb/test/Shell/SymbolFile/DWARF/x86/dwp.s
The file was modifiedlldb/source/Symbol/CompileUnit.cpp
The file was removedlldb/test/Shell/SymbolFile/DWARF/split-optimized.c
The file was modifiedlldb/include/lldb/Symbol/CompileUnit.h
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
The file was modifiedlldb/test/Shell/SymbolFile/DWARF/lit.local.cfg
The file was modifiedlldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Commit 84705ed913659d1d5e0ee6b5ae7b298914ec87d4 by fmayer
[hwasan] Detect use after scope within function.

Reviewed By: vitalybuka

Differential Revision:
The file was modifiedcompiler-rt/test/hwasan/TestCases/use-after-scope-loop-bug.cpp
The file was modifiedcompiler-rt/test/hwasan/TestCases/use-after-scope-temp.cpp
The file was modifiedcompiler-rt/test/hwasan/TestCases/use-after-scope-temp2.cpp
The file was addedllvm/test/Instrumentation/HWAddressSanitizer/use-after-scope.ll
The file was modifiedcompiler-rt/test/hwasan/TestCases/use-after-scope-if.cpp
The file was modifiedcompiler-rt/test/hwasan/TestCases/use-after-scope-nobug.cpp
The file was modifiedcompiler-rt/test/hwasan/TestCases/use-after-scope-loop-removed.cpp
The file was modifiedcompiler-rt/test/hwasan/TestCases/use-after-scope-capture.cpp
The file was addedcompiler-rt/test/hwasan/TestCases/stack-uas.c
The file was modifiedcompiler-rt/test/hwasan/TestCases/use-after-scope-goto.cpp
The file was modifiedcompiler-rt/test/hwasan/TestCases/use-after-scope-loop.cpp
The file was modifiedcompiler-rt/test/hwasan/TestCases/use-after-scope-inlined.cpp
The file was modifiedcompiler-rt/test/hwasan/TestCases/use-after-scope-dtor-order.cpp
The file was modifiedllvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
The file was modifiedcompiler-rt/test/hwasan/TestCases/use-after-scope-types.cpp
The file was modifiedcompiler-rt/test/hwasan/TestCases/use-after-scope.cpp
Commit 57346526c83e1fcf03baf80362fc2a9e6624f5fd by kadircet
[clangd] Make use of diagnostic tags for some clang diags

It is not great to list diag ids by hand, but I don't see any other
solution unless diagnostics are annotated with these explicitly, which is a
bigger change in clang and I am not sure if would be worth it.

Diagnostics handled by this patch is by no means exhaustive, there might be
other checks that don't mention "unused"/"deprecated" in their names. But it
feels like this should be enough to catch common diagnostics and can be extended
over time.

Differential Revision:
The file was modifiedclang-tools-extra/clangd/Protocol.cpp
The file was modifiedclang-tools-extra/clangd/Protocol.h
The file was modifiedclang-tools-extra/clangd/Diagnostics.cpp
The file was modifiedclang-tools-extra/clangd/Diagnostics.h
The file was modifiedclang-tools-extra/clangd/unittests/DiagnosticsTests.cpp
Commit 6569b7f90239b5932465a1c6936632b4a9527d66 by llvm-dev
[X86][AVX] Add test case for PR51281
The file was addedllvm/test/CodeGen/X86/pr51281.ll
Commit 41e24222861fb5394ab4c7e892a7d7f2914b533e by kadircet
[clangd] Unify compiler invocation creation

Background-indexing is fine, because it uses GlobalCompilationDatabase
to fetch the compile commands (hence uses CommandMangler), and creates
invocation through buildCompilerInvocation.

Depends on D106639.

Differential Revision:
The file was modifiedclang-tools-extra/clangd/Compiler.cpp
The file was modifiedclang-tools-extra/clangd/Compiler.h
The file was modifiedclang-tools-extra/clangd/indexer/IndexerMain.cpp
The file was modifiedclang-tools-extra/clangd/CompileCommands.h
The file was addedclang-tools-extra/clangd/test/indexer.test
Commit 8070bf8c6e6afbf0b8a20322d935cb530b4b796a by kadircet
[clangd] Record remote index usage

This is a gauage metric that sets particular remote-index instances as
used. It should enable accumulation of multiple streams to see number of clangd
processes making use of remote index, broken down by remote index address.

Differential Revision:
The file was modifiedclang-tools-extra/clangd/tool/ClangdMain.cpp
Commit c99f5b2af1fce174822a40789ab4e305553f088a by Louis Dionne
[libc++] Handle arrays in std::destroy_at

Also, improve tests for std::destroy and std::destroy_n so that they
check for array support.

These changes are part of (the One Ranges proposal).

Differential Revision:
The file was modifiedlibcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy.pass.cpp
The file was modifiedlibcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_n.pass.cpp
The file was modifiedlibcxx/include/__memory/uninitialized_algorithms.h
The file was modifiedlibcxx/include/__memory/construct_at.h
The file was modifiedlibcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/destroy_at.pass.cpp
Commit 4ffa1478fd1bbfdea9382786c0afc4e1303bbd06 by protze
[libomptarget][amdcgn] Add build dependency for opt

This patch should fix the build we observe when building LLVM from scratch.

Differential Revision:
The file was modifiedopenmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
Commit 532d05b714b3f64603be53398571d49a6f4b2f92 by
[ARM] Attempt to distribute reductions

This adds a combine for adds of reductions, distributing them so that
they occur sequentially to enable better use of accumulating VADDVA
instructions. It combines:
  add(X, add(vecreduce(Y), vecreduce(Z))) ->
    add(add(X, vecreduce(Y)), vecreduce(Z))
  add(add(A, reduce(B)), add(C, reduce(D))) ->
    add(add(add(A, C), reduce(B)), reduce(D))

These together distribute the add's so that more reductions can be
selected to VADDVA.

Differential Revision:
The file was modifiedllvm/lib/Target/ARM/ARMISelLowering.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vaddv.ll
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vecreduce-slp.ll
Commit 7b3ada712aff7254791b1c8cf905361fc478b70d by Louis Dionne
[libc++][NFC] Fix copy-paste error in the transform_view tests
The file was modifiedlibcxx/test/std/ranges/range.adaptors/range.transform/general.pass.cpp
The file was modifiedlibcxx/test/std/ranges/range.adaptors/range.transform/types.h
Commit 9830f902e4d087ecb1706912b730c046f20600ee by Pushpinder.Singh
[AMDGPU][OpenMP] Support linking of math libraries

Math libraries are linked only when -lm is specified. This is because
host system could be missing rocm-device-libs.

Reviewed By: JonChesterfield, yaxunl

Differential Revision:
The file was modifiedclang/lib/Driver/ToolChains/AMDGPU.h
The file was modifiedclang/lib/Driver/ToolChains/HIP.cpp
The file was modifiedclang/test/Driver/amdgpu-openmp-toolchain.c
The file was modifiedclang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
The file was modifiedclang/lib/Driver/ToolChains/AMDGPU.cpp
Commit 0a175ad445f095caf59f7175fbc035464919b7a3 by melanie.blower
[clang][patch][FPEnv] Fix syntax errors in pragma float_control test

In a post-commit message to
@MaskRay pointed out syntax errors in one of the test cases. This
patch fixes those problems, I had forgotten the colon after the CHECK- strings.
The file was modifiedclang/test/CodeGen/fp-floatcontrol-stack.cpp
Commit 8b81524c6dd27b8dd7a36d525e5569cdf8d5e188 by Andrey.Churbanov
[OpenMP][NFC] libomp: silence warnings on unused variables.

Put declarations/definitions of unused variables under corresponding macros
to silence clang build warnings.

Differential Revision:
The file was modifiedopenmp/runtime/src/kmp_tasking.cpp
The file was modifiedopenmp/runtime/src/kmp_affinity.cpp
The file was modifiedopenmp/runtime/src/z_Linux_util.cpp
The file was modifiedopenmp/runtime/src/kmp_lock.cpp
The file was modifiedopenmp/runtime/src/kmp_runtime.cpp
The file was modifiedopenmp/runtime/src/kmp_barrier.cpp
The file was modifiedopenmp/runtime/src/kmp_alloc.cpp
Commit 14c1450d5cac71d0bfa946a4766a3cd125e6a694 by nicolas.vasilache
[mlir][Vector] Add vector to outerproduct lowering for the [reduction, parallel] case.

Differential Revision:
The file was modifiedmlir/test/Dialect/Vector/vector-contract-matvec-transforms.mlir
The file was modifiedmlir/lib/Dialect/Vector/VectorTransforms.cpp
Commit 5ea6117a9e9eae49ad1295fa422266ef3832e419 by amy.kwan1
[PowerPC] Emit error for Altivec vector initializations when -faltivec-src-compat=gcc is specified

Under the -faltivec-src-compat=gcc option, AltiVec vector initialization should
be treated as if they were compiled with gcc - which is, to emit an error when
the vectors are initialized in the parenthesized or non-parenthesized manner.
This patch implements this behaviour.

Differential Revision:
The file was modifiedclang/include/clang/Sema/Sema.h
The file was modifiedclang/test/CodeGen/vector-bool-pixel-altivec-init.c
The file was modifiedclang/test/CodeGen/vector-bool-pixel-altivec-init-no-parentheses.c
The file was modifiedclang/lib/Sema/SemaCast.cpp
The file was modifiedclang/lib/Sema/SemaExpr.cpp
Commit 8d0f96f59b70fd8693de33e76e22ee3e86bdce44 by mtrofin
[NFC] clang-format OptimizationLevel.h
The file was modifiedllvm/include/llvm/Passes/OptimizationLevel.h
Commit 12da97ea10a941f0123340831300d09a2121e173 by Pushpinder.Singh
[OpenMP][AMDGCN] Initial math headers support

With this patch, OpenMP on AMDGCN will use the math functions
provided by ROCm ocml library. Linking device code to the ocml will be
done in the next patch.

Reviewed By: JonChesterfield, jdoerfert, scchan

Differential Revision:
The file was modifiedclang/lib/Headers/__clang_hip_cmath.h
The file was modifiedclang/test/Headers/Inputs/include/cstdlib
The file was addedclang/test/Headers/Inputs/include/algorithm
The file was addedclang/test/Headers/Inputs/include/utility
The file was modifiedclang/lib/Headers/__clang_hip_math.h
The file was modifiedclang/lib/Headers/openmp_wrappers/__clang_openmp_device_functions.h
The file was modifiedclang/test/Headers/openmp_device_math_isnan.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/lib/Headers/openmp_wrappers/cmath
The file was addedclang/test/Headers/amdgcn_openmp_device_math.c
The file was modifiedclang/lib/Headers/openmp_wrappers/math.h