SuccessChanges

Summary

  1. [clangd] Shutdown sequence for modules, and doc threading requirements (details)
  2. Modify TypePrinter to differentiate between anonymous struct and unnamed struct (details)
  3. scudo: Support memory tagging in the secondary allocator. (details)
  4. [ValueTracking] Improve ComputeNumSignBits for SRem. (details)
  5. [AArch64][GlobalISel] Match G_SHUFFLE_VECTOR -> insert elt + extract elt (details)
  6. DebugInfo: Emit "LocalToUnit" flag on local member function decls. (details)
  7. [RISCV] Have sexti32 also recognize AssertZExt from types smaller than i32. (details)
  8. [CMake] Don't optimize tests so much under ThinLTO (details)
  9. [AMDGPU] Move RPT::getLiveRegs() check under EXPENSIVE_CHECKS (details)
  10. Add auto-upgrade support for annotation intrinsics (details)
  11. DebugInfo: Emit "LocalToUnit" flag on local member function decls. (details)
  12. [X86][AMX] Lower tile copy instruction. (details)
  13. [gn build] Port 8f48ddd19358 (details)
  14. [JITLink] Don't allow creation of sections with duplicate names. (details)
  15. [JITLink] Add a getFixupAddress convenience method to Block. (details)
Commit f0e69272c62f2b7a39687748db60d21445010ac5 by sam.mccall
[clangd] Shutdown sequence for modules, and doc threading requirements

This allows modules to do work on non-TUScheduler background threads.

Differential Revision: https://reviews.llvm.org/D96755
The file was modifiedclang-tools-extra/clangd/ClangdServer.cpp
The file was modifiedclang-tools-extra/clangd/ClangdServer.h
The file was modifiedclang-tools-extra/clangd/Module.h
The file was modifiedclang-tools-extra/clangd/unittests/ClangdLSPServerTests.cpp
Commit 50542d504dd869fe1241a9cc987b72ead5a56073 by Shafik Yaghmour
Modify TypePrinter to differentiate between anonymous struct and unnamed struct

Currently TypePrinter lumps anonymous classes and unnamed classes in one group "anonymous" this is not correct and can be confusing in some contexts.

