Changes

Summary

  1. Support: Add closing namespace comment in raw_ostream_test.cpp, NFC (details)
  2. Revert "[Polly] Implement user-directed loop distribution/fission." (details)
  3. [clang-format] NFC ensure Penality variable is passed back with Fixes (details)
  4. [clangd] Support `#pragma mark` in the outline (details)
  5. [CMake] Pass llvm-readelf to CMake external builds (details)
  6. [RISCV] Add more tests for (and (shl x, C2), C1) that can be improved by using a pair of shifts. NFC (details)
  7. [RISCV] Add another isel optimization for (and (shl x, c2), c1) (details)
  8. RegAllocGreedy: Remove an unhelpful auto, and don't use a reference (details)
  9. [OpenMP] Fix data-race in new device RTL (details)
  10. [lldb] Handle malformed qfThreadInfo reply (details)
  11. [profile][fuchsia] Don't include extra NUL in log messages (details)
  12. [AMDGPU] Propagate defining src reg for AGPR to AGPR Copys (details)
  13. [libc++][NFC] Refactor the std::reverse_view tests (details)
  14. [ORC] Fix file header. (details)
  15. Revert "[compiler-rt][profile] Add padding after binary IDs" (details)
  16. [CSSPGO] Do not pass -fpseudo-probe-for-profiling to the linker. (details)
  17. [RISCV] Limit transformAddImmMulImm to prevent an infinite loop. (details)
  18. [NFC] Refactor tests to improve readability. (details)
  19. Fix -fno-unwind-tables -fasynchronous-unwind-tables to emit unwind tables (details)
  20. [clang-format] Fix unittest failures with -Werror (details)
  21. [ORC] Shut down services in SimpleRemoteEPCServer. (details)
Commit c7b1279a38286194b2f781c821e6eeaa6dd010cf by Duncan P. N. Exon Smith
Support: Add closing namespace comment in raw_ostream_test.cpp, NFC

The closing namespace comment prevents clang-format from dropping a
blank line after the final test. Also add in a blank line (which
simplifies merging/rebasing/etc. WIP patches).
The file was modifiedllvm/unittests/Support/raw_ostream_test.cpp
Commit c7bcd72a38bcf99e03e4651ed5204d1a1f2bf695 by phosek
Revert "[Polly] Implement user-directed loop distribution/fission."

This reverts commit 52c30adc7dfe6334b71adf256d81f70e7b976143 which
breaks the build when NDEBUG is defined.
The file was modifiedpolly/lib/Transform/ScheduleOptimizer.cpp
The file was modifiedpolly/include/polly/ScheduleTreeTransform.h
The file was modifiedpolly/include/polly/ManualOptimizer.h
The file was removedpolly/test/ScheduleOptimizer/ManualOptimization/distribute_illegal_pragmaloc.ll
The file was modifiedpolly/lib/Transform/ScheduleTreeTransform.cpp
The file was modifiedpolly/include/polly/DependenceInfo.h
The file was modifiedpolly/lib/Transform/ManualOptimizer.cpp
The file was removedpolly/test/ScheduleOptimizer/ManualOptimization/distribute_illegal_looploc.ll
The file was modifiedpolly/lib/Analysis/DependenceInfo.cpp
The file was removedpolly/test/ScheduleOptimizer/ManualOptimization/distribute_heuristic.ll
Commit 5fcde57b73fbc068c51f55a80894a6ef208d4afd by mydeveloperday
[clang-format] NFC ensure Penality variable is passed back with Fixes

Fix set but not used warning
The file was modifiedclang/lib/Format/QualifierAlignmentFixer.cpp
Commit d75fb1ee794e94a011e88739df84c359c987a65b by davg
[clangd] Support `#pragma mark` in the outline

Xcode uses `#pragma mark -` to draw a divider in the outline view
and `#pragma mark Note` to add `Note` in the outline view. For more
information, see https://nshipster.com/pragma/.

Since the LSP spec doesn't contain dividers for the symbol outline,
instead we treat `#pragma mark -` as a group with children - the
decls that come after it, implicitly terminating when the symbol's
parent ends.

The following code:

```
@implementation MyClass

- (id)init {}

- (int)foo;
@end
```

Would give an outline like

```
MyClass
        > Overrides
                    > init
        > Public Accessors
                    > foo
```

Differential Revision: https://reviews.llvm.org/D105904
The file was modifiedclang-tools-extra/clangd/Preamble.cpp
The file was modifiedclang-tools-extra/clangd/ParsedAST.cpp
The file was modifiedclang/include/clang/Lex/PPCallbacks.h
The file was modifiedclang-tools-extra/clangd/CollectMacros.h
The file was modifiedclang-tools-extra/clangd/SourceCode.h
The file was modifiedclang-tools-extra/clangd/unittests/FindSymbolsTests.cpp
The file was modifiedclang-tools-extra/clangd/SourceCode.cpp
The file was modifiedclang-tools-extra/clangd/Preamble.h
The file was modifiedclang-tools-extra/clangd/unittests/ParsedASTTests.cpp
The file was modifiedclang-tools-extra/clangd/FindSymbols.cpp
The file was modifiedclang-tools-extra/clangd/ParsedAST.h
The file was modifiedclang-tools-extra/clangd/CollectMacros.cpp
Commit 093245ed9ee495146b3478447473ad21ae237cb1 by phosek
[CMake] Pass llvm-readelf to CMake external builds

