[Flang][OpenMP] Allow workdistribute inside 'target teams' (#199006)
Currently, a `workdistribute` construct nested inside of a combined
`target teams` is incorrectly reported as an error. This patch fixes
that.
[clang] fix getTemplateInstantiationArgs
This implements a new strategy for collecting the template arguments, by
relying on the qualifiers and template parameter lists to navigate the template
context of out-of-line definitions.
This greatly simplifies the signature of that function, by removing a bunch
of workarounds, and simpliffying a couple that weren't removed yet.
Since this now relies on qualifiers and template parameter lists,
this patch expends most of its effort making sure these are placed,
transformed and propagated to template instantiations.
Also makes the explicit specialization AST nodes stop abusing the template
parameter lists by storing it's own template parameter list, creating a
dedicated field for them, similar to partial specializations.
[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] fix getTemplateInstantiationArgs
This implements a new strategy for collecting the template arguments, by
relying on the qualifiers and template parameter lists to navigate the template
context of out-of-line definitions.
This greatly simplifies the signature of that function, by removing a bunch
of workarounds, and simpliffying a couple that weren't removed yet.
Since this now relies on qualifiers and template parameter lists,
this patch expends most of its effort making sure these are placed,
transformed and propagated to template instantiations.
Also makes the explicit specialization AST nodes stop abusing the template
parameter lists by storing it's own template parameter list, creating a
dedicated field for them, similar to partial specializations.
[clang] fix getTemplateInstantiationArgs
This implements a new strategy for collecting the template arguments, by
relying on the qualifiers and template parameter lists to navigate the template
context of out-of-line definitions.
This greatly simplifies the signature of that function, by removing a bunch
of workarounds, and simpliffying a couple that weren't removed yet.
Since this now relies on qualifiers and template parameter lists,
this patch expends most of its effort making sure these are placed,
transformed and propagated to template instantiations.
Also makes the explicit specialization AST nodes stop abusing the template
parameter lists by storing it's own template parameter list, creating a
dedicated field for them, similar to partial specializations.
[CIR][AArch64] Lower NEON vsli/vsliq intrinsics (#198309)
### summary
part of: https://github.com/llvm/llvm-project/issues/185382
Lower the AArch64 NEON shift-left-and-insert intrinsics (`vsli_n_v` /
`vsliq_n_v`) in the CIR codegen path. The lowering mirrors classic
CodeGen (`clang/lib/CodeGen/TargetBuiltins/ARM.cpp`): bitcast both
vector operands to the target element type and emit a direct
`llvm.aarch64.neon.vsli` intrinsic call.
[Hexagon] Support reserving R16-R28 registers via -ffixed-rN (#197208)
Extend register reservation from R19-only to R16-R28. This allows users
to reserve callee-saved registers (R16-R27) and R28 via command-line
flags -ffixed-r16 through -ffixed-r28. The single bool ReservedR19 is
replaced with an array-based approach (ReservedR[32]) to scale cleanly
across all supported registers.
---------
Co-authored-by: quic-santdas <quic_santdas at quicinc.com>
[clang] preserve exact redeclaration for getTemplateInstantiationPattern
This makes these functions not always return the definition if any.
The few users which depend on this are updated to fetch the definition
themselves.
Also fixes the VarDecl variant returning the queried declaration itself.
[VPlan] Rename Expression::isSingleScalar (NFC) (#199041)
The single-scalar terminology, as it is used in other places indicates
that all operands are scalars and that the result is a scalar.
VPExpressionRecipe::isSingleScalar is a misnomer, and is actually a
vector-to-scalar, using the existing terminology. Rename it for clarity.
[libc++] remove duplicate assertions for void/reference const any_cast (#199425)
For test cases of the const overload of any_cast, such as:
```C++
void test() {
std::any a = 0;
const std::any& a2 = a;
(void)std::any_cast<int&>(&a2);
}
```
(And similarly for void).
The problem is that the assertions are implemented both in the const and
non-const any_cast overloads, but since the const overload delegates to
the non-const overload, that ends up producing the same assertion twice.
This separates those test cases, because those assertions are
implemented in the function body, and that's only instantiated once per
specialization, not once per use.
[X86] Remove shouldCastAtomicLoadInIR; use DAG combine instead
Remove X86's shouldCastAtomicLoadInIR override that cast FP atomic
loads to integer at the IR level. Instead, handle this in a pre-legalize
DAG combine (combineAtomicLoad) that rewrites FP/FP-vector atomic loads
to integer atomic loads plus a bitcast.
This depends on #199310 which adds the necessary cmpxchg support for
non-integer atomic loads in AtomicExpand.
[libc] Fix inet_aton (#198791)
The main (in terms of LOC) change is moving the implementation to an
internal function in order to avoid the inet_addr->inet_aton dependency.
I also fix a bug where we (mistakenly) accepted whitespace and signs
inside the address. I also match the glibc implementation in ignoring
the data after the first whitespace.
[LoopInterchange] drop duplicate Instruction type check in populateDependencyMatrix (#199498)
Remove a duplicate isa<Instruction> check in populateDependencyMatrix.
[PAC][lld] Do not emit AUTH relocs against undef weak non-preemptible symbols
Undefined weak non-preemptible symbols should be statically resolved to
the addend value and not signed. Previously, a dynamic relocation
against such symbols was emitted, which is not a correct behavior.
See also docs: https://github.com/ARM-software/abi-aa/pull/391
Resolves #173296
[PAC][ELF] Support R_AARCH64_AUTH_TLSDESC_CALL relocation
The R_AARCH64_AUTH_TLSDESC_CALL is introduced to allow linker relaxation of
AUTH TLSDESC call sequences for non-preemptible undefined weak symbols.
The lld patch introducing the relaxation: #194636
Corresponding ARM docs PR: https://github.com/ARM-software/abi-aa/pull/395
[compiler-rt] Inline __NR_riscv_flush_icache instead of including linux/unistd.h (#193645)
Avoid the dependency on kernel headers to get __NR_riscv_flush_icache,
mirroring the existing approach used for __ARM_NR_cacheflush.
Assisted-by: Claude Sonnet 4.6
[RISCV][CodeGen] Add initial CodeGen support of vunzip{e,o} (#196024)
Add initial support for vunzip{e,o} instructions, which are included in
zvzip extension.
[PAC][ELF] Support R_AARCH64_AUTH_TLSDESC_CALL relocation
The R_AARCH64_AUTH_TLSDESC_CALL is introduced to allow linker relaxation of
AUTH TLSDESC call sequences for non-preemptible undefined weak symbols.
The lld patch introducing the relaxation: #194636
Corresponding ARM docs PR: https://github.com/ARM-software/abi-aa/pull/395