[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
[clang] Add arm64_neon.h wrapper on windows (#196014)
Add an MSVC-compatible <arm64_neon.h> resource header that forwards to
Clang's generated <arm_neon.h>. This lets ARM64 Windows code using the
MSVC header name lower NEON intrinsics through Clang builtins instead of
eaving external neon_* calls such as neon_ld1m4_q32
Fixes #195683
[ADT] Avoid map storage for small SmallMapVector (#196473)
SmallMapVector previously used SmallDenseMap for its index, which still
initializes and maintains map storage even when the number of entries is
tiny.
Teach MapVector to support a vector-only small mode. While the entry
count stays
within the configured small size, operations use the underlying vector
directly.
When the size grows past the threshold, the map index is built and
subsequent
operations use the regular MapVector path.
This mirrors the small-size strategy used by SmallSetVector.
[AtomicExpand] Add bitcasts when expanding load atomic vector
AtomicExpand fails for aligned `load atomic <n x T>` because it
does not find a compatible library call. This change adds appropriate
bitcasts so that the call can be lowered. It also adds support for
128 bit lowering in tablegen to support SSE/AVX.
[clang-tidy] comment braced and parenthesized init arguments (#180408)
Handle arguments like `{}`, `Type{}` and `Type()` in
`bugprone-argument-comment` and
add coverage for `initializer_list` and designated initializers.
Fixes: https://github.com/llvm/llvm-project/issues/171842
Add missing direct includes for bit.h/SwapByteOrder.h. NFC (#196843)
These translation units use llvm::endianness, llvm::byteswap,
llvm::has_single_bit, or sys::IsLittleEndianHost without explicitly
including the header that declares them. They currently compile only
because llvm/ADT/Hashing.h transitively pulls in
llvm/Support/SwapByteOrder.h (which includes llvm/ADT/bit.h).
[LV] Add tests for load/store scalarization and ptrcasts (NFC) (#196839)
Add missing test coverage for range of pointer casts and load/store
scalarization.
[mlir][spirv] Enforce execution scope for group operations in ODS (#196644)
This adds a new class `SPIRV_ExecutionScopeAttrIs` shared between group
and non-uniform group operations.
Assisted-by: Codex
[mlir][spirv] Remove stale NV CooperativeMatrix attributes (#196639)
Since the support for NV CooperativeMatrix has been removed a while
back, those attributes can be safely removed.
[AArch64] New pass for code layout optimizations. (#184434)
This pass is intended to optimize code layout prior to AsmPrinter. The
initial version handles two known cases:
I. FCMP-FCSEL
II. CMP/CMN-CSEL, 32-bit only
Using existing directives, the pass induces function-alignment (of
64-bytes by default) when a pair is detected, and possibly induces
block-alignment of up to 4-bytes on top of that if the pair would
straddle cache-lines.
Beyond performance improvement, this pass reduces noise due to code
layout thus stabilizes measured performance over-time. For example,
knock-out effects on a "sensitive function" won't be triggered by
codegen changes outside it.
Enabled by default on processors with the new `FeatureAlignCmpCSelPairs`
subtarget feature (gated per sub-case by `FeatureFuseCmpCSel` /
[6 lines not shown]
[libc][math] Fix -Wshadow warnings in cos.h (#196342)
cos() does `using namespace range_reduction_double_internal;` and
range_reduction_double_internal after 51e9430a0c767 contains
using LIBC_NAMESPACE::fputil::DoubleDouble;
using Float128 = LIBC_NAMESPACE::fputil::DyadicFloat<128>;
So the local using statements for DoubleDouble and Float128 shadowed
these. Just remove the local using statements.
No behavior change.
[clang-tidy][NFC] Move `ClassifiedToken` to cpp file (#196820)
`ClassifiedToken` is used in only the implementation of
`UseTrailingReturnTypeCheck`. Move it into the unnamed namespace of the
cpp file instead of it being in the header.
[clang-tidy] Move `ClassifiedToken` to cpp file
`ClassifiedToken` is used in only the implementation of `UseTrailingReturnTypeCheck`. Move it into the unnamed namespace of the cpp file instead of it being in the header.
Move KCFI type ID hash helpers out of LLVMSupport (#196784)
PR #167254 inappropriately introduced llvm/Support/Hash.{h,cpp} for the
KCFI helpers. The name is misleading — it has nothing to do with the
generic hashing facility in llvm/ADT/Hashing.h — and KCFI is a
CodeGen/IR feature that does not belong in the foundational Support
layer.
Move the files to llvm/lib/Transforms/Utils/KCFIHash.cpp, alongside
setKCFIType, which is the only existing KCFI helper in TransformUtils.
Also relocate the deprecated pre-xxh3 xxHash64 implementation into
KCFIHash.cpp, the sole user. clang/test/CodeGen/kcfi-generalize.c and
kcfi-normalize.c are end-to-end regression tests for the xxHash64 output