This matches other LLVM binary tools.

Differential Revision: https://reviews.llvm.org/D110313
The file was modifiedllvm/cmake/modules/LLVMExternalProjectUtils.cmake
Commit 8811227a0c0ac398857988b4fce0fb4dc699468b by craig.topper
[RISCV] Add more tests for (and (shl x, C2), C1) that can be improved by using a pair of shifts. NFC

These tests have C1 as a shifted mask having no leading zeros and
C3 trailing zeros. If C3 is more than C2, we can select this as
(slli (srli x, C3-C2), C3).
The file was modifiedllvm/test/CodeGen/RISCV/shift-and.ll
Commit 70f50114f37e86bd4869a75b1a8313440bd55780 by craig.topper
[RISCV] Add another isel optimization for (and (shl x, c2), c1)

Turn (and (shl x, c2), c1) -> (slli (srli x, c3-c2), c3) if c1 is a
shifted mask with no leading zeros and c3 trailing zeros where c3
is greater than c2.
The file was modifiedllvm/test/CodeGen/RISCV/shift-and.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
Commit 2875d3d484bb82dcd7f44bccafda8a52aacc328d by arsenm2
RegAllocGreedy: Remove an unhelpful auto, and don't use a reference
The file was modifiedllvm/lib/CodeGen/RegAllocGreedy.cpp
Commit d83ca624a1d52b600ddbd8bfcbb3d5d7c6003af7 by jhuber6
[OpenMP] Fix data-race in new device RTL

This patch fixes a data-race observed when using the new device runtime
library. The Internal control variable for the parallel level is read in
the `__kmpc_parallel_51` function while it could potentially be written
by other threads. This causes data corruption and will cause
nondetermistic behaviour in the runtime. This patch fixes this by adding
an explicit synchronization before the region starts.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D110366
The file was modifiedopenmp/libomptarget/DeviceRTL/src/Parallelism.cpp
Commit 953ddded1aa2b459a939e0f1649691c9086ba416 by tedwood
[lldb] Handle malformed qfThreadInfo reply

If the remote gdbserver's qfThreadInfo reply has a trailing comma,
GDBRemoteCommunicationClient::GetCurrentProcessAndThreadIDs will return
an empty vector of thread ids. This will cause lldb to recurse through
three functions trying to get the list of threads, until it blows its
stack and crashes.

A trailing comma is a malformed response, but it shouldn't cause lldb to
crash. This patch will return the tids received before the malformed
response.

Reviewed By: clayborg, labath

Differential Revision: https://reviews.llvm.org/D109937
The file was addedlldb/test/API/functionalities/gdb_remote_client/TestThreadInfoTrailingComma.py
The file was modifiedlldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
Commit 80b92db02c5aec4e92b2df1492e8268a3239de26 by mcgrathr
[profile][fuchsia] Don't include extra NUL in log messages

Reviewed By: phosek

Differential Revision: https://reviews.llvm.org/D110361
The file was modifiedcompiler-rt/lib/profile/InstrProfilingPlatformFuchsia.c
Commit 1443ba6163d66743ff9f9d28b0505fca159b824c by Vang.Thao
[AMDGPU] Propagate defining src reg for AGPR to AGPR Copys

On targets that do not support AGPR to AGPR copying directly, try to find the
defining accvgpr_write and propagate its source vgpr register to the copies
before register allocation so the source vgpr register does not get clobbered.

The postrapseudos pass also attempt to propagate the defining accvgpr_write but
if the register to propagate is clobbered, it will give up and create new
temporary vgpr registers instead.

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D108830
The file was modifiedllvm/test/CodeGen/AMDGPU/llvm.amdgcn.mfma.ll
The file was modifiedllvm/lib/Target/AMDGPU/GCNPreRAOptimizations.cpp
The file was addedllvm/test/CodeGen/AMDGPU/agpr-to-agpr-copy.mir
Commit a6406ce18cb6d42265ce854f133545e049dc0d05 by Louis Dionne
[libc++][NFC] Refactor the std::reverse_view tests