Differential Revision: https://reviews.llvm.org/D96807
The file was modifiedclang/test/AST/ast-dump-openmp-taskgroup.c
The file was modifiedclang/test/AST/ast-dump-openmp-cancellation-point.c
The file was modifiedclang/test/SemaCXX/warn-sign-conversion.cpp
The file was modifiedclang/test/AST/ast-dump-openmp-distribute.c
The file was modifiedclang/test/Layout/ms-x86-alias-avoidance-padding.cpp
The file was modifiedclang/test/PCH/stmt-openmp_structured_block-bit.cpp
The file was modifiedlldb/test/Shell/SymbolFile/DWARF/debug-types-missing-signature.test
The file was modifiedclang/test/SemaCXX/condition.cpp
The file was modifiedclang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for.c
The file was modifiedclang/test/AST/ast-dump-openmp-parallel-for.c
The file was modifiedclang/test/AST/ast-dump-openmp-parallel-sections.c
The file was modifiedclang/test/AST/ast-dump-enum-json.cpp
The file was modifiedclang/test/AST/ast-dump-openmp-target-parallel-for.c
The file was modifiedclang/test/AST/ast-dump-openmp-ordered.c
The file was modifiedclang/test/Analysis/cfg.cpp
The file was modifiedclang/test/AST/ast-dump-openmp-single.c
The file was modifiedclang/test/AST/ast-dump-openmp-taskloop-simd.c
The file was modifiedclang/test/Sema/switch.c
The file was modifiedclang/test/AST/ast-dump-openmp-section.c
The file was modifiedclang/test/AST/ast-dump-records-json.cpp
The file was modifiedclang/test/AST/ast-dump-openmp-target-teams.c
The file was modifiedclang/test/AST/ast-dump-openmp-distribute-parallel-for-simd.c
The file was modifiedclang/test/AST/ast-dump-openmp-for.c
The file was modifiedclang/test/Index/print-type.c
The file was modifiedclang/test/AST/ast-dump-openmp-target-parallel.c
The file was modifiedclang/test/AST/ast-dump-openmp-target-parallel-for-simd.c
The file was modifiedclang/test/AST/ast-dump-openmp-parallel-for-simd.c
The file was modifiedclang/test/AST/ast-dump-openmp-taskloop.c
The file was modifiedclang/test/AST/ast-dump-openmp-target-data.c
The file was modifiedclang/test/AST/ast-dump-openmp-target-teams-distribute.c
The file was modifiedclang/test/Index/print-type.cpp
The file was modifiedclang/test/AST/ast-dump-openmp-for-simd.c
The file was modifiedclang/test/AST/ast-dump-openmp-simd.c
The file was modifiedclang/test/AST/ast-dump-openmp-teams.c
The file was modifiedclang-tools-extra/clangd/unittests/HoverTests.cpp
The file was modifiedclang/test/SemaCXX/enum.cpp
The file was modifiedclang/lib/AST/TypePrinter.cpp
The file was modifiedclang/test/AST/ast-dump-openmp-target-update.c
The file was modifiedclang/test/Sema/assign.c
The file was modifiedclang/test/AST/ast-dump-decl-json.c
The file was modifiedclang/test/AST/ast-dump-stmt-json.m
The file was modifiedclang/test/AST/ast-dump-openmp-sections.c
The file was modifiedclang/test/ASTMerge/struct/test.c
The file was modifiedclang/test/AST/ast-dump-openmp-cancel.c
The file was modifiedclang/test/AST/ast-dump-openmp-teams-distribute-simd.c
The file was modifiedclang/test/AST/ast-dump-openmp-target-exit-data.c
The file was modifiedclang/test/AST/ast-dump-records.c
The file was modifiedclang/test/AST/ast-dump-openmp-teams-distribute-parallel-for.c
The file was modifiedclang/test/AST/ast-dump-openmp-target-teams-distribute-parallel-for-simd.c
The file was modifiedlldb/test/Shell/SymbolFile/DWARF/clang-ast-from-dwarf-unamed-and-anon-structs.cpp
The file was modifiedclang/test/AST/ast-dump-openmp-distribute-parallel-for.c
The file was modifiedclang/test/AST/ast-dump-openmp-target-enter-data.c
The file was modifiedclang/test/AST/ast-dump-openmp-distribute-simd.c
The file was modifiedclang/test/AST/ast-dump-openmp-teams-distribute.c
The file was modifiedclang/test/Analysis/padding_c.c
The file was modifiedclang/test/AST/ast-dump-records.cpp
The file was modifiedclang/test/AST/ast-dump-openmp-target-simd.c
The file was modifiedclang/test/AST/ast-dump-openmp-task.c
The file was modifiedclang-tools-extra/clangd/unittests/FindSymbolsTests.cpp
The file was modifiedclang/test/AST/ast-dump-openmp-target-teams-distribute-simd.c
The file was modifiedclang/test/AST/ast-dump-openmp-target.c
The file was modifiedclang/test/AST/ast-dump-openmp-parallel.c
The file was modifiedclang/test/AST/ast-dump-openmp-teams-distribute-parallel-for-simd.c
Commit 7a0da8894348e55d06403ec3af35fb65f97e31fa by peter
scudo: Support memory tagging in the secondary allocator.

This patch enhances the secondary allocator to be able to detect buffer
overflow, and (on hardware supporting memory tagging) use-after-free
and buffer underflow.

Use-after-free detection is implemented by setting memory page
protection to PROT_NONE on free. Because this must be done immediately
rather than after the memory has been quarantined, we no longer use the
combined allocator quarantine for secondary allocations. Instead, a
quarantine has been added to the secondary allocator cache.

Buffer overflow detection is implemented by aligning the allocation
to the right of the writable pages, so that any overflows will
spill into the guard page to the right of the allocation, which
will have PROT_NONE page protection. Because this would require the
secondary allocator to produce a header at the correct position,
the responsibility for ensuring chunk alignment has been moved to
the secondary allocator.

