SuccessChanges

Summary

  1. Fix grammar in diagnostic for wrong arity in a structured binding. (details)
  2. [Support] On Windows, take the affinity mask into account (details)
  3. [PowerPC] Try to fold sqrt/sdiv test results with the branch. (details)
  4. Revert "[Support] On Windows, take the affinity mask into account" (details)
Commit cd4c55c97402246099ae865a66517a36af5c3a7c by richard
Fix grammar in diagnostic for wrong arity in a structured binding.
The file was modifiedclang/test/SemaCXX/cxx1z-decomposition.cpp
The file was modifiedclang/include/clang/Basic/DiagnosticSemaKinds.td
The file was modifiedclang/lib/Sema/SemaDeclCXX.cpp
Commit 336ab2d51dfdd5ca09c2a9c506453db4fe653584 by alexandre.ganea
[Support] On Windows, take the affinity mask into account

The number of hardware threads available to a ThreadPool can be limited if setting an affinity mask.
For example:

> start /B /AFFINITY 0xF lld-link.exe ...

Would let LLD only use 4 hyper-threads.

Previously, there was an outstanding issue on Windows Server 2019 on dual-CPU machines, which was preventing from using both CPU sockets. In normal conditions, when no affinity mask was set, ProcessorGroup::AllThreads was different from ProcessorGroup::UsableThreads. The previous code in llvm/lib/Support/Windows/Threading.inc L201 was improperly assuming those two values to be equal, and consequently was limiting the execution to only one CPU socket.

Differential Revision: https://reviews.llvm.org/D92419
The file was modifiedllvm/lib/Support/Windows/Threading.inc
The file was modifiedllvm/lib/Support/Program.cpp
The file was modifiedllvm/lib/Support/Unix/Program.inc
The file was modifiedllvm/unittests/Support/ThreadPool.cpp
The file was modifiedllvm/lib/Support/Windows/Program.inc
The file was modifiedllvm/include/llvm/Support/Program.h
Commit ff40fb07ad6309131c2448ca00572a078c7a2d59 by esme.yi
[PowerPC] Try to fold sqrt/sdiv test results with the branch.

Summary: The patch tries to fold sqrt/sdiv test node, i.g FTSQRT, XVTDIVDP, and the branch, i.e br_cc if they meet these patterns:
(br_cc seteq, (truncateToi1 SWTestOp), 0) -> (BCC PRED_NU, SWTestOp)
(br_cc seteq, (and SWTestOp, 2), 0) -> (BCC PRED_NE, SWTestOp)
(br_cc seteq, (and SWTestOp, 4), 0) -> (BCC PRED_LE, SWTestOp)
(br_cc seteq, (and SWTestOp, 8), 0) -> (BCC PRED_GE, SWTestOp)
(br_cc setne, (truncateToi1 SWTestOp), 0) -> (BCC PRED_UN, SWTestOp)
(br_cc setne, (and SWTestOp, 2), 0) -> (BCC PRED_EQ, SWTestOp)
(br_cc setne, (and SWTestOp, 4), 0) -> (BCC PRED_GT, SWTestOp)
(br_cc setne, (and SWTestOp, 8), 0) -> (BCC PRED_LT, SWTestOp)

Reviewed By: steven.zhang

Differential Revision: https://reviews.llvm.org/D94054
The file was addedllvm/test/CodeGen/PowerPC/fold_swtest_br.ll
The file was modifiedllvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
Commit eec856848ccc481b2704ebf64d725e635a3d7dca by alexandre.ganea
Revert "[Support] On Windows, take the affinity mask into account"

This reverts commit 336ab2d51dfdd5ca09c2a9c506453db4fe653584.
The file was modifiedllvm/lib/Support/Unix/Program.inc
The file was modifiedllvm/lib/Support/Windows/Threading.inc
The file was modifiedllvm/lib/Support/Windows/Program.inc
The file was modifiedllvm/unittests/Support/ThreadPool.cpp
The file was modifiedllvm/include/llvm/Support/Program.h
The file was modifiedllvm/lib/Support/Program.cpp