SuccessChanges

Summary

  1. [NFCI][SimpleLoopUnswitch] Adjust CostKind query (details)
  2. [SVE] Fix bug in SVEIntrinsicOpts::optimizePTest (details)
  3. [AMDGPU] Enable .rodata for amdpal os (details)
  4. [lldb] Fix a crash when tab-completion an empty line in a function with only one local variable (details)
  5. [SyntaxTree] Split `TreeTestBase` into header and source (details)
  6. [gn build] Port 2e4a20fd706 (details)
  7. [CGAtomic] Mark atomic libcall functions `nounwind` (details)
  8. Fix BufferPlacement Pass to derive from the TableGen generated parent class (NFC) (details)
  9. Remove spurious empty line at the beginning of source file (NFC) (details)
  10. [NFC][StackSafety] Dedup callees (details)
  11. [clangd] Warn developers when trying to link system-installed gRPC statically (details)
  12. [OpenMP] Fix releasing of stack memory (details)
  13. [clangd] Fix find_program() result check when searching for gRPC (details)
  14. [clangd] Clarify comments regarding gRPC linking (details)
  15. [lldb/Utility] Simplify Scalar::PromoteToMaxType (details)
  16. [MLIR][Shape] Add custom assembly format for `shape.any` (details)
  17. [NFC][ARM] Port MaybeCall into ARMTTImpl method (details)
Commit 725400f9933fe58273d4500d8d6a77a438c43798 by sam.parker
[NFCI][SimpleLoopUnswitch] Adjust CostKind query

When getUserCost was transitioned to use an explicit CostKind,
TCK_CodeSize was used even though the original kind was implicitly
SizeAndLatency so restore this behaviour. We now only query for
CodeSize when optimising for minsize.

I expect this to not change anything as, I think all, targets will
currently return the same value for CodeSize and SizeLatency. Indeed
I see no changes in the test suite for Arm, AArch64 and X86.

Differential Revision: https://reviews.llvm.org/D85829
The file was addedllvm/test/Transforms/SimpleLoopUnswitch/ARM/nontrivial-unswitch-cost.ll
The file was addedllvm/test/Transforms/SimpleLoopUnswitch/ARM/lit.local.cfg
The file was modifiedllvm/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
Commit 6c7957c9901714b7ad0a8d2743a8c431b57fd0c9 by david.sherwood
[SVE] Fix bug in SVEIntrinsicOpts::optimizePTest

The code wasn't taking into account that the two operands
passed to ptest could be identical and was trying to erase
them twice.

Differential Revision: https://reviews.llvm.org/D85892
The file was modifiedllvm/lib/Target/AArch64/SVEIntrinsicOpts.cpp
The file was modifiedllvm/test/CodeGen/AArch64/sve-intrinsic-opts-ptest.ll
Commit 9aa0ff77bdc762b70123192d7f0bd3e95bc83788 by sebastian.neubauer
[AMDGPU] Enable .rodata for amdpal os

PAL recently got support for multiple ELF sections and relocations,
therefore we can now use .rodata sections instead of forcing constants
into .text.

Differential Revision: https://reviews.llvm.org/D85895
The file was modifiedllvm/test/CodeGen/AMDGPU/GlobalISel/global-value.ll
The file was modifiedllvm/test/CodeGen/AMDGPU/global-constant.ll
The file was modifiedllvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
Commit bbe3c479a6adf0abfe5d111e9ba206daa5a1eb2b by Raphael Isemann
[lldb] Fix a crash when tab-completion an empty line in a function with only one local variable

When LLDB sees only one possible completion for an input, it will add a trailing
space to the completion to signal that to the user. If the current argument is
quoted, that also means LLDB needs to add the trailing quote to finish the
current argument first.

In case the user is in a function with only one local variable and is currently
editing an empty line in the multiline expression editor, then we are in the
unique situation where we can have a unique completion for an empty input line.
(In a normal LLDB session this would never occur as empty input would just list
all the possible commands).

In this special situation our check if the current argument needs to receive a
trailing quote will crash LLDB as there is no current argument and the
completion code just unconditionally tries to access the current argument. This
just adds the missing check if we even have a current argument before we check
if we need to add a terminating quote character.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D85903
The file was modifiedlldb/test/API/commands/expression/multiline-completion/main.c
The file was modifiedlldb/source/Host/common/Editline.cpp
The file was modifiedlldb/test/API/commands/expression/multiline-completion/TestMultilineCompletion.py
Commit 2e4a20fd7062f65c06b438953de3d340df00b7a7 by ecaldas
[SyntaxTree] Split `TreeTestBase` into header and source

* Switch to using directive on source files.
* Remove unused `SyntaxTreeTest::addFile`

