Changes

Summary

  1. [hwasan] Use stack safety analysis. (details)
  2. [VE] Set getExtendForAtomicOps to ISD::ANY_EXTEND (details)
  3. [ORC-RT] Fix missing std::move. (details)
  4. [ORC] Drop 'const' for __orc_rt_CWrapperFunctionResultDataUnion::ValuePtr. (details)
  5. tsan: make obtaining current PC faster (details)
  6. Revert "[hwasan] Use stack safety analysis." (details)
  7. [LV] Add test with ptr induction used as scalar and vector. (details)
  8. [mlir][memref] Clarify the documentation for memref.clone [NFC] (details)
  9. [LV] Re-generate check lines of some fragile tests (NFC) (details)
  10. [LoopUtils] Fix incorrect RT check bounds of loop-invariant mem accesses (details)
  11. [SLP]Fix possible crash on unreachable incoming values sorting. (details)
  12. [CostModel][X86] Add fast math tests for float reductions (details)
  13. [ORC-RT] Separate jit-dispach tag decls from definitions. (details)
  14. [ORC-RT] Introduce a weak-import macro. (details)
  15. [mlir] Introduce `linalg.tiled_yield` terminator for `linalg.tiled_loop`. (details)
  16. [rt][nfc] Rewrite #ifndef as #if defined(). (details)
  17. [clang-tidy] ensure run-clang-tidy reports children killed by signals (details)
  18. Revert "[mlir] Introduce `linalg.tiled_yield` terminator for `linalg.tiled_loop`." (details)
  19. [clang] Change set type used for SourceLocation. (details)
  20. [AMDGPU] Fix typo in comments idexen -> idxen (details)
  21. Fix duplicate checks in clangd comments (details)
  22. [MLIR] AffineStructures: resolve clang-tidy warnings [NFC] (details)
Commit 12268fe14a1a65d4b62f0b6e5beab46ba8501ae7 by fmayer
[hwasan] Use stack safety analysis.

This avoids unnecessary instrumentation.

Reviewed By: eugenis, vitalybuka

Differential Revision: https://reviews.llvm.org/D105703
The file was addedclang/test/CodeGen/hwasan-stack-safety-analysis.c
The file was addedllvm/test/Instrumentation/HWAddressSanitizer/stack-safety-analysis.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
The file was addedclang/test/CodeGen/hwasan-stack-safety-analysis-asm.c
The file was modifiedllvm/include/llvm/Transforms/Instrumentation/HWAddressSanitizer.h
Commit 4ee28b4fecade32e679dd96c8bd98b71085a8b14 by marukawa
[VE] Set getExtendForAtomicOps to ISD::ANY_EXTEND

The implementation of subword atomics does not actually
guarantee the result is zero-extended, which now caused
failures after https://reviews.llvm.org/D101342 was landed.

Reviewed By: simoll

Differential Revision: https://reviews.llvm.org/D106225
The file was modifiedllvm/lib/Target/VE/VEISelLowering.h
Commit ad4f04773c3c364e87321f7e2957eaf9779063f2 by Lang Hames
[ORC-RT] Fix missing std::move.

This should fix the 'could-not-covert' error at wrapper_function_utils.h:128 in
https://lab.llvm.org/buildbot/#/builders/112/builds/7748.
The file was modifiedcompiler-rt/lib/orc/wrapper_function_utils.h
Commit 94e0975450daa57060248c2231ea8bf902b3e86a by Lang Hames
[ORC] Drop 'const' for __orc_rt_CWrapperFunctionResultDataUnion::ValuePtr.

This member is now only used when storage is heap-allocated so it does not
need to be const. Dropping 'const' eliminates cast warnings on many builders.
The file was modifiedcompiler-rt/lib/orc/c_api.h
Commit baa7f58973d47e99c663860e4c2c3d55505f2bc7 by dvyukov
tsan: make obtaining current PC faster

