Changes

Summary

  1. [Preprocessor] -E -P: Ensure newline after 8 skipped lines. (details)
  2. libcang: Add missing function to libclang.map (details)
  3. [libc][NFC] Add noreturn and constexpr qualifiers where appropriate (details)
  4. [test] Fix tools/gold/X86/comdat-nodeduplicate.ll on non-X86 hosts (details)
  5. Add `all_of_zip` to STLExtras (details)
  6. Implement recursive support into OperationEquivalence::isEquivalentTo() (details)
  7. [NFC][X86] add missing tests in clang/test/CodeGen/attr-target-mv.c (details)
  8. [libc++] Remove excess whitespace in synopsis comment. NFCI. (details)
  9. tsan: fix java_symbolization test (details)
  10. tsan: remove /**/ at the of multi-line macros (details)
  11. tsan: switch from SSE3 to SSE4.2 (details)
  12. [NFC][InstSimplify] Use more intuitive variable names. (details)
  13. [libcxx][doc] Update the build documentation. (details)
Commit c6b0b16c0f55c34f4eaa05184815bbbe97f4b750 by llvm-project
[Preprocessor] -E -P: Ensure newline after 8 skipped lines.

The implementation of -fminimize-whitespace (D104601) revised the logic
when to emit newlines. There was no case to handle when more than
8 lines were skippped in -P (DisableLineMarkers) mode and instead fell
through the case intended for -fminimize-whitespace, i.e. emit nothing.
This patch will emit one newline in this case.

The newline logic is slightly reorganized. The `-P -fminimize-whitespace`
case is handled explicitly and emitting at least one newline is the new
fallback case. The choice between emitting a line marker or up to
7 empty lines is now a choice only with enabled line markers. The up to
8 newlines likely are fewer characters than a line directive, but
in -P mode this had the paradoxic effect that it would print up to
7 empty lines, but none at all if more than 8 lines had to be skipped.
Now with DisableLineMarkers, we don't consider printing empty lines
(just start a new line) which matches gcc's behavior.

The line-directive-output-mincol.c test is replaced with a more
comprehensive test skip-empty-lines.c also testing the more than
8 skipped lines behaviour with all flag combinations.

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D106924
The file was modifiedclang/lib/Frontend/PrintPreprocessedOutput.cpp
The file was modifiedclang/test/Preprocessor/minimize-whitespace.c
The file was addedclang/test/Preprocessor/skip-empty-lines.c
The file was removedclang/test/Preprocessor/line-directive-output-mincol.c
Commit a4edb2b1ba0bda9042e87ca3f3e1b9f70598df9a by tstellar
libcang: Add missing function to libclang.map

This function is marked with CINDEX_LINKAGE, but was never added to the
export list / linker script.

Reviewed By: jrtc27

Differential Revision: https://reviews.llvm.org/D106974
The file was modifiedclang/tools/libclang/libclang.map
Commit 640ed21cceb28ddb3a9779fdfa11a4c4d97e29df by sivachandra
[libc][NFC] Add noreturn and constexpr qualifiers where appropriate

These functions make it clear to the compiler and user what the intended
behavior is so llvm can make them go as fast as possible.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D106807
The file was modifiedlibc/src/__support/integer_operations.h
The file was modifiedlibc/utils/HdrGen/Command.h
The file was modifiedlibc/src/ctype/ctype_utils.h
Commit 5060224d9eed8b8359ed5090bb7c577b8575e9e7 by nathan
[test] Fix tools/gold/X86/comdat-nodeduplicate.ll on non-X86 hosts

When running this test on an aarch64 machine, it fails:

```
/usr/bin/ld.gold: error: .../test/tools/gold/X86/Output/comdat-nodeduplicate.ll.tmp/ab.lto.o: incompatible target
```

Specify the elf_x86_64 emulation as all of the other gold plugin tests
do.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D107020
The file was modifiedllvm/test/tools/gold/X86/comdat-nodeduplicate.ll
Commit b70de61f48062c7810b474bc944394ecbd56a262 by joker.eph
Add `all_of_zip` to STLExtras

This takes two ranges and invokes a predicate on the element-wise pair in the
ranges. It returns true if all the pairs are matching the predicate and the ranges
have the same size.
It is useful with containers that aren't random iterator where we can't check the
sizes in O(1).