Differential Revision: https://reviews.llvm.org/D85913
The file was modifiedclang/unittests/Tooling/Syntax/BuildTreeTest.cpp
The file was modifiedclang/unittests/Tooling/Syntax/CMakeLists.txt
The file was modifiedclang/unittests/Tooling/Syntax/MutationsTest.cpp
The file was addedclang/unittests/Tooling/Syntax/TreeTestBase.cpp
The file was modifiedclang/unittests/Tooling/Syntax/TreeTestBase.h
Commit d795f968d92ddc517d2f56725bc12fd096ac5537 by llvmgnsyncbot
[gn build] Port 2e4a20fd706
The file was modifiedllvm/utils/gn/secondary/clang/unittests/Tooling/Syntax/BUILD.gn
Commit 909a851dbffeb3637c19268e12e10fdf3dae2add by guiand
[CGAtomic] Mark atomic libcall functions `nounwind`

These functions won't ever unwind. This is useful for MemorySanitizer
as it simplifies handling __atomic_load in particular.

Differential Revision: https://reviews.llvm.org/D85573
The file was modifiedclang/lib/CodeGen/CGAtomic.cpp
The file was modifiedclang/test/CodeGen/atomic_ops.c
Commit 5035d192faf3389bad0acf69ae69ed6b5cfe930c by joker.eph
Fix BufferPlacement Pass to derive from the TableGen generated parent class (NFC)
The file was modifiedmlir/include/mlir/Transforms/Passes.td
The file was modifiedmlir/lib/Transforms/BufferPlacement.cpp
Commit 1e484b8a2467b90dae99f952bbeeec8972a71edd by joker.eph
Remove spurious empty line at the beginning of source file (NFC)
The file was modifiedmlir/lib/Transforms/BufferPlacement.cpp
Commit 798eb71c3a5a43f592b006e1b41620c54cacb721 by Vitaly Buka
[NFC][StackSafety] Dedup callees
The file was modifiedllvm/test/Analysis/StackSafetyAnalysis/ipa.ll
The file was modifiedllvm/lib/Analysis/StackSafetyAnalysis.cpp
The file was modifiedllvm/test/Bitcode/thinlto-function-summary-paramaccess.ll
Commit 1786908f8cefe4c5f114543d73a8de23c130e94e by kbobyrev
[clangd] Warn developers when trying to link system-installed gRPC statically

Reviewed By: sammccall

Differential Revision: https://reviews.llvm.org/D85815
The file was modifiedllvm/cmake/modules/FindGRPC.cmake
Commit 66a3575c2895f3b06056908bb40699f16e4b92d7 by protze
[OpenMP] Fix releasing of stack memory

Starting with 787eb0c637b I got spurious segmentation faults for some testcases. I could nail it down to `brel` trying to release the "memory" of the node allocated on the stack of __kmpc_omp_wait_deps. With this patch, you will see the assertion triggering for some of the tests in the test suite.

My proposed solution for the issue is to just patch __kmpc_omp_wait_deps:
```
  __kmp_init_node(&node);
-  node.dn.on_stack = 1;
+  // the stack owns the node
+  __kmp_node_ref(&node);
```

What do you think?

Reviewed By: AndreyChurbanov

Differential Revision: https://reviews.llvm.org/D84472
The file was modifiedopenmp/runtime/src/kmp_taskdeps.cpp
Commit 399e4593431cf146c52fc286670f88d6217db631 by platonov.aleksandr
[clangd] Fix find_program() result check when searching for gRPC

`find_program(<VAR> ...)` sets <VAR> to <VAR>-NOTFOUND if nothing was found.
So we need to compare <VAR> with "<VAR>-NOTFOUND" or just use `if([NOT] <VAR>)`, because `if(<VAR>)` is false if `<VAR>` ends in the suffix -NOTFOUND.

Reviewed By: kbobyrev

Differential Revision: https://reviews.llvm.org/D85958
The file was modifiedllvm/cmake/modules/FindGRPC.cmake
Commit 9698deb2570231aee95e183a23c67e49da176c0b by kbobyrev
[clangd] Clarify comments regarding gRPC linking
The file was modifiedllvm/cmake/modules/FindGRPC.cmake
Commit 40d774265b08fbfd0f3e2ffa79ce7feddbd060bc by pavel
[lldb/Utility] Simplify Scalar::PromoteToMaxType

The function had very complicated signature, because it was trying to
avoid making unnecessary copies of the Scalar object. However, this
class is not hot enough to worry about these kinds of optimizations. My
making copies unconditionally, we can simplify the function and all of
its call sites.

Differential Revision: https://reviews.llvm.org/D85906
The file was modifiedlldb/source/Utility/Scalar.cpp
The file was modifiedlldb/include/lldb/Utility/Scalar.h
Commit a9a6f0fe1d65346ad86021af727058a31594a6b8 by frgossen
[MLIR][Shape] Add custom assembly format for `shape.any`

Add custom assembly format for `shape.any` with variadic operands.

Differential Revision: https://reviews.llvm.org/D85306
The file was modifiedmlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
The file was modifiedmlir/test/Dialect/Shape/canonicalize.mlir
The file was modifiedmlir/test/Dialect/Shape/ops.mlir
Commit eb82d58f83b24c0c23fa8dc79924dfdfe2d269e2 by sam.parker
[NFC][ARM] Port MaybeCall into ARMTTImpl method

Renamed to maybeLoweredToCall.
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.h
The file was modifiedllvm/lib/Target/ARM/ARMTargetTransformInfo.cpp