Changes

Summary

  1. [Internalize] Rename instead of removal if a to-be-internalized comdat has more than one member (details)
  2. [ARM] Extra predicated tests for VMULH. NFC (details)
  3. [libc++] Install GCC 11 on CI builders (details)
  4. [libomptarget][nfc] Move hostcall required test to rtl (details)
  5. [Toy] Update tests to pass with top-down canonicalize pass. NFC (details)
  6. [MLIR Core] Cache the empty StringAttr like we do for empty dictionaries. NFC. (details)
  7. [NFC][SCUDO] Fix unittest for -gtest_repeat=10 (details)
  8. [NFC][MLIR][TOSA] Replaced tosa linalg.indexed_generic lowerings with linalg.index (details)
Commit b426b45d101740a21610205ec80610c6d0969966 by i
[Internalize] Rename instead of removal if a to-be-internalized comdat has more than one member

Beside the `comdat any` deduplication feature, instrumentations use comdat to
establish dependencies among a group of sections, to prevent section based
linker garbage collection from discarding some members without discarding all.
LangRef acknowledges this usage with the following wording:

> All global objects that specify this key will only end up in the final object file if the linker chooses that key over some other key.

On ELF, for PGO instrumentation, a `__llvm_prf_cnts` section and its associated
`__llvm_prf_data` section are placed in the same GRP_COMDAT group.  A
`__llvm_prf_data` is usually not referenced and expects the liveness of its
associated `__llvm_prf_cnts` to retain it.

The `setComdat(nullptr)` code (added by D10679) in InternalizePass can break the
use case (a `__llvm_prf_data` may be dropped with its associated `__llvm_prf_cnts` retained).
The main goal of this patch is to fix the dependency relationship.

I think it makes sense for InternalizePass to internalize a comdat and thus
suppress the deduplication feature, e.g. a relocatable link of a regular LTO can
create an object file affected by InternalizePass.
If a non-internal comdat in a.o is prevailed by an internal comdat in b.o, the
a.o references to the comdat definitions will be non-resolvable (references
cannot bind to STB_LOCAL definitions in b.o).

On PE-COFF, for a non-external selection symbol, deduplication is naturally
suppressed with link.exe and lld-link. However, this is fuzzy on ELF and I tend
to believe the spec creator has not thought about this use case (see D102973).

GNU ld and gold are still using the "signature is name based" interpretation.
So even if D102973 for ld.lld is accepted, for portability, a better approach is
to rename the comdat. A comdat with one single member is the common case,
leaving the comdat can waste (sizeof(Elf64_Shdr)+4*2) bytes, so we optimize by
deleting the comdat; otherwise we rename the comdat.

Reviewed By: tejohnson

Differential Revision: https://reviews.llvm.org/D103043
The file was modifiedllvm/include/llvm/Transforms/IPO/Internalize.h
The file was addedllvm/test/Transforms/Internalize/comdat-empty-moduleid.ll
The file was modifiedllvm/lib/Transforms/IPO/Internalize.cpp
The file was modifiedllvm/test/Transforms/Internalize/comdat.ll
Commit 8cc437a8a16e6d2dd403a9a3a74594574e3371d4 by david.green
[ARM] Extra predicated tests for VMULH. NFC
The file was modifiedllvm/test/CodeGen/Thumb2/mve-vmulh.ll
Commit 66781efd0acf738b78ec74b04a8f2d7fc18278c7 by Louis Dionne
[libc++] Install GCC 11 on CI builders
The file was modifiedlibcxx/utils/ci/Dockerfile
Commit df005fa364ae3914231f98f80acc120fcf782c26 by jonathanchesterfield
[libomptarget][nfc] Move hostcall required test to rtl

[libomptarget][nfc] Move hostcall required test to rtl

Remove a global, fix minor race. First of N patches to bring up hostcall.

Reviewed By: JonChesterfield

Differential Revision: https://reviews.llvm.org/D103058
The file was modifiedopenmp/libomptarget/plugins/amdgpu/src/rtl.cpp
The file was modifiedopenmp/libomptarget/plugins/amdgpu/impl/system.cpp
Commit a6a57f03be40cf2c546805155624a206649092ec by clattner
[Toy] Update tests to pass with top-down canonicalize pass. NFC
The file was modifiedmlir/test/Examples/Toy/Ch5/affine-lowering.mlir
The file was modifiedmlir/test/Examples/Toy/Ch6/affine-lowering.mlir
The file was modifiedmlir/test/Examples/Toy/Ch7/affine-lowering.mlir
Commit aaa2982d7191eaf8638c91d0aa5b16f5523a1fc8 by clattner
[MLIR Core] Cache the empty StringAttr like we do for empty dictionaries. NFC.

MLIRContext holds a few special case values that occur frequently like empty
dictionary and NoneType, which allow us to avoid taking locks to get an instance
of them.  Give the empty StringAttr this treatment as well.  This cuts several
percent off compile time for CIRCT.

Differential Revision: https://reviews.llvm.org/D103117
The file was modifiedmlir/lib/IR/MLIRContext.cpp
The file was modifiedmlir/include/mlir/IR/BuiltinAttributes.td
The file was modifiedmlir/lib/IR/BuiltinAttributes.cpp
Commit e14696bfd740edb3f2fa7b9f36022f36000742ec by Vitaly Buka
[NFC][SCUDO] Fix unittest for -gtest_repeat=10

Reviewed By: cryptoad

Differential Revision: https://reviews.llvm.org/D103122
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/common_test.cpp
Commit e5d227e95ca1d0386b4aa8bc5e29b76d3eb4b8a0 by rob.suderman
[NFC][MLIR][TOSA] Replaced tosa linalg.indexed_generic lowerings with linalg.index

Indexed Generic should be going away in the future. Migrate to linalg.index.

Reviewed By: NatashaKnk, nicolasvasilache

Differential Revision: https://reviews.llvm.org/D103110
The file was modifiedmlir/lib/Conversion/TosaToLinalg/TosaToLinalg.cpp
The file was modifiedmlir/test/Conversion/TosaToLinalg/tosa-to-linalg.mlir