SuccessChanges

Summary

  1. [RISCV] Optimize select_cc after fp compare expansion (details)
  2. Re-land [Support] On Windows, take the affinity mask into account (details)
  3. [LTO] Test format fix (NFC) (details)
Commit b894a9fb237345db64d14ce3881d3195e124df0d by craig.topper
[RISCV] Optimize select_cc after fp compare expansion

Some FP compares expand to a sequence ending with (xor X, 1) to invert the result. If
the consumer is a select_cc we can likely get rid of this xor by fixing
up the select_cc condition.

This patch combines (select_cc (xor X, 1), 0, setne, trueV, falseV) -
(select_cc X, 0, seteq, trueV, falseV) if we can prove X is 0/1.

Reviewed By: lenary

Differential Revision: https://reviews.llvm.org/D94546
The file was modifiedllvm/test/CodeGen/RISCV/half-select-fcmp.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.cpp
The file was modifiedllvm/test/CodeGen/RISCV/float-select-fcmp.ll
The file was modifiedllvm/lib/Target/RISCV/RISCVISelLowering.h
The file was modifiedllvm/test/CodeGen/RISCV/double-select-fcmp.ll
Commit 4fcb25583c3ccbe10c4367d02086269e5fa0bb87 by alexandre.ganea
Re-land [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/unittests/Support/ThreadPool.cpp
The file was modifiedllvm/include/llvm/Support/Program.h
The file was modifiedllvm/lib/Support/Windows/Program.inc
The file was modifiedllvm/lib/Support/Unix/Program.inc
Commit 5b42fd8dd4e7e29125a09a41a33af7c9cb57d144 by tejohnson
[LTO] Test format fix (NFC)

As requested in D91583, use ';;' instead of ';' to preceed comments in
lld test. I did this in the equivalent gold test as well.
The file was modifiedllvm/test/tools/gold/X86/devirt_vcall_vis_public.ll
The file was modifiedlld/test/ELF/lto/devirt_vcall_vis_public.ll