SuccessChanges

Changes from Git (git http://labmaster3.local/git/llvm-project.git)

Summary

  1. Hint how to get a symbolized stack trace if llvm-symbolizer is not found on crashes (details)
  2. PR47176: Don't read from an inactive union member if a friend function (details)
  3. [xray] Function coverage groups (details)
  4. [NFC] [PPC] Add PowerPC expected IR tests for C99 complex (details)
  5. [lld][WebAssembly] Allow `atomics` feature with unshared memory (details)
  6. Fix uninitialized XRayArg (details)
  7. [libc] Using llvm_libc memcpy in mem* benchmarks. (details)
  8. [mlir][SCFToGPU] LaunchOp propagate optional attributes (details)
  9. [ARM] Find VPT implicitly predicated by VCTP (details)
  10. [flang][driver] Add missing dependency (shared library builds, NFC) (details)
  11. [AArch64][GlobalISel] Make <8 x s16> for G_INSERT_VECTOR_ELT legal. (details)
  12. [AArch64][GlobalISel] Manually select G_DUP with s8/s16 gpr scalar operands. (details)
  13. [Object/yaml2obj/obj2yaml][test] - Split, cleanup and move MIPS abi-flags.yaml test. NFCI. (details)
  14. [msan] Fix gethostent tests (details)
  15. [msan] Remove redundant test (details)
  16. Revert rGe55410f8b260 : "AArch64/GlobalISel: Add testcase for bug 47619" (details)
  17. [SplitKit] In addDeadDef tolerate parent range that defines more lanes (details)
  18. [AMDGPU] Fix declaration parameter names to match definition (details)
  19. [AArch64] PAC/BTI code generation for LLVM generated functions (details)
  20. [Analyzer] Fix for `ExprEngine::computeObjectUnderConstruction()` for base and delegating consturctor initializers (details)
  21. [CMake][CTE] Add "check-clang-extra-..." targets to test only a particular Clang extra tool (details)
  22. [PowerPC][LLD] Extend R2 save stub to support offsets of more than 26 bits (details)
  23. [InstCombine] Add bswap tests from funnel shift intrinsics (details)
  24. [PPC] [AIX] Implement calling convention IR for C99 complex types on AIX (details)
  25. [mlir] [VectorOps] generalize printing support for integers (details)
  26. [clang-format] Add a MacroExpander. (details)
  27. [Analyzer] Fix unused variable warning in Release builds (details)
  28. [gn build] Port e336b74c995 (details)
Commit 960535d65a927b27ff883250094492842c33ca86 by joker.eph
Hint how to get a symbolized stack trace if llvm-symbolizer is not found on crashes

Most users of LLVM tools hit the raw traces and don't know how to get LLVM to
symbolize automatically for them.

When we print the non-symbolized stack trace, we will add information about
how to get it symbolized.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D88269
The file was modifiedllvm/lib/Support/Unix/Signals.inc
Commit 8c98c8803430804010da06a07cfb291dab59067c by richard
PR47176: Don't read from an inactive union member if a friend function
has default arguments and an exception specification.
The file was modifiedclang/test/Parser/cxx0x-decl.cpp
The file was modifiedclang/lib/Parse/ParseDeclCXX.cpp
The file was modifiedclang/lib/Parse/ParseDecl.cpp
The file was modifiedclang/include/clang/Parse/Parser.h
Commit 6f7fbdd2857fc8a7280afbb26fd4e1a6450069e4 by ianlevesque
[xray] Function coverage groups

Add the ability to selectively instrument a subset of functions by dividing the functions into N logical groups and then selecting a group to cover. By selecting different groups over time you could cover the entire application incrementally with lower overhead than instrumenting the entire application at once.

Differential Revision: https://reviews.llvm.org/D87953
The file was modifiedclang/lib/Driver/XRayArgs.cpp
The file was modifiedclang/lib/Frontend/CompilerInvocation.cpp
The file was addedclang/test/CodeGen/xray-function-groups.cpp
The file was modifiedclang/include/clang/Basic/CodeGenOptions.def
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/lib/CodeGen/CodeGenFunction.cpp
The file was modifiedclang/include/clang/Driver/XRayArgs.h
The file was modifiedllvm/docs/XRay.rst
Commit 64b8a633a872f25c8b3f9414c22165405400ea10 by zarko
[NFC] [PPC] Add PowerPC expected IR tests for C99 complex

Adding this test so that I can extend it in a follow on patch with
expected IR for AIX when I implement complex handling in
AIXABIInfo.

Reviewed By: daltenty, ZarkoCA

Differential Revision: https://reviews.llvm.org/D88105
The file was addedclang/test/CodeGen/powerpc-c99complex.c
Commit 15a5e86fb387359f736e919eeb5cc2b9f4477d48 by tlively
[lld][WebAssembly] Allow `atomics` feature with unshared memory

https://github.com/WebAssembly/threads/issues/144 updated the
WebAssembly threads proposal to make atomic operations on unshared memories
valid. This change updates the feature checking in the linker accordingly.
Production WebAssembly engines have recently been updated to allow this
behvaior, but after this change users who accidentally use atomics with unshared
memories on older versions of the engines will get validation errors at runtime
rather than link errors.

Differential Revision: https://reviews.llvm.org/D79530
The file was modifiedlld/wasm/Writer.cpp
The file was modifiedlld/test/wasm/shared-memory.yaml
Commit 7db7a355453887906d12ffb67df8fbaa5e9e873d by ianlevesque
Fix uninitialized XRayArg
The file was modifiedclang/include/clang/Driver/XRayArgs.h
Commit ef36e8380a9109c43ef4a564083428a14a9b818a by asteinhauser
[libc] Using llvm_libc memcpy in mem* benchmarks.

Currently the mem* benchmarks use memcpy from Glibc and memset from LLVM libc.
That's misleading and produces inconsistent results and behaviors.

This change makes Memcpy.cpp consistent with Memset.cpp:
https://github.com/llvm/llvm-project/blob/master/libc/benchmarks/Memset.cpp#L49

Reviewers: sivachandra

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D88271
The file was modifiedlibc/benchmarks/Memcpy.cpp
Commit 396e7f454893e24969bb989fe89aa028e2ea1693 by artur.bialas
[mlir][SCFToGPU] LaunchOp propagate optional attributes

Allow propagating optional user defined attributes during SCF to GPU conversion. Gives opportunity to use user defined attributes in the further lowering. For example setting subgroup size, or other options for GPU dispatch. This does not break backward compatibility and does not require new attributes, just allow passing optional ones.

Differential Revision: https://reviews.llvm.org/D88203
The file was modifiedmlir/lib/Conversion/SCFToGPU/SCFToGPU.cpp
The file was modifiedmlir/test/Conversion/SCFToGPU/parallel_loop.mlir
Commit a399d1880bc6e2a13cad02a2a3cb024c27d32ac2 by sam.parker
[ARM] Find VPT implicitly predicated by VCTP

On failing to find a VCTP in the list of instructions that explicitly
predicate the entry of a VPT block, inspect whether the block is
controlled via VPT which is implicitly predicated due to it's
predicated operand(s).

Differential Revision: https://reviews.llvm.org/D87819
The file was modifiedllvm/lib/CodeGen/ReachingDefAnalysis.cpp
The file was modifiedllvm/lib/Target/ARM/ARMLowOverheadLoops.cpp
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/vpt-blocks.mir
The file was modifiedllvm/test/CodeGen/Thumb2/LowOverheadLoops/remat-vctp.ll
Commit 6f10998ad80687a85633d8dda84146c57c49ca25 by andrzej.warzynski
[flang][driver] Add missing dependency (shared library builds, NFC)

`FlangFrontendTests` depends on libclangFrontend (it uses
DiagnosticConsumer classes from there). This patch adds the missing
dependency in CMake.

The missing dependency manifests itself only with BUILD_SHARED_LIBS=ON.
This symbol is linked in statically with libflangFrontend when
BUILD_SHARED_LIBS=OFF.
The file was modifiedflang/unittests/Frontend/CMakeLists.txt
Commit ade6fa46f94b31e89c8a488264ac79e319d1ccdb by Amara Emerson
[AArch64][GlobalISel] Make <8 x s16> for G_INSERT_VECTOR_ELT legal.
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/select-insert-vector-elt.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/legalize-insert-vector-elt.mir
Commit f7b36b35b69a3f100c740ac4bcd933fcdce58798 by Amara Emerson
[AArch64][GlobalISel] Manually select G_DUP with s8/s16 gpr scalar operands.

These don't get selected by the imported patterns, and avoiding generating them
is a whole load of not-worth-it-hassle (until we have fp types in GlobalISel).
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
The file was modifiedllvm/test/CodeGen/AArch64/GlobalISel/select-dup.mir
Commit 64f878db5022cf9258ff308f15ad07d27c9ca4d9 by grimar
[Object/yaml2obj/obj2yaml][test] - Split, cleanup and move MIPS abi-flags.yaml test. NFCI.

We have the `Object/Mips/abi-flags.yaml` which tests how yaml2obj/obj2yaml
handle `SHT_MIPS_ABIFLAGS` sections.

This patch splits it into two tests: one for obj2yaml and one for yaml2obj
and moves the result to right places.

Differential revision: https://reviews.llvm.org/D88231
The file was removedllvm/test/Object/Mips/abi-flags.yaml
The file was addedllvm/test/tools/obj2yaml/ELF/mips-abi-flags.yaml
The file was addedllvm/test/tools/yaml2obj/ELF/mips-abi-flags.yaml
Commit 3a98f4dca7ada4c50ebca646f2cdd7385cd778af by Vitaly Buka
[msan] Fix gethostent tests

gethostent should follow sethostent.
The file was modifiedcompiler-rt/lib/msan/tests/msan_test.cpp
Commit 7af12015ad44bccb23bd61820c8f34212467e71c by Vitaly Buka
[msan] Remove redundant test

The test needs to control intercept_strcmp option.
It's already implemented as lit.test strcmp.c.
The file was modifiedcompiler-rt/lib/msan/tests/msan_test.cpp
Commit 42bfa7c63b85e76fe16521d1671afcafaf8f64ed by llvm-dev
Revert rGe55410f8b260 : "AArch64/GlobalISel: Add testcase for bug 47619"

This reverts commit e55410f8b260a2868d600ca99fe5ee80f9cd4fc5.

This is failing on EXPENSIVE_CHECKS buildbots
The file was removedllvm/test/CodeGen/AArch64/GlobalISel/irtranslator-stack-evt-bug47619.ll
Commit b34ddfcc76e39cdad62887f648aec46c8434c648 by jay.foad
[SplitKit] In addDeadDef tolerate parent range that defines more lanes

Following on from D87757 "[SplitKit] Only copy live lanes", in
SplitEditor::addDeadDef, when we're checking whether the parent live
interval has a subrange defining the same lanes, tolerate the case
where the parent subrange defines a superset of the lanes. This can
happen when the child subrange comes from SplitEditor::buildCopy
decomposing a partial copy into a sequence of subreg copies that cover
the required lanes.

Differential Revision: https://reviews.llvm.org/D88020
The file was modifiedllvm/lib/CodeGen/SplitKit.cpp
The file was modifiedllvm/lib/CodeGen/SplitKit.h
The file was addedllvm/test/CodeGen/AMDGPU/splitkit-getsubrangeformask.ll
Commit f11f382523e096859571b61520af81b9bb1defbf by jay.foad
[AMDGPU] Fix declaration parameter names to match definition

This fixes the declaration of AMDGPULegalizerInfo::legalizeBufferLoad to
match the definition. It is still confusing that that parameter order is
different from legalizeBufferStore.

https://bugs.llvm.org/show_bug.cgi?id=47535
The file was modifiedllvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.h
Commit a88c722e687e6780dcd6a58718350dc76fcc4cc9 by momchil.velikov
[AArch64] PAC/BTI code generation for LLVM generated functions

PAC/BTI-related codegen in the AArch64 backend is controlled by a set
of LLVM IR function attributes, added to the function by Clang, based
on command-line options and GCC-style function attributes. However,
functions, generated in the LLVM middle end (for example,
asan.module.ctor or __llvm_gcov_write_out) do not get any attributes
and the backend incorrectly does not do any PAC/BTI code generation.

This patch record the default state of PAC/BTI codegen in a set of
LLVM IR module-level attributes, based on command-line options:

* "sign-return-address", with non-zero value means generate code to
  sign return addresses (PAC-RET), zero value means disable PAC-RET.

* "sign-return-address-all", with non-zero value means enable PAC-RET
  for all functions, zero value means enable PAC-RET only for
  functions, which spill LR.

* "sign-return-address-with-bkey", with non-zero value means use B-key
  for signing, zero value mean use A-key.

This set of attributes are always added for AArch64 targets (as
opposed, for example, to interpreting a missing attribute as having a
value 0) in order to be able to check for conflicts when combining
module attributed during LTO.

Module-level attributes are overridden by function level attributes.
All the decision making about whether to not to generate PAC and/or
BTI code is factored out into AArch64FunctionInfo, there shouldn't be
any places left, other than AArch64FunctionInfo, which directly
examine PAC/BTI attributes, except AArch64AsmPrinter.cpp, which
is/will-be handled by a separate patch.

Differential Revision: https://reviews.llvm.org/D85649
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.cpp
The file was modifiedllvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-5.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64BranchTargets.cpp
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-2fixup-blr-terminator.mir
The file was modifiedllvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-1.ll
The file was modifiedclang/test/CodeGen/aarch64-sign-return-address.c
The file was modifiedllvm/test/CodeGen/AArch64/branch-target-enforcement.mir
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-outline-bti.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64InstrInfo.td
The file was modifiedllvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
The file was modifiedllvm/test/CodeGen/AArch64/patchable-function-entry-bti.ll
The file was removedclang/test/CodeGenCXX/aarch64-sign-return-address-static-ctor.cpp
The file was modifiedclang/test/CodeGen/aarch64-branch-protection-attr.c
The file was modifiedllvm/test/CodeGen/AArch64/bti-branch-relaxation.ll
The file was modifiedllvm/test/CodeGen/AArch64/machine-outliner-bti.mir
The file was modifiedllvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-7.ll
The file was modifiedllvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp
The file was addedllvm/test/CodeGen/AArch64/pacbti-module-attrs.ll
The file was modifiedllvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-4.ll
The file was addedllvm/test/CodeGen/AArch64/pacbti-llvm-generated-funcs-2.ll
The file was modifiedllvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-3.ll
The file was addedllvm/test/CodeGen/AArch64/pacbti-llvm-generated-funcs-1.ll
The file was modifiedclang/lib/CodeGen/TargetInfo.cpp
The file was modifiedclang/lib/CodeGen/CodeGenModule.cpp
The file was modifiedllvm/test/CodeGen/AArch64/branch-target-enforcement-indirect-calls.ll
The file was modifiedclang/lib/CodeGen/CGDeclCXX.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64MachineFunctionInfo.cpp
The file was modifiedllvm/lib/Target/AArch64/AArch64FrameLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-8.ll
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
The file was modifiedllvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-0.ll
Commit facad21b29839a08fdf448eb4dd5a4e31e293b9b by adam.balogh
[Analyzer] Fix for `ExprEngine::computeObjectUnderConstruction()` for base and delegating consturctor initializers

For /C++/ constructor initializers `ExprEngine:computeUnderConstruction()`
asserts that they are all member initializers. This is not neccessarily
true when this function is used to get the return value for the
construction context thus attempts to fetch return values of base and
delegating constructor initializers result in assertions. This small
patch fixes this issue.

Differential Revision: https://reviews.llvm.org/D85351
The file was modifiedclang/unittests/StaticAnalyzer/TestReturnValueUnderConstruction.cpp
The file was modifiedclang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
Commit 9d2ef5e74eea2247657431f44152f1f83ed99b84 by whisperity
[CMake][CTE] Add "check-clang-extra-..." targets to test only a particular Clang extra tool

Create targets `check-clang-extra-clang-tidy`, `check-clang-extra-clang-query`
similar to how `check-clang-sema`, `check-clang-parser`, etc. are
auto-generated from the directory structure.

This allows running only a particular sub-tool's tests, not having to wait
through the entire `check-clang-tools` execution.

Differential Revision: http://reviews.llvm.org/D84176
The file was modifiedclang-tools-extra/test/CMakeLists.txt
Commit d224175230d1ab232cfdf71f9da63a732f405c91 by stefanp
[PowerPC][LLD] Extend R2 save stub to support offsets of more than 26 bits

The R2 save stub will now support offsets up to 64 bits.

There are three cases that will be used.
1) The offset fits in 26 bits.
```
b <26 bit offset>
```
2) The offset does not fit in 26 bits but fits in 34 bits.
```
paddi r12, 0, <34 bit offset>, 1
mtctr r12
bctr
```
3) The offset does not fit in 34 bits. Since this is an R2 save stub we can use
the TOC in R2. We are not loading the offset but the actual address we want to
branch to.
```
addis r12, r2, <address in TOC lo>
ld r12 <address in TOC hi>(r12)
mtctr r12
bctr
```

