Changes

Summary

  1. [libc][NFC] Disable thrd_test as it is exhibiting flaky behavior on the bots. (details)
  2. AArch64 Linux and elf-core PAC stack unwinder support (details)
  3. [OpenMP] Lazily assign root affinity (details)
  4. [OpenMP] Fix affinity determine capable algorithm on Linux (details)
  5. [OpenMP] Add GOMP 5.0 version symbols to API (details)
  6. Convert functions that were returning BreakpointOption * to BreakpointOption &. (details)
  7. [SampleFDO] Using common linkage for the discriminator flag variable (details)
  8. [mlir][sparse] allow all-dense annotated "sparse" tensor output (details)
  9. [OpaquePtr] Verify Opaque pointer in function parameter (details)
  10. [mlir][SCF] Remove empty else blocks of `scf.if` operations. (details)
  11. [docs] Exclude FlangOption and re-generate ClangCommandLineReference.rst (details)
  12. Missed a Windows use of ValidForThisThread in the changes for (details)
  13. [mlir][sparse] integration test for all-dense annotated "sparse" output (details)
  14. CMake: allow overriding CMAKE_CXX_VISIBILITY_PRESET (details)
  15. Don't depend on the "run" alias doing shell expanding. (details)
  16. [libc++] Promote GCC 11 to mandatory CI (details)
Commit 3af3e7dc576fa9ff972d6366923a52d2769453a0 by sivachandra
[libc][NFC] Disable thrd_test as it is exhibiting flaky behavior on the bots.
The file was modifiedlibc/test/src/threads/CMakeLists.txt
Commit e8f998c0c5edda3d6bad9b70e60975296df3d9fb by omair.javaid
AArch64 Linux and elf-core PAC stack unwinder support

This patch builds on D100521 and other related patches to add support
for unwinding stack on AArch64 systems with pointer authentication
feature enabled.

We override FixCodeAddress and FixDataAddress function in ABISysV_arm64
class. We now try to calculate and set code and data masks after reading
data_mask and code_mask registers exposed by AArch64 targets running Linux.

This patch utilizes core file linux-aarch64-pac.core for testing that
LLDB can successfully unwind stack frames in the presence of signed
return address after masking off ignored bits.

This patch also includes a AArch64 Linux native test case to demonstrate
successful back trace calculation in presence of pointer authentication
feature.

Differential Revision: https://reviews.llvm.org/D99944
The file was modifiedlldb/test/API/functionalities/postmortem/elf-core/TestLinuxCore.py
The file was addedlldb/test/API/functionalities/postmortem/elf-core/linux-aarch64-pac.out
The file was modifiedlldb/source/Plugins/ABI/AArch64/ABISysV_arm64.h
The file was addedlldb/test/API/functionalities/unwind/aarch64_unwind_pac/main.c
The file was modifiedlldb/source/Plugins/ABI/AArch64/ABISysV_arm64.cpp
The file was addedlldb/test/API/functionalities/unwind/aarch64_unwind_pac/TestAArch64UnwindPAC.py
The file was addedlldb/test/API/functionalities/unwind/aarch64_unwind_pac/Makefile
Commit 0ddde4d86518de1154b6e850dc49010c829b717c by jonathan.l.peyton
[OpenMP] Lazily assign root affinity

Lazily set affinity for root threads. Previously, the root thread
executing middle initialization would attempt to assign affinity
to other existing root threads. This was not working properly as the
set_system_affinity() function wasn't setting the affinity for the
target thread. Instead, the middle init thread was resetting the
its own affinity using the target thread's affinity mask.

Differential Revision: https://reviews.llvm.org/D103625
The file was modifiedopenmp/runtime/src/kmp_ftn_entry.h
The file was modifiedopenmp/runtime/src/kmp_csupport.cpp
The file was modifiedopenmp/runtime/src/kmp.h
The file was addedopenmp/runtime/test/affinity/root-threads-affinity.c
The file was modifiedopenmp/runtime/src/kmp_runtime.cpp
Commit 92baf414dbfb31d7d69bea56a0ce982d2b737268 by jonathan.l.peyton
[OpenMP] Fix affinity determine capable algorithm on Linux

Remove strange checks for syscall() arguments where mask is NULL.
Valgrind reports these as error usages for the syscall.
Instead, just check if CACHE_LINE bytes is long enough. If not, then
search for the size. Also, by limiting the first size detection
attempt to CACHE_LINE bytes, instead of 1MB, we don't use more than one
cache line for the mask size. Before this patch, sometimes the returned
mask size was 640 bytes (10 cache lines) because the initial call to
getaffinity() was limited only by the internal kernel mask size
which can be very large.

Differential Revision: https://reviews.llvm.org/D103637
The file was modifiedopenmp/runtime/src/z_Linux_util.cpp
Commit 56da28240f3c9d1c0b7152749bfd4777c67828e0 by jonathan.l.peyton
[OpenMP] Add GOMP 5.0 version symbols to API

