[libc++][ThreadSafety] Add thread safety annotations for variadic std::scoped_lock (#204462)
The thread safety annotations on std::scoped_lock were previously only
applied to the empty and single-mutex specializations. The general
variadic specialization carried no annotations, so -Wthread-safety
considered none of the mutexes held inside a multi-mutex scoped_lock
block and reported the guarded data accessed there as unprotected.
Now that Clang supports pack expansion inside thread safety attributes
(landed for Clang 21), annotate the variadic scoped_lock with
acquire_capability/requires_capability on its constructors,
release_capability on its destructor, and scoped_lockable on the class.
Fixes #42000.
Co-authored-by: Anthony Calandra <anthony at anthony-calandra.com>
Update to version 2.43
- accommodate sox to sox_ns pkgsrc change
- in 'pthai-mp3-play, use new variable 'pthai-audio-command, preferring "play_ng" over "play"
- add 'pthai-lookup-all to return all matches for word lookup
[OpenMP] Remove internal linkage from __kmp_wait template (NFC) (#207983)
__kmp_wait in kmp_dispatch.h is a static function template in a header,
so any TU that includes it without instantiating it trips
-Wunused-template (kmp_runtime.cpp, kmp_affinity.cpp, kmp_global.cpp,
kmp_settings.cpp). It is used by kmp_dispatch.cpp and
kmp_dispatch_hier.h. Drop static, which the comment above it already
suggests.
Part of #202945
[SLP] Retune look-ahead scores for constants
Rescale LookAheadHeuristics scores and add ScoreSameConstants /
ScoreConstantScaleFactor so identical constants no longer score the
same as same-opcode instruction matches, fixing suboptimal operand
reordering around repeated constants (shift amounts, splat values).
Also retry a SplitVectorize alt-shuffle build for copyable-element
bundles when scheduling fails, instead of always falling back to a
gather, to fix regressions.
Reviewers: hiraditya, bababuck, RKSimon
Pull Request: https://github.com/llvm/llvm-project/pull/207548
[AMDGPU] Clear DS aggregate in inverted sched_barrier mask when LDSDMA allowed (#207779)
The DS clause was missing the LDSDMA check that the VMEM clause has
PPC: Remove manual run of machine verifier
This is redundant with using the standard -verify-machineinstrs.
It's also confusing / worse, since the error is not produced to
stderr.
[SLP] Drop nsw when mul by INT_MIN is converted to shl
mul nsw X, INT_MIN is valid, but shl X, BW-1 is not nsw-safe. Drop nsw on
the vector shl when a mul lane with INT_MIN is unified into shl during
opcode interchange.
Fixes #207990
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/208028
[clang][Sema][NFC] Improve readability in `computeDeclContext` (#208010)
Split off from #190495.
Co-authored-by: Matheus Izvekov <mizvekov at gmail.com>
[libc][stdfix] Fix idiv* doc table, rename idivfx test helpers and remove duplicate bitsuk source (#206729)
Two small cleanups in libc/src/stdfix.
1. `idiv*` in `stdfix.rst` was marked as implemented for all 12 type
variants but only the 8 non-short width variants (ur, r, ulr, lr, uk, k,
ulk, lk) exist in the directory and are built. Updated the table to
match.
2. Removed `bitusk.cpp` which is an orphaned duplicate of `bitsuk.cpp`
with a typo in the file name. It isn't referenced in the CMakeLists.txt
and has no corresponding .h file.
3. Rename the idivfx test header and helpers.
[clang][X86] Emit AVX level mismatch psABI warnings on function definitions (#199091)
Emit -WpsABI for x86_64 function definitions whose return type or
parameter type uses a vector wider than 128 bits without the required
ABI feature enabled. 256-bit vectors require avx, and 512-bit vectors
require avx512f.
Previously this diagnostic was only emitted at call sites, so
definitions with wide vector signatures could be introduced without a
warning until they were called. Use the function feature map so
attribute(target("avx/avx512f")) definitions are accepted, and emit no
warnings for prototype-only declarations.
[AArch64][llvm] Allow +hcx to be specified as optional for Armv8.6
The `HCRX_EL2` system register can be accessed if FEAT_HCX is
implemented, and is optional from Armv8.6 (and mandatory in Armv8.7).
Allow `clang -march=armv8.6-a+hcx` by making FeatureHCX an
optional argument.
[clang] implement CWG2064: ignore value dependence for decltype
The 'decltype' for a value-dependent (but non-type-dependent) should be known,
so this patch makes them non-opaque instead.
This patch also implements what's neceessary to allow overloading
on pure differences in instantiation dependence, making `std::void_t`
usable for SFINAE purposes.
This also readds a few test cases from da98651, which was a previous attempt
at resolving CWG2064.
Fixes #8740
Fixes #61818
Fixes #190388