Changes

Summary

  1. [ModuleInlinerWrapperPass] Do some naive printing of wrapped pipeline with -print-pipeline-passes (details)
  2. [DAGCombiner] Rename isAlias as mayAlias. NFC (details)
  3. [TII] Remove the MFI argument to convertToThreeAddress. NFC. (details)
  4. [Driver] Correctly handle static C++ standard library (details)
  5. Revert "[Driver] Correctly handle static C++ standard library" (details)
  6. [libc] Add optimized memset for AArch64 (details)
  7. [InstSimplify] Don't lose inbounds when simplifying a GEP (details)
  8. tsan: remove unnecessary enum values (NFC) (details)
  9. tsan: remove DontDumpShadow from Go build (details)
  10. tsan: add another deep stack test (details)
  11. tsan: use RawShadow instead of u64 more (details)
  12. tsan: move shadow declaration into a separate header file (NFC) (details)
  13. [fir][NFC] inline trival isa_<type> functions (details)
  14. [RISCV][VP] Add support for VP_REDUCE_* operations (details)
  15. [lldb] Fix DomainSocket::GetSocketName for unnamed sockets (details)
Commit c5e0313e4489cb3130f441685fd4207eeee6aa48 by bjorn.a.pettersson
[ModuleInlinerWrapperPass] Do some naive printing of wrapped pipeline with -print-pipeline-passes

Bisecting and reducing opt pipelines that includes the
ModuleInlinerWrapperPass has turned out to be a bit problematic.
This is far from perfect (it still lacks information about inline
advisor params etc.), but it should give some kind of hint to what
the wrapped pipeline looks like when using -print-pipeline-passes.

Reviewed By: aeubanks, mtrofin

Differential Revision: https://reviews.llvm.org/D109878
The file was modifiedllvm/include/llvm/Transforms/IPO/Inliner.h
The file was modifiedllvm/test/Other/new-pm-print-pipeline.ll
The file was modifiedllvm/lib/Transforms/IPO/Inliner.cpp
Commit c3ae8ecb520e6565594272d12e447e295ce09c9b by bjorn.a.pettersson
[DAGCombiner] Rename isAlias as mayAlias. NFC

Differential Revision: https://reviews.llvm.org/D110062
The file was modifiedllvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
Commit 6cef28ed2df19c197790ca777423fc1c2572c138 by jay.foad
[TII] Remove the MFI argument to convertToThreeAddress. NFC.

This simplifies the API and addresses a FIXME in
TwoAddressInstructionPass::convertInstTo3Addr.

Differential Revision: https://reviews.llvm.org/D110229
The file was modifiedllvm/lib/Target/ARM/ARMBaseInstrInfo.h
The file was modifiedllvm/lib/Target/X86/X86InstrInfo.h
The file was modifiedllvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.h
The file was modifiedllvm/lib/Target/X86/X86FixupLEAs.cpp
The file was modifiedllvm/lib/CodeGen/TwoAddressInstructionPass.cpp
The file was modifiedllvm/lib/Target/AMDGPU/SIInstrInfo.cpp
The file was modifiedllvm/lib/Target/ARM/ARMBaseInstrInfo.cpp
The file was modifiedllvm/lib/Target/X86/X86InstrInfo.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfo.h
The file was modifiedllvm/lib/Target/AMDGPU/SIFoldOperands.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfo.cpp
The file was modifiedllvm/lib/Target/SystemZ/SystemZInstrInfo.h
The file was modifiedllvm/include/llvm/CodeGen/TargetInstrInfo.h
Commit 5e28c892d06f95600f8b6290ad4de38bfe142637 by phosek
[Driver] Correctly handle static C++ standard library

When statically linking C++ standard library, we shouldn't add -Bdynamic
after including the library on the link line because that might override
user settings like -static and -static-pie. Rather, we should surround
the library with --push-state/--pop-state to make sure that -Bstatic
only applies to C++ standard library and nothing else. This has been
supported since GNU ld 2.25 (2014) so backwards compatibility should
no longer be a concern.

Differential Revision: https://reviews.llvm.org/D110128
The file was modifiedclang/test/Driver/linux-ld.c
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
The file was modifiedclang/lib/Driver/ToolChains/Fuchsia.cpp
The file was modifiedclang/test/Driver/fuchsia.cpp
Commit 904ca7d2ed97bf114fd11373c722acd1e54bfaa3 by phosek
Revert "[Driver] Correctly handle static C++ standard library"

This reverts commit 5e28c892d06f95600f8b6290ad4de38bfe142637 as
the linker on the clang-ppc64le-rhel bot doesn't seem to support
--push-state/--pop-state.
The file was modifiedclang/lib/Driver/ToolChains/Gnu.cpp
The file was modifiedclang/test/Driver/fuchsia.cpp
The file was modifiedclang/test/Driver/linux-ld.c
The file was modifiedclang/lib/Driver/ToolChains/Fuchsia.cpp
Commit 8b87c3d5736730cda1d8856098621029b759f3d1 by andre.simoesdiasvieira
[libc] Add optimized memset for AArch64

