[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-09 Thread Kerry McLaughlin via cfe-commits
@@ -8,31 +8,28 @@ // CHECK-C-LABEL: @test_svstr_vnum_za( // CHECK-CXX-LABEL: @_Z18test_svstr_vnum_zajPv( // CHECK-NEXT: entry: -// CHECK-NEXT:tail call void @llvm.aarch64.sme.str(i32 [[SLICE_BASE:%.*]], ptr [[PTR:%.*]]) +// CHECK-NEXT:tail call void @llvm.aarch64.sme.

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-09 Thread Kerry McLaughlin via cfe-commits
@@ -9665,18 +9665,34 @@ Value *CodeGenFunction::EmitSMEZero(const SVETypeFlags &TypeFlags, Value *CodeGenFunction::EmitSMELdrStr(const SVETypeFlags &TypeFlags, SmallVectorImpl &Ops, unsigned IntID) { -

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-09 Thread Kerry McLaughlin via cfe-commits
@@ -9665,18 +9665,34 @@ Value *CodeGenFunction::EmitSMEZero(const SVETypeFlags &TypeFlags, Value *CodeGenFunction::EmitSMELdrStr(const SVETypeFlags &TypeFlags, SmallVectorImpl &Ops, unsigned IntID) { -

[clang] [AArch64][SME] Remove immediate argument restriction for svldr and svstr (PR #68565)

2023-10-09 Thread Kerry McLaughlin via cfe-commits
@@ -8,7 +8,7 @@ // CHECK-C-LABEL: @test_svldr_vnum_za( // CHECK-CXX-LABEL: @_Z18test_svldr_vnum_zajPKv( // CHECK-NEXT: entry: -// CHECK-NEXT:tail call void @llvm.aarch64.sme.ldr(i32 [[SLICE_BASE:%.*]], ptr [[PTR:%.*]]) kmclaughlin-arm wrote: Were these c

[clang] [SVE ACLE] Allow default zero initialisation for svcount_t. (PR #69321)

2023-10-17 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/69321 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] af64948 - [SVE][Inline-Asm] Add constraints for SVE ACLE types

2020-03-17 Thread Kerry McLaughlin via cfe-commits
Author: Kerry McLaughlin Date: 2020-03-17T11:04:19Z New Revision: af64948e2a050d1ef3b7fd314ed07b2a2fe402a5 URL: https://github.com/llvm/llvm-project/commit/af64948e2a050d1ef3b7fd314ed07b2a2fe402a5 DIFF: https://github.com/llvm/llvm-project/commit/af64948e2a050d1ef3b7fd314ed07b2a2fe402a5.diff L

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-09-06 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm created https://github.com/llvm/llvm-project/pull/107581 When functions are passed as arguments to a lambda, it's possible for the mangled names of these functions to be the same despite the prototypes being different. For example: ``` int non_streaming_fn(i

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-09-09 Thread Kerry McLaughlin via cfe-commits
kmclaughlin-arm wrote: > Isn't this a bug in the mangler? I mean, it's better to print an error rather > than silently miscompile, but this doesn't really solve the issue. Hi @efriedma-quic, The SME type attributes are not part of the name mangling. We figured an error message would be useful

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-07 Thread Kerry McLaughlin via cfe-commits
@@ -8287,6 +8289,13 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI, SDValue InGlue; if (RequiresSMChange) { + +if (Subtarget->hasSVE()) { kmclaughlin-arm wrote: I've made changes to `needsAsyncDwarfUnwindInfo` in AArch64MachineFunctionInfo

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-10 Thread Kerry McLaughlin via cfe-commits
@@ -196,12 +196,14 @@ bool AArch64FunctionInfo::needsAsyncDwarfUnwindInfo( const MachineFunction &MF) const { if (!NeedsAsyncDwarfUnwindInfo) { const Function &F = MF.getFunction(); +const AArch64FunctionInfo *AFI = MF.getInfo(); // The check got "minsize" i

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-10 Thread Kerry McLaughlin via cfe-commits
@@ -214,7 +232,8 @@ declare double @za_shared_callee(double) "aarch64_inout_za" define double @za_new_caller_to_za_shared_callee(double %x) nounwind noinline optnone "aarch64_new_za"{ ; CHECK-COMMON-LABEL: za_new_caller_to_za_shared_callee: ; CHECK-COMMON: // %bb.0: //

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-11 Thread Kerry McLaughlin via cfe-commits
@@ -196,12 +196,14 @@ bool AArch64FunctionInfo::needsAsyncDwarfUnwindInfo( const MachineFunction &MF) const { if (!NeedsAsyncDwarfUnwindInfo) { const Function &F = MF.getFunction(); +const AArch64FunctionInfo *AFI = MF.getInfo(); // The check got "minsize" i

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-13 Thread Kerry McLaughlin via cfe-commits
@@ -214,7 +232,8 @@ declare double @za_shared_callee(double) "aarch64_inout_za" define double @za_new_caller_to_za_shared_callee(double %x) nounwind noinline optnone "aarch64_new_za"{ ; CHECK-COMMON-LABEL: za_new_caller_to_za_shared_callee: ; CHECK-COMMON: // %bb.0: //

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-13 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm closed https://github.com/llvm/llvm-project/pull/83301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-03 Thread Kerry McLaughlin via cfe-commits
@@ -1552,6 +1553,57 @@ bool AArch64ExpandPseudo::expandMI(MachineBasicBlock &MBB, case AArch64::COALESCER_BARRIER_FPR128: MI.eraseFromParent(); return true; + case AArch64::VGSavePseudo: + case AArch64::VGRestorePseudo: { + MachineFunction &MF = *MBB.getPa

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-03 Thread Kerry McLaughlin via cfe-commits
@@ -1552,6 +1553,57 @@ bool AArch64ExpandPseudo::expandMI(MachineBasicBlock &MBB, case AArch64::COALESCER_BARRIER_FPR128: MI.eraseFromParent(); return true; + case AArch64::VGSavePseudo: + case AArch64::VGRestorePseudo: { + MachineFunction &MF = *MBB.getPa

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-03 Thread Kerry McLaughlin via cfe-commits
@@ -3768,6 +3768,12 @@ def err_conflicting_attributes_arm_state : Error< "conflicting attributes for state '%0'">; def err_sme_streaming_cannot_be_multiversioned : Error< "streaming function cannot be multi-versioned">; +def err_sme_streaming_mode_change_no_sve : Error< +

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-03 Thread Kerry McLaughlin via cfe-commits
@@ -8287,6 +8289,13 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI, SDValue InGlue; if (RequiresSMChange) { + +if (Subtarget->hasSVE()) { kmclaughlin-arm wrote: > when I compile some code with -fno-asynchronous-unwind-tables, it will still

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-06-04 Thread Kerry McLaughlin via cfe-commits
@@ -8287,6 +8289,13 @@ AArch64TargetLowering::LowerCall(CallLoweringInfo &CLI, SDValue InGlue; if (RequiresSMChange) { + +if (Subtarget->hasSVE()) { kmclaughlin-arm wrote: If we still emit the spill of VG with `-fno-asynchronous-unwind-tables`, I don

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-04-22 Thread Kerry McLaughlin via cfe-commits
@@ -8001,6 +8007,22 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +// SME functions may require SVE to be available for unwinding, as the +// value of VG needs to be preserved across streaming-mode changes. +if (CallerFD &

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-04-30 Thread Kerry McLaughlin via cfe-commits
kmclaughlin-arm wrote: Gentle ping :) https://github.com/llvm/llvm-project/pull/83301 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-05-09 Thread Kerry McLaughlin via cfe-commits
@@ -3730,6 +3730,12 @@ def warn_gnu_inline_cplusplus_without_extern : Warning< "'gnu_inline' attribute without 'extern' in C++ treated as externally" " available, this changed in Clang 10">, InGroup>; +def warn_sme_streaming_mode_change_no_sve : Warning< + "function requ

[clang] [llvm] [AArch64][SME] Save VG for unwind info when changing streaming-mode (PR #83301)

2024-05-09 Thread Kerry McLaughlin via cfe-commits
@@ -221,6 +224,15 @@ def : Pat<(AArch64_smstop (i32 svcr_op:$pstate), (i64 /*AArch64SME::Always*/0)), (MSRpstatesvcrImm1 svcr_op:$pstate, 0b0)>; +// Pseudo to insert cfi_offset/cfi_restore instructions. Used to save or restore +// the streaming value of VG around

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-09-13 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/107581 >From 1e6f25c517d8d1adeeaf59f826141efdcad8f05a Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Fri, 6 Sep 2024 10:13:33 + Subject: [PATCH 1/2] [Clang] Emit error for duplicate mangled names wit

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-09-13 Thread Kerry McLaughlin via cfe-commits
kmclaughlin-arm wrote: > > I'm having a bit of trouble understanding the way the new code is structured. > What makes the definition of lambda call operators special here? Do we not > call GetOrCreateLLVMFunction with IsForDefinition set? When I added this error I incorrectly thought GetOrCre

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-09-16 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/107581 >From 1e6f25c517d8d1adeeaf59f826141efdcad8f05a Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Fri, 6 Sep 2024 10:13:33 + Subject: [PATCH 1/3] [Clang] Emit error for duplicate mangled names wit

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-10-21 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/107581 >From 1e6f25c517d8d1adeeaf59f826141efdcad8f05a Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Fri, 6 Sep 2024 10:13:33 + Subject: [PATCH 1/6] [Clang] Emit error for duplicate mangled names wit

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-10-18 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/107581 >From 1e6f25c517d8d1adeeaf59f826141efdcad8f05a Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Fri, 6 Sep 2024 10:13:33 + Subject: [PATCH 1/5] [Clang] Emit error for duplicate mangled names wit

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-10-18 Thread Kerry McLaughlin via cfe-commits
kmclaughlin-arm wrote: > Oh, that makes sense... so the issue is generally with functions we emit > lazily? > I'd say it's reasonable to emit an error if we have two definitions for the > same symbol, even if we don't end up emitting them because they're deferred. Yes, I believe so. I've moved

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-10-30 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm created https://github.com/llvm/llvm-project/pull/114209 Similar to arm_sve_vector_bits, the mangling of function types is implemented as a pseudo template if there are any SME attributes present, i.e. `__SME_ATTRS` For example, the following function:

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-09-20 Thread Kerry McLaughlin via cfe-commits
kmclaughlin-arm wrote: > For the lambda example, there are only three relevant calls to > GetOrCreateLLVMFunction; one for each function with IsInDefinition false, but > then only one with IsInDefinition true. > > It's not clear to me why the two cases are different, and I don't really want >

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/114209 >From ff5b6defc0df704f63fffabc731bcd38a1e24d3b Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Tue, 15 Oct 2024 15:22:56 + Subject: [PATCH 1/3] [Clang][AArch64] Include SME attributes in the na

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Kerry McLaughlin via cfe-commits
@@ -3535,6 +3536,39 @@ void CXXNameMangler::mangleExtFunctionInfo(const FunctionType *T) { // FIXME: noreturn } +bool hasSharedState(unsigned SMEAttrs) { + switch (SMEAttrs) { + case FunctionType::ARM_In: + case FunctionType::ARM_Out: + case FunctionType::ARM_InOut: +

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Kerry McLaughlin via cfe-commits
@@ -3536,35 +3536,64 @@ void CXXNameMangler::mangleExtFunctionInfo(const FunctionType *T) { // FIXME: noreturn } -bool hasSharedState(unsigned SMEAttrs) { +unsigned getZAState(unsigned SMEAttrs) { switch (SMEAttrs) { case FunctionType::ARM_In: +return 1; case F

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-29 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/114209 >From c62f48766cf24636045286449e98705a6a5bd76c Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Tue, 15 Oct 2024 15:22:56 + Subject: [PATCH 1/5] [Clang][AArch64] Include SME attributes in the na

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-29 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/114209 >From c62f48766cf24636045286449e98705a6a5bd76c Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Tue, 15 Oct 2024 15:22:56 + Subject: [PATCH 1/6] [Clang][AArch64] Include SME attributes in the na

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-26 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/114209 >From ff5b6defc0df704f63fffabc731bcd38a1e24d3b Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Tue, 15 Oct 2024 15:22:56 + Subject: [PATCH 1/4] [Clang][AArch64] Include SME attributes in the na

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-09-17 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/107581 >From 1e6f25c517d8d1adeeaf59f826141efdcad8f05a Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Fri, 6 Sep 2024 10:13:33 + Subject: [PATCH 1/4] [Clang] Emit error for duplicate mangled names wit

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-09-17 Thread Kerry McLaughlin via cfe-commits
@@ -0,0 +1,31 @@ +// REQUIRES: aarch64-registered-target + +// RUN: %clang_cc1 -triple aarch64 -emit-llvm -o - %s -verify -DTEST1 +// RUN: %clang_cc1 -triple aarch64 -target-feature +sme -target-feature +sme2 -emit-llvm -o - %s -verify -DTEST2 kmclaughlin-arm wro

[clang] [Clang] Emit error for duplicate mangled names within a lambda (PR #107581)

2024-09-17 Thread Kerry McLaughlin via cfe-commits
kmclaughlin-arm wrote: > For non-lambda methods, the way this works it that we call > GetOrCreateLLVMFunction for both methods... for the first method, the > `!Entry->isDeclaration()` would be false, but for the second one, it would be > true because we've emitted the definition of the first m

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-12-02 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm closed https://github.com/llvm/llvm-project/pull/114209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm ready_for_review https://github.com/llvm/llvm-project/pull/114209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/114209 >From ff5b6defc0df704f63fffabc731bcd38a1e24d3b Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Tue, 15 Oct 2024 15:22:56 + Subject: [PATCH 1/2] [Clang][AArch64] Include SME attributes in the na

[clang] [Clang][AArch64] Include SME attributes in the name mangling of function types (PR #114209)

2024-11-25 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm edited https://github.com/llvm/llvm-project/pull/114209 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SME] Disable inlining of callees with new ZT0 state (PR #121338)

2025-01-06 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm closed https://github.com/llvm/llvm-project/pull/121338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64][SME] Disable inlining of callees with new ZT0 state (PR #121338)

2024-12-31 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/121338 >From 8b8f191d9c6980f7342c0bea2681ffd8d1dbe90b Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Mon, 30 Dec 2024 13:24:34 + Subject: [PATCH 1/2] [AArch64][SME] Disable inlining of callees with n

[clang] [llvm] [AArch64][SME] Disable inlining of callees with new ZT0 state (PR #121338)

2024-12-31 Thread Kerry McLaughlin via cfe-commits
@@ -256,7 +256,7 @@ bool AArch64TTIImpl::areInlineCompatible(const Function *Caller, CalleeAttrs.set(SMEAttrs::SM_Enabled, true); } - if (CalleeAttrs.isNewZA()) kmclaughlin-arm wrote: Thanks @MacDue, there should be a similar restriction in Clang whic

[clang] [AArch64][SME] Add diagnostics to CheckConstexprFunctionDefinition (PR #121777)

2025-01-06 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm created https://github.com/llvm/llvm-project/pull/121777 CheckFunctionDeclaration emits diagnostics if any SME attributes are used by a function definition without the required +sme or +sme2 target features. This patch adds similar diagnostics to CheckConstexpr

[clang] [AArch64][SME] Add diagnostics to CheckConstexprFunctionDefinition (PR #121777)

2025-01-06 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/121777 >From 00772b871de43a5e30aca2a65a89675117cafbf1 Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Tue, 31 Dec 2024 17:22:02 + Subject: [PATCH 1/2] [AArch64][SME] Add diagnostics to CheckConstexpr

[clang] [AArch64][SME] Add diagnostics to CheckConstexprFunctionDefinition (PR #121777)

2025-01-06 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm edited https://github.com/llvm/llvm-project/pull/121777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME] Add diagnostics to CheckConstexprFunctionDefinition (PR #121777)

2025-01-06 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm ready_for_review https://github.com/llvm/llvm-project/pull/121777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME] Add diagnostics for SME attributes on lambda functions (PR #121777)

2025-01-07 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm edited https://github.com/llvm/llvm-project/pull/121777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME] Add diagnostics to CheckConstexprFunctionDefinition (PR #121777)

2025-01-07 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/121777 >From 00772b871de43a5e30aca2a65a89675117cafbf1 Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Tue, 31 Dec 2024 17:22:02 + Subject: [PATCH 1/3] [AArch64][SME] Add diagnostics to CheckConstexpr

[clang] [AArch64][SME] Add diagnostics to CheckConstexprFunctionDefinition (PR #121777)

2025-01-07 Thread Kerry McLaughlin via cfe-commits
@@ -1854,6 +1855,9 @@ bool Sema::CheckConstexprFunctionDefinition(const FunctionDecl *NewFD, } } + if (Context.getTargetInfo().getTriple().isAArch64()) +ARM().CheckSMEFunctionDefAttributes(NewFD); + kmclaughlin-arm wrote: Thanks, `ActOnStartOfLamb

[clang] [AArch64][SME] Add diagnostics to CheckConstexprFunctionDefinition (PR #121777)

2025-01-07 Thread Kerry McLaughlin via cfe-commits
@@ -1328,4 +1328,57 @@ void SemaARM::handleInterruptAttr(Decl *D, const ParsedAttr &AL) { ARMInterruptAttr(getASTContext(), AL, Kind)); } +// Check if the function definition uses any AArch64 SME features without +// having the '+sme' feature enabled and warn

[clang] [AArch64][SME] Add diagnostics to CheckConstexprFunctionDefinition (PR #121777)

2025-01-07 Thread Kerry McLaughlin via cfe-commits
@@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -std=c++23 -fsyntax-only -verify %s kmclaughlin-arm wrote: I think adding attributes to lambdas before the parameter li

[clang] [AArch64][SME] Add diagnostics for SME attributes on lambda functions (PR #121777)

2025-01-07 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm edited https://github.com/llvm/llvm-project/pull/121777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][Clang] Add support for __arm_agnostic("sme_za_state") (PR #121788)

2025-01-07 Thread Kerry McLaughlin via cfe-commits
kmclaughlin-arm wrote: Please can you also extend `mangleSMEAttrs` in ItaniumMangle.cpp to include the `__arm_agnostic` attribute? https://github.com/llvm/llvm-project/pull/121788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[clang] [llvm] [AArch64][SME] Disable inlining of callees with new ZT0 state (PR #121338)

2025-01-06 Thread Kerry McLaughlin via cfe-commits
kmclaughlin-arm wrote: > LGTM 👍 You could maybe add a test to > `clang/test/CodeGen/AArch64/sme-inline-callees-streaming-attrs.c` too (which > tests `flatten`/`always_inline` statements). Thanks for approving the changes! I did already add some tests to sme-inline-callees-streaming-attrs.c usi

[clang] [AArch64][SME] Add diagnostics for SME attributes on lambda functions (PR #121777)

2025-01-08 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm updated https://github.com/llvm/llvm-project/pull/121777 >From 00772b871de43a5e30aca2a65a89675117cafbf1 Mon Sep 17 00:00:00 2001 From: Kerry McLaughlin Date: Tue, 31 Dec 2024 17:22:02 + Subject: [PATCH 1/4] [AArch64][SME] Add diagnostics to CheckConstexpr

[clang] [AArch64][SME] Add diagnostics for SME attributes on lambda functions (PR #121777)

2025-01-10 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm closed https://github.com/llvm/llvm-project/pull/121777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][SME] Account for C++ lambdas in SME builtin diagnostics (PR #124750)

2025-01-28 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm approved this pull request. https://github.com/llvm/llvm-project/pull/124750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add AArch64 SME changes to the release notes (PR #122899)

2025-01-14 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm approved this pull request. https://github.com/llvm/llvm-project/pull/122899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][Clang] Add support for __arm_agnostic("sme_za_state") (PR #121788)

2025-01-10 Thread Kerry McLaughlin via cfe-commits
https://github.com/kmclaughlin-arm approved this pull request. https://github.com/llvm/llvm-project/pull/121788 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][Clang] Add support for __arm_agnostic("sme_za_state") (PR #121788)

2025-01-10 Thread Kerry McLaughlin via cfe-commits
@@ -7559,6 +7559,32 @@ The attributes ``__arm_in(S)``, ``__arm_out(S)``, ``__arm_inout(S)`` and }]; } +def ArmAgnosticDocs : Documentation { + let Category = DocCatArmSmeAttributes; + let Content = [{ +The ``__arm_agnostic`` keyword applies to prototyped function types an

<    1   2