* Add GOMP versioned pause functions
* Add GOMP versioned affinity format functions

To do the affinity format functions, only attach versioned symbols
to the APPEND Fortran entries (e.g., omp_set_affinity_format_) since
GOMP only exports two symbols (one for Fortran, one for C). Our
affinity format functions have three symbols.
e.g., with omp_set_affinity_format:
1) omp_set_affinity_format (Fortran interface)
2) omp_set_affinity_format_ (Fortran interface)
3) ompc_set_affinity_format (C interface)

Have the GOMP version of the C symbol alias the ompc_* 3) version
instead of the Fortran unappended version 1).

Differential Revision: https://reviews.llvm.org/D103647
The file was modifiedopenmp/runtime/src/kmp_os.h
The file was modifiedopenmp/runtime/src/kmp_ftn_entry.h
The file was modifiedopenmp/runtime/src/kmp.h
The file was modifiedopenmp/runtime/src/kmp_csupport.cpp
The file was modifiedopenmp/runtime/src/exports_so.txt
Commit cfb96d845a684a5c567823dbe2aa4392937ee979 by jingham
Convert functions that were returning BreakpointOption * to BreakpointOption &.

This is an NFC cleanup.

Many of the API's that returned BreakpointOptions always returned valid ones.
Internally the BreakpointLocations usually have null BreakpointOptions, since they
use their owner's options until an option is set specifically on the location.
So the original code used pointers & unique_ptr everywhere for consistency.
But that made the code hard to reason about from the outside.

This patch changes the code so that everywhere an API is guaranteed to
return a non-null BreakpointOption, it returns it as a reference to make
that clear.

It also changes the Breakpoint to hold a BreakpointOption
member where it previously had a UP.  Since we were always filling the UP
in the Breakpoint constructor, having the UP wasn't helping anything.

Differential Revision: https://reviews.llvm.org/D104162
The file was modifiedlldb/source/Target/StopInfo.cpp
The file was modifiedlldb/source/Breakpoint/BreakpointLocation.cpp
The file was modifiedlldb/source/Commands/CommandObjectBreakpoint.cpp
The file was modifiedlldb/include/lldb/Breakpoint/BreakpointLocation.h
The file was modifiedlldb/source/Breakpoint/BreakpointSite.cpp
The file was modifiedlldb/source/Breakpoint/Breakpoint.cpp
The file was modifiedlldb/source/Core/IOHandlerCursesGUI.cpp
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPythonImpl.h
The file was modifiedlldb/source/Breakpoint/BreakpointLocationCollection.cpp
The file was modifiedlldb/source/Breakpoint/BreakpointOptions.cpp
The file was modifiedlldb/source/API/SBBreakpoint.cpp
The file was modifiedlldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
The file was modifiedlldb/source/API/SBBreakpointName.cpp
The file was modifiedlldb/source/Breakpoint/BreakpointName.cpp
The file was modifiedlldb/include/lldb/Breakpoint/BreakpointLocationCollection.h
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.h
The file was modifiedlldb/source/Interpreter/ScriptInterpreter.cpp
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Lua/ScriptInterpreterLua.cpp
The file was modifiedlldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
The file was modifiedlldb/source/Commands/CommandObjectBreakpointCommand.cpp
The file was modifiedlldb/include/lldb/Breakpoint/BreakpointSite.h
The file was modifiedlldb/include/lldb/Interpreter/ScriptInterpreter.h
The file was modifiedlldb/include/lldb/Breakpoint/Breakpoint.h
The file was modifiedlldb/source/API/SBBreakpointLocation.cpp
The file was modifiedlldb/source/Plugins/Process/Utility/StopInfoMachException.cpp
Commit 434fed5aff5e62460e2e984c7cc2674c12779b1e by xur
[SampleFDO] Using common linkage for the discriminator flag variable

We create flag variable "__llvm_fs_discriminator__" in the binary
to indicate that FSAFDO hierarchical discriminators are used.

This variable might be GC'ed by the linker since it is not explicitly
reference. I initially added the var to the use list in pass
MIRFSDiscriminator but it did not work. It turned out the used global
list is collected in lowering (before MIR pass) and then emitted in
the end of pass pipeline.

In this patch, we use a "common" linkage for this variable so that
it will be GC'ed by the linker.

Differential Revision: https://reviews.llvm.org/D103988
The file was modifiedllvm/test/CodeGen/X86/fsafdo_test1.ll
The file was modifiedllvm/lib/CodeGen/MIRFSDiscriminator.cpp
The file was modifiedllvm/test/CodeGen/X86/fsafdo_test2.ll
Commit 727a63e0d9a79d8e650674c0aca8fb3629e06b2d by ajcbik
[mlir][sparse] allow all-dense annotated "sparse" tensor output