Differential Revision: https://reviews.llvm.org/D107848
The file was addedlibc/src/string/aarch64/memset.cpp
The file was modifiedlibc/src/string/CMakeLists.txt
The file was modifiedlibc/src/string/memory_utils/elements_aarch64.h
Commit 05663dc14644d12d688155d55ba267e7b7e69817 by Alexander.Richardson
[InstSimplify] Don't lose inbounds when simplifying a GEP

I noticed this while working on a (ptrtoint (gep null, x)) -> x fold.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D110168
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
The file was modifiedllvm/lib/Transforms/Scalar/NewGVN.cpp
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/include/llvm/Analysis/InstructionSimplify.h
The file was modifiedllvm/test/Transforms/InstSimplify/simplify-nested-bitcast.ll
The file was modifiedllvm/lib/Analysis/PHITransAddr.cpp
Commit af8b14c278c2cb5309562b6e3fa55333c2889d86 by dvyukov
tsan: remove unnecessary enum values (NFC)

Remove unnecessary enum values in the memory profiler.
There is no point in spelling them, it can only lead to bugs
and larger diffs when values are added/removed.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D110263
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
Commit 356ecd9bd1c5c10ff776dced80f353839fafb354 by dvyukov
tsan: remove DontDumpShadow from Go build

DontDumpShadow is used only in InitializeShadowMemory which is Go-only.

Depends on D110263.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D110264
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform_posix.cpp
Commit dcc6db22d8508a85ecd2b8bdcc5ae5646968c083 by dvyukov
tsan: add another deep stack test

Add a test for a trace corner case that lead to a bug
in experimental runtime replacement.
Since it passes with the current runtime it makes sense
to submit it on its own.

Depends on D110264.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D110265
The file was addedcompiler-rt/test/tsan/deep_stack2.cpp
Commit 20d3e518010a2a4fa1f4cdc9b7b885f13966a19c by dvyukov
tsan: use RawShadow instead of u64 more

Fix few remaining cases where we use u64 instead of the new RawShadow type.

Depends on D110265.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D110266
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_platform_linux.cpp
Commit 702cb7afe9de21b9a86d012cdd0b283496e619af by dvyukov
tsan: move shadow declaration into a separate header file (NFC)

tsan_rtl.h is very huge and contains too many things.
Move FastState and Shadow types into a new tsan_shadow.h file.
This also allows to use FastState/Shadow in other header files
without creating circular dependencies (which most likely will
happen today).

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D110272
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_rtl.h
The file was modifiedcompiler-rt/lib/tsan/CMakeLists.txt
The file was addedcompiler-rt/lib/tsan/rtl/tsan_shadow.h
Commit ce59ccd04023cab3a837da14079ca2dcbfebb70c by clementval
[fir][NFC] inline trival isa_<type> functions

This patch is part of the upstreaming effort from fir-dev branch and sync changes. Inline trival `isa_<type>` functions.

Co-authored-by: schweitzpgi

Reviewed By: kiranchandramohan

Differential Revision: https://reviews.llvm.org/D110233
The file was modifiedflang/include/flang/Optimizer/Dialect/FIRType.h
The file was modifiedflang/lib/Optimizer/Dialect/FIRType.cpp
Commit e7c879a69d6b61f35969936a9efd46bcfbf80ca0 by fraser
[RISCV][VP] Add support for VP_REDUCE_* operations

This patch adds codegen support for lowering the vector-predicated
reduction intrinsics to RVV instructions. The process is similar to that
of the other reduction intrinsics, save for the fact that every VP
reduction has a start value. We reuse the existing custom "VL" nodes,
adding extra patterns where required to handle non-true masks.

To support these nodes, the `RISCVISD::VECREDUCE_*_VL` nodes have been
given an explicit "merge" operand. This is to faciliate the VP
reductions, where we must be careful to ensure that even if no operation
is performed (when VL=0) we still produce the start value. The RVV
reductions don't update the destination register under these conditions,
so we tie the splatted start value to the output register.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D107657
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoVVLPatterns.td
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
The file was modifiedllvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was addedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-fp-vp.ll
The file was addedllvm/test/CodeGen/RISCV/rvv/vreductions-int-vp.ll
The file was addedllvm/test/CodeGen/RISCV/rvv/vreductions-fp-vp.ll
The file was addedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-mask-vp.ll
The file was addedllvm/test/CodeGen/RISCV/rvv/fixed-vectors-reduction-int-vp.ll
The file was addedllvm/test/CodeGen/RISCV/rvv/vreductions-mask-vp.ll
Commit 5685eb950da7c6901c8b264a3c93e8ea63b34d3d by pavel
[lldb] Fix DomainSocket::GetSocketName for unnamed sockets

getpeername will return addrlen = 2 (sizeof sa_family_t) for unnamed
sockets (those not assigned a name with bind(2)). This is typically true
for client sockets as well as those created by socketpair(2).

This GetSocketName used to crash for sockets which were connected to
these kinds of sockets. Now it returns an empty string.
The file was modifiedlldb/source/Host/posix/DomainSocket.cpp
The file was modifiedlldb/unittests/Host/SocketTest.cpp