1. [scudo] Remove disableMemoryTagChecksTestOnly (details)
  2. [scudo] Add memtag_test (details)
  3. [scudo] Untag pointer in iterateOverChunks (details)
  4. Fix a diagnoses-valid bug with using declarations (details)
  5. [InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat (details)
  6. Regenerate a few tests related to SCEV. (details)
  7. Add memref.dim canonicalization patterns to TilingCanonicalizationPatterns (details)
  8. [gn build] (semi-manually) port 07c92b2e9581 (details)
  9. [scudo] Fix String DCHECK (details)
  10. [OpenMP] Add experimental nesting mode feature (details)
Commit 39f928ed01fde8604515421c5438c3ecb537fbf2 by Vitaly Buka
[scudo] Remove disableMemoryTagChecksTestOnly

And replace with ScopedDisableMemoryTagChecks.

Differential Revision: https://reviews.llvm.org/D103708
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/combined_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/memtag.h
Commit 07c92b2e958191a43464a5ca08933be56d72f2df by Vitaly Buka
[scudo] Add memtag_test

Differential Revision: https://reviews.llvm.org/D103074
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/CMakeLists.txt
The file was modifiedcompiler-rt/lib/scudo/standalone/memtag.h
The file was addedcompiler-rt/lib/scudo/standalone/tests/memtag_test.cpp
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/scudo_unit_test.h
Commit 1e6d135325357d8c32fd0b0d7f668cad91d478bc by Vitaly Buka
[scudo] Untag pointer in iterateOverChunks

Pointer comparison in Lambda will not work on tagged pointers.

Reviewed By: pcc

Differential Revision: https://reviews.llvm.org/D103496
The file was modifiedcompiler-rt/lib/scudo/standalone/combined.h
The file was modifiedcompiler-rt/lib/scudo/standalone/tests/wrappers_c_test.cpp
Commit ca68f3bc48e48f839142de1461e95d87ae48e9df by aaron
Fix a diagnoses-valid bug with using declarations

The following was found by a customer and is accepted by the other primary
C++ compilers, but fails to compile in Clang:

namespace sss {
double foo(int, double);
template <class T>
T foo(T); // note: target of using declaration
}  // namespace sss

namespace oad {
void foo();

namespace oad {
using ::sss::foo;

namespace sss {
using oad::foo; // note: using declaration

namespace sss {
double foo(int, double) { return 0; }
template <class T>
T foo(T t) { // error: declaration conflicts with target of using
  return t;
}  // namespace sss

I believe the issue is that MergeFunctionDecl() was calling
checkUsingShadowRedecl() but only considering a FunctionDecl as a
possible shadow and not FunctionTemplateDecl. The changes in this patch
largely mirror how variable declarations were being handled by also
catching FunctionTemplateDecl.
The file was modifiedclang/lib/Sema/SemaDecl.cpp
The file was modifiedclang/test/CXX/modules-ts/basic/basic.def.odr/p6/module-vs-module.cpp
The file was modifiedclang/test/CXX/modules-ts/basic/basic.def.odr/p6/module-vs-global.cpp
The file was modifiedclang/test/SemaCXX/using-decl-templates.cpp
The file was modifiedclang/test/CXX/modules-ts/basic/basic.def.odr/p6/global-vs-module.cpp
Commit 9e51d1f348b95affe6a8345ce3906997a49f0297 by i
[InstrProfiling] If no value profiling, make data variable private and (for Windows) use one comdat

`__profd_*` variables are referenced by code only when value profiling is
enabled. If disabled (e.g. default -fprofile-instr-generate), the symbols just
waste space on ELF/Mach-O. We change the comdat symbol from `__profd_*` to
`__profc_*` because an internal symbol does not provide deduplication features
on COFF. The choice doesn't matter on ELF.

(In -DLLVM_BUILD_INSTRUMENTED_COVERAGE=on build, there is now no `__profd_*` symbols.)

On Windows this enables further optimization. We are no longer affected by the
link.exe limitation: an external symbol in IMAGE_COMDAT_SELECT_ASSOCIATIVE can
cause duplicate definition error.
We can thus use llvm.compiler.used instead of llvm.used like ELF (D97585).
This avoids many `/INCLUDE:` directives in `.drectve`.

Here is rnk's measurement for Chrome:
This reduced object file size of base_unittests.exe, compiled with coverage, optimizations, and gmlt debug info by 10%:


$ find . -iname '*.obj' | xargs du -b | awk '{ sum += $1 } END { print sum}'

$ du -cksh base_unittests.exe
82M     base_unittests.exe
82M     total


$ find . -iname '*.obj' | xargs du -b | awk '{ sum += $1 } END { print sum}'

$ du -cksh base_unittests.exe
78M     base_unittests.exe
78M     total

The change is NFC for Mach-O.

Reviewed By: davidxl, rnk

Differential Revision: https://reviews.llvm.org/D103372
The file was modifiedllvm/test/Instrumentation/InstrProfiling/comdat.ll
The file was modifiedllvm/test/Instrumentation/InstrProfiling/platform.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
The file was modifiedllvm/test/Transforms/PGOProfile/comdat_internal.ll
The file was modifiedllvm/test/Instrumentation/InstrProfiling/profiling.ll
The file was modifiedllvm/test/Instrumentation/InstrProfiling/icall.ll
The file was modifiedllvm/test/Instrumentation/InstrProfiling/linkage.ll
Commit 925cd6b46780901ab2f9c0e737600ed0a500cd9b by efriedma
Regenerate a few tests related to SCEV.

In preparation for https://reviews.llvm.org/D103656
The file was modifiedllvm/test/Transforms/LoopIdiom/memset-debugify-remarks.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/cost-model-assert.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/pointer-induction.ll
The file was modifiedllvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll
Commit a52959401d9544ac7037405aaf714bd08f071ea9 by ataei
Add memref.dim canonicalization patterns to TilingCanonicalizationPatterns

Otherwise tiled and padded linalg op will be alive (after distribution).

Differential Revision: https://reviews.llvm.org/D103715
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
Commit efea1b17824377c274abe5600d7d973087553e23 by thakis
[gn build] (semi-manually) port 07c92b2e9581
The file was modifiedllvm/utils/gn/secondary/compiler-rt/lib/scudo/standalone/tests/BUILD.gn
Commit 5019b0a56588fc13e6a37c49e22a812afe6c4416 by kostyak
[scudo] Fix String DCHECK

This resolves an issue tripping a `DCHECK`, as I was checking for the
capacity and not the size. We don't need to 0-init the Vector as it's
done already, and make sure we only 0-out the string on clear if it's
not empty.

Differential Revision: https://reviews.llvm.org/D103716
The file was modifiedcompiler-rt/lib/scudo/standalone/string_utils.h
Commit 8ec9aa236e325fd4629cfeefac2919302e14d61a by terry.l.wilmarth
[OpenMP] Add experimental nesting mode feature

Nesting mode is a new experimental feature in the OpenMP
runtime. It allows a user to set up nesting for an application in a
way that corresponds to the hardware topology levels on the machine an
application is being run on.  For example, if a machine has 2 sockets,
each with 12 cores, then use of nesting mode could set up an outer
level of nesting that uses 2 threads per parallel region, and an inner
level of nesting that uses 12 threads per parallel region.

Nesting mode is controlled with the KMP_NESTING_MODE environment
variable as follows:

1) KMP_NESTING_MODE = 0: Nesting mode is off (default); max-active-levels-var
is set to 1 (the default -- nesting is off, nested parallel regions
are serialized).

2) KMP_NESTING_MODE = 1: Nesting mode is on, and a number of threads
will be assigned for each level discovered in the machine topology;
max-active-levels-var is set to the number of levels discovered.

3) KMP_NESTING_MODE = n, n>1: [Note: this option is experimental and may change
or be removed in the future.] Nesting mode is on, and a number of
threads will be assigned for each topology level discovered on the
machine, up to k<=n levels (since there may be fewer than n levels
discovered in the topology), and beyond the kth level, nested parallel
regions will be serialized; NOTE: max-active-levels-var is 1 (the default --
nesting is off, and nested parallel regions are serialized until the
user changes max-active-levels-var.

If the user sets OMP_NUM_THREADS or OMP_MAX_ACTIVE_LEVELS, they will
override KMP_NESTING_MODE settings for the associated environment
variables. The detected topology may be limited by an affinity mask
setting on the initial thread, or if the user sets KMP_HW_SUBSET. See
also: KMP_HOT_TEAMS_MAX_LEVEL for controlling use of hot teams for
nested parallel regions. Note that this feature only sets numbers of
threads used at nesting levels.  The user should make use of
OMP_PLACES and OMP_PROC_BIND or KMP_AFFINITY for affinitizing those
threads, if desired.

Differential Revision: https://reviews.llvm.org/D102188
The file was modifiedopenmp/runtime/src/kmp_global.cpp
The file was modifiedopenmp/runtime/src/kmp.h
The file was modifiedopenmp/runtime/src/kmp_ftn_entry.h
The file was modifiedopenmp/runtime/src/kmp_runtime.cpp
The file was modifiedopenmp/runtime/src/kmp_settings.cpp