Differential Revision: https://reviews.llvm.org/D106605
The file was modifiedllvm/unittests/ADT/STLExtrasTest.cpp
The file was modifiedllvm/include/llvm/ADT/STLExtras.h
Commit 0be5d1a96c8973a4aa56b3fdd8fc22c8a95a7171 by joker.eph
Implement recursive support into OperationEquivalence::isEquivalentTo()

This allows to use OperationEquivalence to track structural comparison for equality
between two operations.

Differential Revision: https://reviews.llvm.org/D106422
The file was modifiedmlir/lib/IR/OperationSupport.cpp
The file was modifiedmlir/lib/Transforms/Utils/RegionUtils.cpp
The file was modifiedmlir/test/lib/IR/CMakeLists.txt
The file was addedmlir/test/lib/IR/TestOperationEquals.cpp
The file was modifiedmlir/tools/mlir-opt/mlir-opt.cpp
The file was modifiedmlir/include/mlir/IR/OperationSupport.h
The file was addedmlir/test/IR/operation-equality.mlir
The file was modifiedmlir/lib/Transforms/CSE.cpp
Commit 58712987e56fb598ac49da7fbe6e6a78c787637b by freddy.ye
[NFC][X86] add missing tests in clang/test/CodeGen/attr-target-mv.c

Reviewed By: pengfei

Differential Revision: https://reviews.llvm.org/D106849
The file was modifiedclang/test/CodeGen/attr-target-mv.c
Commit d4840175c95f6edcba21baae411589468d5bc68f by arthur.j.odwyer
[libc++] Remove excess whitespace in synopsis comment. NFCI.
The file was modifiedlibcxx/include/compare
Commit 262cb5f5b492b77336e6dea3f720eec9632cced4 by dvyukov
tsan: fix java_symbolization test

We reliably remove bottom libc-guts frames only on linux/glibc.
Some bots failed on this test showing other bottom frames:

.annobin_libc_start.c libc-start.c (libc.so.6+0x249f4)
generic_start_main.isra.0 libc-start.c (libc.so.6+0x45b0c)

We can't reliably remove all of possible bottom frames.
So remove the assertion for that.

Differential Revision: https://reviews.llvm.org/D107037
The file was modifiedcompiler-rt/test/tsan/java_symbolization.cpp
Commit a1a37ddc3f0e4d4002b0661e4870b1e949fd5d81 by dvyukov
tsan: remove /**/ at the of multi-line macros

Prefer code readability over writeability.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D106982
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interceptors.h
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interface_ann.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interface_atomic.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interface_java.cpp
The file was modifiedcompiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
Commit cd0143c0f2a37332a1f7e29caa122db74b92a344 by dvyukov
tsan: switch from SSE3 to SSE4.2

Switch x86_64 requirement for optimized code from SSE3 to SSE4.2.
The new tsan runtime will need few instructions that are only
supported by SSE4:

_mm_max_epu32
_mm_extract_epi8
_mm_insert_epi32

SSE3 was introcued in 2004 and SSE4 in 2006:
https://en.wikipedia.org/wiki/SSE3
https://en.wikipedia.org/wiki/SSE4

We are still providing non-optimized C++ version of the code,
so either way it's possible to build tsan runtime for any CPU.

But for Go this will bump strict requirement for -race because
Go contains prebuilt versions and these will be built with -msse4.2.
But requiring a CPU produced at least in 2006 looks reasonable for
a debugging tool (more reasonable than disabling optimizations
for everybody).

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D106948
The file was modifiedcompiler-rt/lib/tsan/go/build.bat
The file was modifiedcompiler-rt/lib/tsan/CMakeLists.txt
The file was modifiedcompiler-rt/lib/tsan/go/buildgo.sh
Commit e2fe26e77b02633207bdd36a14e2dcf210cc2fe7 by JunMa
[NFC][InstSimplify] Use more intuitive variable names.
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp
The file was modifiedllvm/test/Transforms/InstSimplify/fold-vscale.ll
Commit 92b758cf3d706b117d59490cd85d23b764cc749f by koraq
[libcxx][doc] Update the build documentation.

These are the hunks of
  D106770 [libc++][doc] Update the release notes
that are relevant for main.
The file was modifiedlibcxx/docs/BuildingLibcxx.rst