[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][riscv] Add tests for __builtin_reduce_X support [NFC] (#193082)
It turns out we already support use of the __builtin_reduce_ family of
builtins on the builtin RVV types, but we have no test coverage which
demonstrates this.
Note that __builtin_reduce_mul is a bit of a cornercase as currently the
clang part works just fine, but the lowering will crash since we don't
have a vredprod-esq instruction. (See
https://github.com/llvm/llvm-project/pull/193094 for the lowering fix.)
[offload] Remove unnecessary extra allocations in kernel replay tool (#193108)
The tool had two extra allocations holding the device memory and
globals. Apparently, the AMDGPU plugin failed in the past to transfer
data from the file memory mapping, and required these extra buffers.
After testing it on MI300A and MI250X, this issue is not present
anymore. Thus, we are removing them for now.
[SLP] Normalize copyable operand order to group loads for better vectorization
When building operands for entries with copyable elements, non-copyable
lanes may have inconsistent operand order (e.g., some lanes have
load,add while others have add,load for commutative ops). This prevents
VLOperands::reorder() from grouping consecutive loads on one side,
degrading downstream vectorization.
Normalize in two steps during buildOperands:
1) Majority voting: swap lanes that are the exact inverse of the
majority operand-type pattern.
2) Load preference: if the majority pattern has loads at OpIdx 1
(strict majority), swap to put loads at OpIdx 0, enabling
vector load + copyable patterns.
Reviewers: hiraditya, RKSimon
Pull Request: https://github.com/llvm/llvm-project/pull/189181
[lldb] Don't enable ASLR for the Wasm runtime (#193115)
We're launching the Wasm runtime (a native host binary), not the target
being debugged. Clear flags that don't apply to the runtime process.
Update clang/lib/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageExtractor.cpp
Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
[CodeGen] Add MachineBlockHashInfoAnalysis for the new pass manager (#193107)
This patch introduces MachineBlockHashInfoAnalysis and its corresponding
printer pass MachineBlockHashInfoPrinterPass to the new pass manager.
This allows running -passes="print<machine-block-hash>" via llc.
Can't merge before #192826, and don't want to mix test patch with
determinism fix in #192826.
This is #192911 which was accidentally merged into spr/users branch.
Update clang/unittests/ScalableStaticAnalysisFramework/Analyses/UnsafeBufferUsage/UnsafeBufferUsageTest.cpp
Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
[SSAF][UnsafeBufferUsage] Add APIs to the EntityPointerLevel module for UnsafeBufferUsage (#191333)
- UnsafeBufferUsage serialization uses EntityPointerLevel's API to
serialize EntityPointerLevels.
- Add APIs to EntityPointerLevel for creating EPLs from Decls and
incrementing EPL's pointer level.
- Improve UnsafeBufferUsage serialization error messages with a test.
---------
Co-authored-by: Balázs Benics <benicsbalazs at gmail.com>
[SLP] Improve cost model for i1 select-as-or/and patterns
Model `select i1 %c, i1 true, i1 %d` as `or` and
`select i1 %c, i1 %d, i1 false` as `and` in the SLP cost model, since
these are the operations the backend will lower them to. The previous
select cost overestimated the vector cost of these patterns, preventing
profitable vectorization of i1 condition chains.
Reviewers: hiraditya, RKSimon, bababuck
Pull Request: https://github.com/llvm/llvm-project/pull/188572
[dsymutil] Add support for code signing dSYM bundles (#190676)
This PR adds support for code signing the dSYM bundle using the
`codesign` command line utility.
[LLDB] Fix potential data race in Symtab initialization (#192753)
Claude pointed out to me that Symtab::FindFunctionSymbols doesn't lock
the mutex before checking m_name_indexes_computed and recomputing it. On
top of that all the initialization flags are bitfields, which makes any
unguarded concurrent accesses UB. Changing them to bools should no
longer be necessary after introducing a lock, but several of the public
methods trust that their caller holds the lock so I'm opting to remove
this footgun just in case.
rdar://174988238