Mostly, remove the global assumption that all ranges have size 8.
I should have called this out during the initial review.
The file was removedlibcxx/test/std/ranges/range.adaptors/range.reverse/ctad.compile.pass.cpp
The file was modifiedlibcxx/test/std/ranges/range.adaptors/range.reverse/size.pass.cpp
The file was modifiedlibcxx/test/std/ranges/range.adaptors/range.reverse/types.h
The file was modifiedlibcxx/test/std/ranges/range.adaptors/range.reverse/ctor.default.pass.cpp
The file was modifiedlibcxx/test/std/ranges/range.adaptors/range.reverse/end.pass.cpp
The file was modifiedlibcxx/test/std/ranges/range.adaptors/range.reverse/base.pass.cpp
The file was modifiedlibcxx/test/std/ranges/range.adaptors/range.reverse/begin.pass.cpp
The file was addedlibcxx/test/std/ranges/range.adaptors/range.reverse/ctad.pass.cpp
The file was modifiedlibcxx/test/std/ranges/range.adaptors/range.reverse/ctor.view.pass.cpp
Commit 2ce73f13c98ad3bfb904ac991f5810ddff9e77e7 by Lang Hames
[ORC] Fix file header.
The file was modifiedllvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleExecutorMemoryManager.cpp
Commit eb115aa6c841c4a7fcd1e1ce4423955135c2ae51 by leonardchan
Revert "[compiler-rt][profile] Add padding after binary IDs"

This reverts commit 6bc9c8dfe32cc4662f2ed9041af527f69dfff13b.

Reverted because this broke some PPC buildbots.
The file was modifiedcompiler-rt/lib/profile/InstrProfilingPlatformLinux.c
Commit e9d1a679a1c9cb309aea8c5d944e55865d38b867 by hoy
[CSSPGO] Do not pass -fpseudo-probe-for-profiling to the linker.

The correponding linker switch has been removed by https://reviews.llvm.org/D110209, so do not pass it in clang.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D110371
The file was modifiedclang/lib/Driver/ToolChains/CommonArgs.cpp
The file was removedclang/test/Driver/pseudo-probe-lto.c
Commit 40b230f6856d41f1b8dae7ac2d8e5e5e8de1ca77 by craig.topper
[RISCV] Limit transformAddImmMulImm to prevent an infinite loop.

This fixes an issue reported in D108607.
The file was modifiedllvm/test/CodeGen/RISCV/addimm-mulimm.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
Commit 4f28a2eb037defa6a8d85a69e1ff56fe85c0a27b by daniil.fukalov
[NFC] Refactor tests to improve readability.
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/reduce-or.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/bit-ops.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/reduce-and.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/fabs.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/mul.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/fneg.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/fsub.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/shufflevector.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/control-flow.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/fadd.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/logicalop.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/insertelement.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/addrspacecast.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/fused_costs.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/add-sub.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/fma.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/fmul.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/fdiv.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/shifts.ll
The file was modifiedllvm/test/Analysis/CostModel/AMDGPU/extractelement.ll
Commit 7647a8413be55568a8a80fae379a872b7359f5b5 by i
Fix -fno-unwind-tables -fasynchronous-unwind-tables to emit unwind tables

This matches GCC.

Change the CC1 option to encode the unwind table level (1: needed by exceptions,
2: asynchronous) so that we can support two modes in the future.
The file was modifiedclang/test/Driver/fuchsia.c
The file was modifiedclang/test/CodeGen/asan-globals.cpp
The file was modifiedclang/test/CodeGenCXX/thunks-ehspec.cpp
The file was modifiedclang/test/CodeGenCXX/thunks.cpp
The file was modifiedclang/test/Driver/aarch64-features.c
The file was modifiedclang/test/Driver/clang-translation.c
The file was modifiedclang/test/Driver/win-macho-unwind.c
The file was modifiedclang/include/clang/Basic/CodeGenOptions.def
The file was modifiedclang/test/Driver/freebsd.c
The file was modifiedclang/test/Driver/ppc-features.cpp
The file was modifiedclang/include/clang/Driver/Options.td
The file was modifiedclang/test/CodeGenCXX/linetable-eh.cpp
The file was modifiedclang/test/Driver/sanitize_unwind_tables.c
The file was modifiedclang/test/Driver/windows-exceptions.cpp
The file was modifiedclang/lib/Driver/ToolChains/Clang.cpp
The file was modifiedclang/test/Preprocessor/unwind-tables.c
The file was modifiedclang/test/CodeGenCXX/exceptions-seh-filter-uwtable.cpp
Commit 76d845cb169f048cb6f2176c3e7a6534dc5af097 by nemanja.i.ibm
[clang-format] Fix unittest failures with -Werror

Commit a44ab1702539 added a unit test that fails to build with
-Werror which causes build bot breaks on bots that include that
option in their build. This patch just adds the necessary casts to
silence the warnings.
The file was modifiedclang/unittests/Format/QualifierFixerTest.cpp
Commit c965fde7c234abbb311ab9f58e8684970a69c916 by Lang Hames
[ORC] Shut down services in SimpleRemoteEPCServer.

This should have been included with ExecutorBootstrapService in 78b083dbb72,
but was accidentally left out. It give services a chance to release any
resources that they have acquired.
The file was modifiedllvm/lib/ExecutionEngine/Orc/TargetProcess/SimpleRemoteEPCServer.cpp