Changes

Summary

  1. precommit test for D109845/D106852 (details)
  2. [InstCombine] Improve TryToSinkInstruction with multiple uses (details)
  3. Improve type printing of size-dependent const arrays to normalize array-of-const and const-array (details)
  4. Revert "Re-Revert "clang-tidy: introduce readability-containter-data-pointer check"" (details)
  5. [OpenMP][libomptarget] Minor fix in x86_64 plugin (details)
  6. Senticify some comments - post-commit review for e4b9f5e851d1fe0ba93cbb11b2ed4558602c379e (details)
  7. Re-add getSingleUndroppableUse API (details)
  8. [mlir][linalg] Add canonicalizers for depthwise conv (details)
  9. [Compiler-RT] For arm64e test suites use the SDK version as the minimum deployment target. (details)
  10. [DRR] Explicit Return Types in Rewrites (details)
Commit 248e430f37c8486e526147c5e6b8cbda1e633467 by listmail
precommit test for D109845/D106852
The file was modifiedllvm/test/Analysis/ScalarEvolution/no-wrap-add-exprs.ll
Commit 4ac4e52189aa6d80c3d59dc2c8f7dcc0cb7f9d58 by anna
[InstCombine] Improve TryToSinkInstruction with multiple uses

This patch allows sinking an instruction which can have multiple uses in a
single user. We were previously over-restrictive by looking for exactly one use,
rather than one user.

Also, the API for retrieving undroppable user has been updated accordingly since
in both usecases (Attributor and InstCombine), we seem to care about the user,
rather than the use.

Reviewed-By: nikic

Differential Revision: https://reviews.llvm.org/D109700
The file was modifiedllvm/include/llvm/IR/Value.h
The file was modifiedllvm/lib/IR/Value.cpp
The file was modifiedllvm/lib/Transforms/InstCombine/InstructionCombining.cpp
The file was modifiedllvm/test/Transforms/InstCombine/icmp-mul-zext.ll
The file was modifiedllvm/test/Transforms/InstCombine/sink_instruction.ll
The file was modifiedllvm/lib/Transforms/Utils/AssumeBundleBuilder.cpp
Commit 40acc0adad59ac39e9a7a02fcd93161298500c00 by dblaikie
Improve type printing of size-dependent const arrays to normalize array-of-const and const-array

Follow-on from 2bd84938470bf2e337801faafb8a67710f46429d based on
postcommit feedback from Richard Smith.