This is a very careful start with alllowing sparse tensors at the
left-hand-side of tensor index expressions (viz. sparse output).
Note that there is a subtle difference between non-annotated tensors
(dense, remain n-dim, handled by classic bufferization) and all-dense
annotated "sparse" tensors (linearized to 1-dim without overhead
storage, bufferized by sparse compiler, backed by runtime support library).
This revision gently introduces some new IR to facilitate annotated outputs,
to be generalized to truly sparse tensors in the future.

Reviewed By: gussmith23, bixia

Differential Revision: https://reviews.llvm.org/D104074
The file was modifiedmlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
The file was modifiedmlir/test/Dialect/SparseTensor/conversion.mlir
The file was modifiedmlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
The file was modifiedmlir/test/Dialect/SparseTensor/invalid.mlir
The file was modifiedmlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
The file was addedmlir/test/Dialect/SparseTensor/dense.mlir
The file was modifiedmlir/test/Dialect/SparseTensor/roundtrip.mlir
Commit fad8d4230ff73432b73f8111f5d640c6bb014daa by zequanwu
[OpaquePtr] Verify Opaque pointer in function parameter

Verifying opaque pointer as function parameter when using with `byval`, `byref`,
`inalloca`, `preallocated`.

Differential Revision: https://reviews.llvm.org/D104309
The file was addedllvm/test/Verifier/opaque-ptr-invalid.ll
The file was modifiedllvm/lib/IR/Verifier.cpp
The file was modifiedllvm/test/Assembler/invalid-byval-type3.ll
The file was modifiedllvm/test/Verifier/inalloca1.ll
The file was modifiedllvm/test/Verifier/byref.ll
Commit 621d93d263f82059c2826fe919a1a138b65627a3 by ravishankarm
[mlir][SCF] Remove empty else blocks of `scf.if` operations.

Differential Revision: https://reviews.llvm.org/D104273
The file was modifiedmlir/lib/Dialect/SCF/SCF.cpp
The file was modifiedmlir/test/Dialect/SCF/canonicalize.mlir
Commit bddef537776e15fa21e2ec11a4b2543d6d91fedc by i
[docs] Exclude FlangOption and re-generate ClangCommandLineReference.rst
The file was modifiedclang/include/clang/Driver/ClangOptionDocs.td
The file was modifiedclang/docs/ClangCommandLineReference.rst
Commit 479c3577fb825c0c7933b49ac0dd944c4aae22bf by jingham
Missed a Windows use of ValidForThisThread in the changes for
cfb96d845a684a5c567823dbe2aa4392937ee979.
The file was modifiedlldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
Commit ec8910c4ad92bce301774dfa99b631bbfaca0e30 by ajcbik
[mlir][sparse] integration test for all-dense annotated "sparse" output

Reviewed By: gussmith23

Differential Revision: https://reviews.llvm.org/D104277
The file was modifiedmlir/test/CMakeLists.txt
The file was addedmlir/test/Integration/data/zero.mtx
The file was addedmlir/test/Integration/Dialect/SparseTensor/CPU/dense_output.mlir
Commit 76de2f4a9c023d06717536ccb089f9959c4ef4bb by aktoon
CMake: allow overriding CMAKE_CXX_VISIBILITY_PRESET

This allows overriding the `CMAKE_CXX_VISIBILITY_PRESET` on the command line. For example, setting the value to `default` lets PIC LLVM static libraries be converted to DSOs, without the need to rebuild LLVM with BUILD_SHARED_LIBS=ON.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D104168
The file was modifiedllvm/lib/Target/CMakeLists.txt
Commit 80b2da42d28466341b9512599aac354c178c39f8 by jingham
Don't depend on the "run" alias doing shell expanding.
Instead dial it up explicitly.

This test started failing recently and I'm not sure why.  It also
doesn't make sense to me the replacing "run" with "process launch -X 1 --"
should make any difference - run is an alias for the latter.  But
it does pass with the change, and unless we are testing for the exact
run alias, it's better to ask for what we want explicitly.
The file was modifiedlldb/test/Shell/Host/TestCustomShell.test
Commit 4f194d0db78f612233234a7db659384cd62709fb by Louis Dionne
[libc++] Promote GCC 11 to mandatory CI

Also, fix the last issue that prevented GCC 11 from passing the test
suite. Thanks to everyone else who fixed issues.

Differential Revision: https://reviews.llvm.org/D104315
The file was modifiedlibcxxabi/test/catch_member_function_pointer_02.pass.cpp
The file was modifiedlibcxx/utils/ci/Dockerfile
The file was modifiedlibcxx/utils/ci/buildkite-pipeline.yml
The file was modifiedlibcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_is_lock_free.pass.cpp
The file was modifiedlibcxx/utils/ci/run-buildbot