We obtain the current PC is all interceptors and collectively
common interceptor code contributes to overall slowdown
(in particular cheaper str/mem* functions).

The current way to obtain the current PC involves:

  4493e1:       e8 3a f3 fe ff          callq  438720 <_ZN11__sanitizer10StackTrace12GetCurrentPcEv>
  4493e9:       48 89 c6                mov    %rax,%rsi

and the called function is:

uptr StackTrace::GetCurrentPc() {
  438720:       48 8b 04 24             mov    (%rsp),%rax
  438724:       c3                      retq

The new way uses address of a local label and involves just:

  44a888:       48 8d 35 fa ff ff ff    lea    -0x6(%rip),%rsi

I am not switching all uses of StackTrace::GetCurrentPc to GET_CURRENT_PC
because it may lead some differences in produced reports and break tests.
The difference comes from the fact that currently we have PC pointing
to the CALL instruction, but the new way does not yield any code on its own
so the PC points to a random instruction in the function and symbolizing
that instruction can produce additional inlined frames (if the random
instruction happen to relate to some inlined function).

Reviewed By: vitalybuka, melver

Differential Revision: https://reviews.llvm.org/D106046
The file was modifiedcompiler-rt/lib/sanitizer_common/tests/sanitizer_stacktrace_test.cpp
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interceptors.h
Commit 807d50100c3c6cd5e6ec89d6ac1afddd0c3f7133 by fmayer
Revert "[hwasan] Use stack safety analysis."

This reverts commit 12268fe14a1a65d4b62f0b6e5beab46ba8501ae7.
The file was removedclang/test/CodeGen/hwasan-stack-safety-analysis-asm.c
The file was modifiedllvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
The file was removedclang/test/CodeGen/hwasan-stack-safety-analysis.c
The file was modifiedllvm/include/llvm/Transforms/Instrumentation/HWAddressSanitizer.h
The file was modifiedclang/lib/CodeGen/BackendUtil.cpp
The file was removedllvm/test/Instrumentation/HWAddressSanitizer/stack-safety-analysis.ll
Commit 156b431c6658b8a6d8fa6b10f111fab1262fd65b by flo
[LV] Add test with ptr induction used as scalar and vector.

Test case inspired by D105199.
The file was modifiedllvm/test/Transforms/LoopVectorize/pointer-induction.ll
Commit eda46404cd79f2b8893fb1fb111be074d834ba42 by herhut
[mlir][memref] Clarify the documentation for memref.clone [NFC]

The wording was wrong and suggested that operands to memref.clone may not be mutated.

Differential Revision: https://reviews.llvm.org/D106258
The file was modifiedmlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
Commit f3814ed3e9426d84e7de6054af47187538117fd4 by guopeilin1
[LV] Re-generate check lines of some fragile tests (NFC)

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D105438
The file was modifiedllvm/test/Transforms/LoopVectorize/invariant-store-vectorization.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/pr50686.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/invariant-load-gather.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/invariant-store-vectorization.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/multiple-strides-vectorization.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/skeleton-lcssa-crash.ll
The file was addedllvm/test/Transforms/LoopVectorize/invariant-store-vectorization-2.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/pr47343-expander-lcssa-after-cfg-update.ll
Commit e908e063d1f953984fff14636b1c1ad96de8d500 by guopeilin1
[LoopUtils] Fix incorrect RT check bounds of loop-invariant mem accesses

This fixes the lower and upper bound calculation of a
RuntimeCheckingPtrGroup when it has more than one loop
invariant pointers. Resolves PR50686.

Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D104148
The file was modifiedllvm/lib/Transforms/Utils/LoopUtils.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/invariant-store-vectorization.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/pr47343-expander-lcssa-after-cfg-update.ll
The file was modifiedllvm/lib/Analysis/LoopAccessAnalysis.cpp
The file was modifiedllvm/test/Transforms/LoopVectorize/multiple-strides-vectorization.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/skeleton-lcssa-crash.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/pr50686.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/invariant-store-vectorization-2.ll
The file was modifiedllvm/test/Transforms/LoopVersioning/add-phi-update-users.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/uniform_mem_op.ll
The file was modifiedllvm/test/Transforms/LoopVersioningLICM/loopversioningLICM2.ll
The file was modifiedllvm/test/Transforms/LoopVectorize/X86/invariant-load-gather.ll
The file was modifiedllvm/test/Transforms/LoopVersioningLICM/loopversioningLICM1.ll
Commit d8d8b4574ab40e319d4a32a9c37eae771c43b8f0 by a.bataev
[SLP]Fix possible crash on unreachable incoming values sorting.

The incoming values for PHI nodes may come from unreachable BasicBlocks,
need to handle this case.

Differential Revision: https://reviews.llvm.org/D106264
The file was modifiedllvm/test/Transforms/SLPVectorizer/X86/unreachable.ll
The file was modifiedllvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
Commit 5939c642aeedc788e28aea412950c3bc362bd91c by llvm-dev
[CostModel][X86] Add fast math tests for float reductions

As noticed on D105432 we didn't have any coverage to distinguish between fast/exact float reductions
The file was modifiedllvm/test/Analysis/CostModel/X86/reduce-fmul.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/reduce-fadd.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/reduce-fmin.ll
The file was modifiedllvm/test/Analysis/CostModel/X86/reduce-fmax.ll
Commit 11c11006d70b0d1cf182a4b0cfa665c74cba2e30 by Lang Hames
[ORC-RT] Separate jit-dispach tag decls from definitions.

This should eliminate the "initialized and declared 'extern'" warnings produced
on some bots, e.g. https://lab.llvm.org/buildbot/#/builders/165/builds/3770
The file was modifiedcompiler-rt/lib/orc/macho_platform.cpp
Commit aa69f0d8fbbcdf6b902694c200caaa90c493a0a7 by Lang Hames
[ORC-RT] Introduce a weak-import macro.

This should eliminate warnings about ignored weak_import attributes on some of
the bots, e.g. https://lab.llvm.org/buildbot/#/builders/165/builds/3770/.
The file was modifiedcompiler-rt/lib/orc/common.h
The file was modifiedcompiler-rt/lib/orc/compiler.h
Commit 3b03d9b874aa902f7f969e7ffdefde23c2758eeb by pifon
[mlir] Introduce `linalg.tiled_yield` terminator for `linalg.tiled_loop`.

https://llvm.discourse.group/t/rfc-changes-to-linalg-tiledloopop-to-unblock-reductions/3890

Differential Revision: https://reviews.llvm.org/D106066
The file was modifiedmlir/test/Dialect/Linalg/tile-tensors.mlir
The file was modifiedmlir/test/Dialect/Linalg/invalid.mlir
The file was modifiedmlir/test/Dialect/Linalg/comprehensive-module-bufferize.mlir
The file was modifiedmlir/test/Dialect/Linalg/fusion-tensor-pattern.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/test/Dialect/Linalg/distribute-tiled-loop.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Utils/Utils.cpp
The file was modifiedmlir/test/Dialect/Linalg/tiled-loops.mlir
The file was modifiedmlir/test/Dialect/Linalg/comprehensive-module-bufferize-analysis.mlir
The file was modifiedmlir/test/Dialect/Linalg/canonicalize.mlir
The file was modifiedmlir/test/Dialect/Linalg/roundtrip.mlir
Commit f58a1f65e74686b7a59ae2fa849ce4c70d520e89 by pifon
[rt][nfc] Rewrite #ifndef as #if defined().
The file was modifiedcompiler-rt/lib/gwp_asan/tests/backtrace.cpp
Commit f6ba03584b3ce5dab45d8c1fe84e89d4d668574d by sylvestre
[clang-tidy] ensure run-clang-tidy reports children killed by signals

If a clang-tidy child process exits with a signal then run-clang-tidy will exit
with an error but there is no hint why in the output, since the clang-tidy
doesn't log anything and may not even have had the opportunity to do so
depending on the signal used.

`subprocess.CompletedProcess.returncode` is the negative signal number in this
case.

I hit this in a CI system where the parallelism used exceeded the RAM assigned
to the container causing the OOM killer to SIGKILL clang-tidy processes.

Reviewed By: sylvestre.ledru

Differential Revision: https://reviews.llvm.org/D99081
The file was modifiedclang-tools-extra/clang-tidy/tool/run-clang-tidy.py
Commit 58ddeba3e0de504039add9b5a10a4546de25c7a9 by pifon
Revert "[mlir] Introduce `linalg.tiled_yield` terminator for `linalg.tiled_loop`."

This reverts commit 3b03d9b874aa902f7f969e7ffdefde23c2758eeb.
The file was modifiedmlir/test/Dialect/Linalg/roundtrip.mlir
The file was modifiedmlir/test/Dialect/Linalg/distribute-tiled-loop.mlir
The file was modifiedmlir/test/Dialect/Linalg/fusion-tensor-pattern.mlir
The file was modifiedmlir/lib/Dialect/Linalg/IR/LinalgOps.cpp
The file was modifiedmlir/test/Dialect/Linalg/canonicalize.mlir
The file was modifiedmlir/test/Dialect/Linalg/comprehensive-module-bufferize-analysis.mlir
The file was modifiedmlir/test/Dialect/Linalg/invalid.mlir
The file was modifiedmlir/test/Dialect/Linalg/tiled-loops.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Utils/Utils.cpp
The file was modifiedmlir/test/Dialect/Linalg/comprehensive-module-bufferize.mlir
The file was modifiedmlir/include/mlir/Dialect/Linalg/IR/LinalgOps.td
The file was modifiedmlir/test/Dialect/Linalg/tile-tensors.mlir
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/Tiling.cpp
The file was modifiedmlir/lib/Dialect/Linalg/Transforms/ComprehensiveBufferize.cpp
Commit cef56d58dbbb3bc993531c14af5e3edd2841029d by simon.tatham
[clang] Change set type used for SourceLocation.

This is part of a patch series working towards the ability to make
SourceLocation into a 64-bit type to handle larger translation units.

If clang is built for a 32-bit platform and SourceLocation is 64 bits
wide, then a SourceLocation will be larger than a pointer, so it won't
be possible to keep them in a SmallPtrSet any more. Switch to
SmallDenseSet instead.

Patch originally by Mikhail Maltsev.

Differential Revision: https://reviews.llvm.org/D105493
The file was modifiedclang/include/clang/Basic/SourceLocation.h
The file was modifiedclang/include/clang/Lex/Preprocessor.h
Commit 96d8f2a1e0842b83b319a8daf3cc82dd5e1350fa by jay.foad
[AMDGPU] Fix typo in comments idexen -> idxen
The file was modifiedllvm/lib/Target/AMDGPU/SIISelLowering.cpp
Commit 195786d7c2609f71e81156a09d3a20c98f7ba163 by kadircet
Fix duplicate checks in clangd comments

This patch removes a duplicate checks in the top-level comments in `clang-tools-extra/clangd/ParsedAST.h`

Reviewed By: kadircet

Differential Revision: https://reviews.llvm.org/D106227
The file was modifiedclang-tools-extra/clangd/ParsedAST.h
Commit eacbd7d25ae08465bcef4fb6d3b86c7dddb2d64f by arjunpitchanathan
[MLIR] AffineStructures: resolve clang-tidy warnings [NFC]
The file was modifiedmlir/lib/Analysis/AffineStructures.cpp
The file was modifiedmlir/include/mlir/Analysis/AffineStructures.h