Buffer underflow detection has been implemented on hardware supporting
memory tagging by tagging the memory region between the start of the
mapping and the start of the allocation with a non-zero tag. Due to
the cost of pre-tagging secondary allocations and the memory bandwidth
cost of tagged accesses, the allocation itself uses a tag of 0 and
only the first four pages have memory tagging enabled.

Differential Revision: https://reviews.llvm.org/D93731
The file was modifiedcompiler-rt/lib/scudo/standalone/memtag.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tsd_exclusive.h
The file was modifiedcompiler-rt/lib/scudo/standalone/common.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/secondary_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/fuchsia.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/combined_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/allocator_config.h
The file was modifiedcompiler-rt/lib/scudo/standalone/primary64.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tsd_shared.h
The file was modifiedcompiler-rt/lib/scudo/standalone/linux.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/combined.h
The file was modifiedcompiler-rt/lib/scudo/standalone/secondary.h
Commit 89440df64a5bf9981111e5980647e958f132b6a9 by craig.topper
[ValueTracking] Improve ComputeNumSignBits for SRem.

The result will have the same sign as the dividend unless the
result is 0. The magnitude of the result will always be less
than or equal to the dividend. So the result will have at least
as many sign bits as the dividend.

Previously we would do this if the divisor was a positive constant,
but that isn't required.

Reviewed By: RKSimon

Differential Revision: https://reviews.llvm.org/D97170
The file was modifiedllvm/test/Transforms/InstCombine/with_overflow.ll
The file was modifiedllvm/lib/Analysis/ValueTracking.cpp
Commit 867e379c0e14527eb7aa68485a10324693e35f5d by Jessica Paquette
[AArch64][GlobalISel] Match G_SHUFFLE_VECTOR -> insert elt + extract elt

Match a G_SHUFFLE_VECTOR with a mask that allows it to be represented as a
G_INSERT_VECTOR_ELT and a G_EXTRACT_VECTOR_ELT.

This ports `isINSMask` from AArch64ISelLowering and the portion of
`AArch64TargetLowering::LowerVECTOR_SHUFFLE` which handles the equivalent
transformation.

This provides more opportunities for matching DUP. We don't have all of the
necessary combines to actually make DUP out of these yet, but this is better for
size than the full TBL expansion for G_SHUFFLE_VECTOR.

This is a -0.1% code size improvement on CTMark/Bullet at -Os.

IR example: https://godbolt.org/z/sdcevT

Differential Revision: https://reviews.llvm.org/D97214
The file was modifiedllvm/lib/Target/AArch64/AArch64Combine.td
The file was addedllvm/test/CodeGen/AArch64/GlobalISel/postlegalizer-lowering-shuf-to-ins.mir
The file was modifiedllvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
Commit fe2dcd89acfd9301a230e38e9030734553baa8dc by jyknight
DebugInfo: Emit "LocalToUnit" flag on local member function decls.

Previously, the definition was so-marked, but the declaration was
not. This resulted in LLVM's dwarf emission treating the function as
being external, and incorrectly emitting DW_AT_external.

Differential Revision: https://reviews.llvm.org/D96044
The file was modifiedclang/test/CodeGenCXX/debug-info-class.cpp
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
Commit 3231607ce95fb34adcddbdd55f8bb00b4a2a2125 by craig.topper
[RISCV] Have sexti32 also recognize AssertZExt from types smaller than i32.

An i64 AssertZExt from a type smaller than i32 has at least 33
leading zeros which mean it has at least 33 sign bits.

Since we have a couple patterns that use two sexti32, I've
switched to a ComplexPattern so tablegen didn't have to generate
9 different permutations.

As noted in the FIXME, maybe we should just call computeNumSignBits,
but we don't have tests that benefit from that yet.

Reviewed By: luismarques

Differential Revision: https://reviews.llvm.org/D97130
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoM.td
The file was modifiedllvm/test/CodeGen/RISCV/rv64m-exhaustive-w-insts.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfo.td
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoD.td
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoF.td
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
The file was modifiedllvm/lib/Target/RISCV/RISCVInstrInfoZfh.td
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
Commit e765324d89ef702ec287966f5132527d8de67b22 by aeubanks
[CMake] Don't optimize tests so much under ThinLTO