In case 1) the stub is only 8 bytes while in cases 2) and 3) the stub will be
20 bytes.

Reviewed By: MaskRay, sfertile, NeHuang

Differential Revision: https://reviews.llvm.org/D87916
The file was modifiedlld/test/ELF/ppc64-toc-call-to-pcrel-long-jump.s
The file was modifiedlld/ELF/Thunks.cpp
Commit 852447650c75de5f3e9c53a2659589cd2fd36b4d by llvm-dev
[InstCombine] Add bswap tests from funnel shift intrinsics

Based on (WIP) patch in D87452 - I'm intending to add the intrinsics handling to collectBitParts as a separate patch to make the changes clearer.
The file was modifiedllvm/test/Transforms/InstCombine/bswap.ll
Commit f330d9f163f644b968c6aa5884dc1be5efda20a1 by zarko
[PPC] [AIX] Implement calling convention IR for C99 complex types on AIX

Add AIX calling convention logic to Clang for C99 complex types on AIX

Differential Revision: https://reviews.llvm.org/D88130
The file was modifiedclang/lib/CodeGen/TargetInfo.cpp
The file was removedclang/test/CodeGen/aix-complex.c
The file was modifiedclang/test/CodeGen/powerpc-c99complex.c
Commit b8880f5f97bf1628b2c9606e96abcd612dc7d747 by ajcbik
[mlir] [VectorOps] generalize printing support for integers