The VariableArray case I couldn't figure out how to test/provoke - you
can't write/form a variable array in any context other than a local
variable that I know of, and in that case `const int x[n]` is the
normalized form already (array-of-const) and you can't use typedefs
(since you can't typedef int[n] with variable 'n') to force the
const-array AST that would produce the undesirable type printing "int
const [n]".
The file was modifiedclang/test/AST/ast-dump-array.cpp
The file was modifiedclang/lib/AST/TypePrinter.cpp
Commit d249200fa7d540fb0b3ddc065575293e1da11107 by Saleem Abdulrasool
Revert "Re-Revert "clang-tidy: introduce readability-containter-data-pointer check""

This reverts commit 626586fc253c6f032aedb325dba6b1ff3f11875e.

Tweak the test for Windows.  Windows defaults to delayed template
parsing, which resulted in the main template definition not registering
the test on Windows.  Process the file with the additional
`-fno-delayed-template-parsing` flag to change the default beahviour.
Additionally, add an extra check for the fix it and use a more robust
test to ensure that the value is always evaluated.

Differential Revision: https://reviews.llvm.org/D108893
The file was addedclang-tools-extra/docs/clang-tidy/checks/readability-data-pointer.rst
The file was addedclang-tools-extra/clang-tidy/readability/ContainerDataPointerCheck.cpp
The file was modifiedclang-tools-extra/clang-tidy/readability/ReadabilityTidyModule.cpp
The file was addedclang-tools-extra/clang-tidy/readability/ContainerDataPointerCheck.h
The file was modifiedclang-tools-extra/docs/ReleaseNotes.rst
The file was modifiedclang-tools-extra/clang-tidy/readability/CMakeLists.txt
The file was addedclang-tools-extra/test/clang-tidy/checkers/readability-container-data-pointer.cpp
Commit ae2a5facce96dfe1efcb7111ee1ef0d91c956276 by hansang.bae
[OpenMP][libomptarget] Minor fix in x86_64 plugin

Call to remove() was passing invalid address for the file name.

Differential Revision: https://reviews.llvm.org/D109846
The file was modifiedopenmp/libomptarget/plugins/generic-elf-64bit/src/rtl.cpp
Commit 8264846c0ef847adeacca9b8fe0f867a8a378c5e by dblaikie
Senticify some comments - post-commit review for e4b9f5e851d1fe0ba93cbb11b2ed4558602c379e

Based on feedback from Paul Robinson.
The file was modifiedclang/lib/CodeGen/CGDebugInfo.cpp
Commit 3273430406c186f1f2af597adeedf21d4fa52b18 by anna
Re-add getSingleUndroppableUse API

The API was removed in 4ac4e52189aa in favor of
getUniqueUndroppableUser.
However, this caused a buildbot failure in AbstractCallSiteTest.cpp,
which uses the API and the AbstractCallSite class requires a "use"
rather than a user.
Retain the API so that the unittest compiles and passes.
The file was modifiedllvm/lib/IR/Value.cpp
The file was modifiedllvm/include/llvm/IR/Value.h
Commit 1ac2d195ecb5d4c549c11b9c1df00179f5fea7ed by rob.suderman
[mlir][linalg] Add canonicalizers for depthwise conv

There are two main versions of depthwise conv depending whether the multiplier
is 1 or not. In cases where m == 1 we should use the version without the
multiplier channel as it can perform greater optimization.

Add lowering for the quantized/float versions to have a multiplier of one.

Reviewed By: antiagainst

Differential Revision: https://reviews.llvm.org/D108959
The file was modifiedmlir/test/Dialect/Linalg/canonicalize.mlir
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
Commit f4382d4b0972ac31a2027610adfb9d4dc36caa2e by Dan Liew
[Compiler-RT] For arm64e test suites use the SDK version as the minimum deployment target.

Previously we used the minimum deployment target used for the platform
(e.g. iOS is 9.0). Unfortunately this leads to ABI incompatibilities with
arm64e devices running newer OSs. In particular the following TSan test
cases that used libcxx would fail due to the ABI mismatch.

* Darwin/libcxx-shared-ptr-recursive.mm
* Darwin/libcxx-shared-ptr-stress.mm
* Darwin/libcxx-shared-ptr.mm
* libcxx/std_shared_ptr.cpp

Given that arm64e is not ABI stable we should ideally match the
deployment target for sanitizer runtimes and their tests cases to the
device when building for arm64e. Unfortunately having a mixed deployment
target (based on architecture) isn't currently supported by the build system
and is non-trivial to implement.

As a stop-gap measure this patch changes the sanitizer test suites (but not the
sanitizer runtimes themselves) to use a newer deployment target when
targetting arm64e.

The deployment target used for arm64e is the SDK version because this
"should" match the OS version running on the target device (it is a
configuration error to not match them).

rdar://83080611
The file was modifiedcompiler-rt/cmake/config-ix.cmake
Commit cb8c30d35dc9eedca4b8073e96f06e9ce8f12192 by jpienaar
[DRR] Explicit Return Types in Rewrites

Adds a new rewrite directive returnType that can be added at the end of an op's
argument list to explicitly specify return types.

```
(OpX $v0, $v1, (returnType "$_builder.getI32Type()"))
```

Pass in a bound value to copy its return type, or pass a native code call to
dynamically create new types.

```
(OpX $v0, $v1, (returnType $v0, (NativeCodeCall<"..."> $v1)))
```

Reviewed By: jpienaar

Differential Revision: https://reviews.llvm.org/D109472
The file was modifiedmlir/tools/mlir-tblgen/RewriterGen.cpp
The file was modifiedmlir/test/mlir-tblgen/rewriter-indexing.td
The file was modifiedmlir/test/mlir-tblgen/pattern.mlir
The file was modifiedmlir/test/mlir-tblgen/rewriter-errors.td
The file was modifiedmlir/include/mlir/TableGen/Pattern.h
The file was modifiedmlir/test/lib/Dialect/Test/TestOps.td
The file was modifiedmlir/include/mlir/IR/OpBase.td
The file was modifiedmlir/lib/TableGen/Pattern.cpp