This drops check-llvm under -DLLVM_ENABLE_LTO=Thin from 13m to 10m20s on Windows and 20m to 15m35s on Linux.

Reviewed By: hans

Differential Revision: https://reviews.llvm.org/D96618
The file was modifiedllvm/cmake/modules/AddLLVM.cmake
Commit bb16efe28030e26f9e5e0eaecfe729a3f1ff2ca7 by Stanislav.Mekhanoshin
[AMDGPU] Move RPT::getLiveRegs() check under EXPENSIVE_CHECKS

This is too expensive even for debug builds. It doubles
scheduling time if enabled.

Differential Revision: https://reviews.llvm.org/D97232
The file was modifiedllvm/lib/Target/AMDGPU/GCNSchedStrategy.cpp
Commit 9a827906cb95e7c3ae94627558da67b47ffde249 by andrew.kaylor
Add auto-upgrade support for annotation intrinsics

The llvm.ptr.annotation and llvm.var.annotation intrinsics were changed
since the 11.0 release to add an additional parameter. This patch
auto-upgrades IR containing the four-parameter versions of these
intrinsics, adding a null pointer as the fifth argument.

Differential Revision: https://reviews.llvm.org/D95993
The file was modifiedllvm/lib/IR/AutoUpgrade.cpp
The file was addedllvm/test/Bitcode/upgrade-ptr-annotation.ll
The file was addedllvm/test/Bitcode/upgrade-var-annotation.ll
The file was addedllvm/test/Bitcode/upgrade-var-annotation.ll.bc
The file was addedllvm/test/Bitcode/upgrade-ptr-annotation.ll.bc
Commit e8617f2f1870022b7dd076bf43c7aaee30831197 by jyknight
DebugInfo: Emit "LocalToUnit" flag on local member function decls.

Follow-up to fe2dcd89acfd9301a230e38e9030734553baa8dc.

Update test per review comments, restoring the "D" type to its
original state, and adding new "L" type. (Sorry, this was intended to
be included in the prior commit)

Differential Revision: https://reviews.llvm.org/D96044
The file was modifiedclang/test/CodeGenCXX/debug-info-class.cpp
Commit 8f48ddd1935831979e1d7f37e47db532534b37c4 by yuanke.luo
[X86][AMX] Lower tile copy instruction.

Since there is no tile copy instruction, we need to store tile
register to stack and load from stack to another tile register.
We need extra GR to hold the stride, and we need stack slot to
hold the tile data register. We would run this pass after copy
propagation, so that we don't miss copy optimization. And we
would run this pass before prolog/epilog insertion, so that we
can allocate stack slot.

Differential Revision: https://reviews.llvm.org/D97112
The file was modifiedllvm/lib/Target/X86/X86RegisterInfo.cpp
The file was modifiedllvm/lib/Target/X86/X86TargetMachine.cpp
The file was modifiedllvm/lib/Target/X86/X86.h
The file was modifiedllvm/lib/Target/X86/CMakeLists.txt
The file was modifiedllvm/test/CodeGen/X86/opt-pipeline.ll
The file was addedllvm/lib/Target/X86/X86LowerTileCopy.cpp
The file was modifiedllvm/test/CodeGen/X86/O0-pipeline.ll
The file was addedllvm/test/CodeGen/X86/AMX/amx-lower-tile-copy.ll
Commit 3322701e3592ea2b0b0b5cbf2b3869807b6253ef by llvmgnsyncbot
[gn build] Port 8f48ddd19358
The file was modifiedllvm/utils/gn/secondary/llvm/lib/Target/X86/BUILD.gn
Commit adf2098bd8193e3f9395512143071328e7bd024d by Lang Hames
[JITLink] Don't allow creation of sections with duplicate names.
The file was modifiedllvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/JITLink/JITLink.h
Commit 430817d0d53f53f3388dde130daa363f56353707 by Lang Hames
[JITLink] Add a getFixupAddress convenience method to Block.
The file was modifiedllvm/unittests/ExecutionEngine/JITLink/LinkGraphTests.cpp
The file was modifiedllvm/include/llvm/ExecutionEngine/JITLink/JITLink.h