This generalizes printing beyond just i1,i32,i64 and also accounts
for signed and unsigned interpretation in the output.

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D88290
The file was modifiedmlir/lib/ExecutionEngine/CRunnerUtils.cpp
The file was addedmlir/integration_test/Dialect/Vector/CPU/test-print-int.mlir
The file was modifiedmlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
The file was modifiedmlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
Commit e336b74c995d665bc3fb75164375bbb0f78f516c by klimek
[clang-format] Add a MacroExpander.

Summary:
The MacroExpander allows to expand simple (non-resursive) macro
definitions from a macro identifier token and macro arguments. It
annotates the tokens with a newly introduced MacroContext that keeps
track of the role a token played in expanding the macro in order to
be able to reconstruct the macro expansion from an expanded (formatted)
token stream.

Made Token explicitly copy-able to enable copying tokens from the parsed
macro definition.

Reviewers: sammccall

Subscribers: mgorny, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D83296
The file was addedclang/lib/Format/Macros.h
The file was addedclang/unittests/Format/MacroExpanderTest.cpp
The file was modifiedclang/lib/Format/FormatToken.h
The file was addedclang/lib/Format/MacroExpander.cpp
The file was modifiedclang/unittests/Format/CMakeLists.txt
The file was addedclang/unittests/Format/TestLexer.h
The file was modifiedclang/lib/Format/CMakeLists.txt
Commit 6a1bca8798c6ba119f188061472b60876495b9ae by benny.kra
[Analyzer] Fix unused variable warning in Release builds

clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp:377:19: warning: unused variable 'Init'
The file was modifiedclang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp
Commit 9112567bbd1f479599e389ef9f45f820a1eab59c by llvmgnsyncbot
[gn build] Port e336b74c995
The file was modifiedllvm/utils/gn/secondary/clang/unittests/Format/BUILD.gn
The file was modifiedllvm/utils/gn/secondary/clang/lib/Format/BUILD.gn