[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-04-17 Thread Dinar Temirbulatov via cfe-commits
dtemirbulatov wrote: Reverted with 950bb097e11d6ee26533c00519c62df99438 https://github.com/llvm/llvm-project/pull/79842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-04-17 Thread Dinar Temirbulatov via cfe-commits
dtemirbulatov wrote: ok, Reverting now. https://github.com/llvm/llvm-project/pull/79842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-04-17 Thread via cfe-commits
bgra8 wrote: @dtemirbulatov could you please revert to green to unblock us and continue the investigation asynchronously? https://github.com/llvm/llvm-project/pull/79842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-04-17 Thread via cfe-commits
bgra8 wrote: @dtemirbulatov this patch causes `clang` to crash. Please revert. repro.cc: ``` typedef __SVFloat32_t a; #pragma clang attribute push(__attribute__((target("+sve"))), \ apply_to = function) template struct b { using c = int; };

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-04-10 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov closed https://github.com/llvm/llvm-project/pull/79842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-28 Thread Dinar Temirbulatov via cfe-commits
@@ -3717,6 +3717,16 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-28 Thread Dinar Temirbulatov via cfe-commits
@@ -1390,6 +1390,9 @@ def MultiGPU: DiagGroup<"multi-gpu">; // libc and the CRT to be skipped. def AVRRtlibLinkingQuirks : DiagGroup<"avr-rtlib-linking-quirks">; +// A warning group AArch64 related to SME function attribues. dtemirbulatov wrote: Done.

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-25 Thread Sander de Smalen via cfe-commits
@@ -3717,6 +3717,16 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-25 Thread Sander de Smalen via cfe-commits
@@ -1390,6 +1390,9 @@ def MultiGPU: DiagGroup<"multi-gpu">; // libc and the CRT to be skipped. def AVRRtlibLinkingQuirks : DiagGroup<"avr-rtlib-linking-quirks">; +// A warning group AArch64 related to SME function attribues. sdesmalen-arm wrote: nit: Sorry,

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-25 Thread Sander de Smalen via cfe-commits
@@ -7516,28 +7516,23 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } -auto *CallerFD = dyn_cast(CurContext); -bool IsCalleeStreaming = -(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); -bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Dinar Temirbulatov via cfe-commits
@@ -3723,8 +3723,8 @@ def warn_sme_streaming_pass_return_vl_to_non_streaming : Warning< " different">, InGroup, DefaultIgnore; def warn_sme_locally_streaming_has_vl_args_returns : Warning< - "passing/returning a VL-dependent argument from a function" - "

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Dinar Temirbulatov via cfe-commits
@@ -7516,28 +7516,23 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } -auto *CallerFD = dyn_cast(CurContext); -bool IsCalleeStreaming = -(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); -bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,30 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); +bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,30 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); +bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,30 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); dtemirbulatov wrote: Done. https://github.com/llvm/llvm-project/pull/79842

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,30 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); +bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Sander de Smalen via cfe-commits
@@ -7516,28 +7516,23 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } -auto *CallerFD = dyn_cast(CurContext); -bool IsCalleeStreaming = -(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); -bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Sander de Smalen via cfe-commits
@@ -3723,8 +3723,8 @@ def warn_sme_streaming_pass_return_vl_to_non_streaming : Warning< " different">, InGroup, DefaultIgnore; def warn_sme_locally_streaming_has_vl_args_returns : Warning< - "passing/returning a VL-dependent argument from a function" - "

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,30 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); +bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,30 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); +bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,30 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask);

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Dinar Temirbulatov via cfe-commits
@@ -3717,6 +3717,16 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,30 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); +bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,30 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); +bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,30 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); +bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,30 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask);

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,30 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); sdesmalen-arm wrote: nit: move this closer to its use, preferably wrap the condition, e.g. ``` if (auto

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,30 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); +bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,30 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); +bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm commented: Thanks for the update. I just left a few more suggestions to clean up the code a bit. https://github.com/llvm/llvm-project/pull/79842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Sander de Smalen via cfe-commits
https://github.com/sdesmalen-arm edited https://github.com/llvm/llvm-project/pull/79842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-19 Thread Sander de Smalen via cfe-commits
@@ -3717,6 +3717,16 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-15 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/79842 >From af323998a63a72f569d543cf5167d5d28e784682 Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Mon, 29 Jan 2024 14:43:13 + Subject: [PATCH 01/10] [Clang][AArch64] Warn when calling

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-13 Thread Dinar Temirbulatov via cfe-commits
@@ -7531,19 +7531,15 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, // vector lengths may be different. if (CallerFD && Context.getTargetInfo().hasFeature("sme") && !IsBuiltin) { ArmStreamingType CallerFnType =

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-13 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/79842 >From af323998a63a72f569d543cf5167d5d28e784682 Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Mon, 29 Jan 2024 14:43:13 + Subject: [PATCH 1/9] [Clang][AArch64] Warn when calling

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-04 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,36 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); +bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-04 Thread Sander de Smalen via cfe-commits
@@ -7531,19 +7531,15 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, // vector lengths may be different. if (CallerFD && Context.getTargetInfo().hasFeature("sme") && !IsBuiltin) { ArmStreamingType CallerFnType =

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-04 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/79842 >From af323998a63a72f569d543cf5167d5d28e784682 Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Mon, 29 Jan 2024 14:43:13 + Subject: [PATCH 1/8] [Clang][AArch64] Warn when calling

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-04 Thread Dinar Temirbulatov via cfe-commits
@@ -12230,12 +12230,22 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, } // Check if the function definition uses any AArch64 SME features without - // having the '+sme' feature enabled. + // having the '+sme' feature enabled and warn user if sme

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-04 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,36 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); +bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-03-04 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,36 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); +bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-29 Thread Sander de Smalen via cfe-commits
@@ -3717,6 +3717,16 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-29 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,36 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); +bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-29 Thread Sander de Smalen via cfe-commits
@@ -12230,12 +12230,22 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, } // Check if the function definition uses any AArch64 SME features without - // having the '+sme' feature enabled. + // having the '+sme' feature enabled and warn user if sme

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-29 Thread Sander de Smalen via cfe-commits
@@ -3717,6 +3717,16 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-29 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,36 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = +(ExtInfo.AArch64SMEAttributes & FunctionType::SME_PStateSMEnabledMask); +bool

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-15 Thread Dinar Temirbulatov via cfe-commits
@@ -12239,7 +12239,8 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, if (UsesSM) { dtemirbulatov wrote: Done. https://github.com/llvm/llvm-project/pull/79842 ___ cfe-commits mailing list

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-15 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/79842 >From af323998a63a72f569d543cf5167d5d28e784682 Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Mon, 29 Jan 2024 14:43:13 + Subject: [PATCH 1/7] [Clang][AArch64] Warn when calling

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-15 Thread Dinar Temirbulatov via cfe-commits
@@ -7517,34 +7517,37 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } auto *CallerFD = dyn_cast(CurContext); -if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && -!FD->getBuiltinID()) { +bool IsCalleeStreaming

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-15 Thread Dinar Temirbulatov via cfe-commits
@@ -12236,6 +12236,23 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, bool UsesSM = NewFD->hasAttr(); bool UsesZA = Attr && Attr->isNewZA(); bool UsesZT0 = Attr && Attr->isNewZT0(); + +if (UsesSM) { + if

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-15 Thread Dinar Temirbulatov via cfe-commits
@@ -12236,6 +12236,23 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, bool UsesSM = NewFD->hasAttr(); bool UsesZA = Attr && Attr->isNewZA(); bool UsesZT0 = Attr && Attr->isNewZT0(); + +if (UsesSM) { + if

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-15 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,41 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = ((ExtInfo.AArch64SMEAttributes & +

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-15 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,41 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = ((ExtInfo.AArch64SMEAttributes & +

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-15 Thread Dinar Temirbulatov via cfe-commits
@@ -3717,6 +3717,14 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-15 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/79842 >From af323998a63a72f569d543cf5167d5d28e784682 Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Mon, 29 Jan 2024 14:43:13 + Subject: [PATCH 1/6] [Clang][AArch64] Warn when calling

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,41 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = ((ExtInfo.AArch64SMEAttributes & +

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -12239,7 +12239,8 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, if (UsesSM) { sdesmalen-arm wrote: The comment on line 12232-12233 needs an update. https://github.com/llvm/llvm-project/pull/79842

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -12236,6 +12236,23 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, bool UsesSM = NewFD->hasAttr(); bool UsesZA = Attr && Attr->isNewZA(); bool UsesZT0 = Attr && Attr->isNewZT0(); + +if (UsesSM) { + if

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -445,3 +448,54 @@ void conflicting_state_attrs_preserves_out_zt0(void) __arm_preserves("zt0") __ar // expected-cpp-error@+2 {{conflicting attributes for state 'zt0'}} // expected-error@+1 {{conflicting attributes for state 'zt0'}} void

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -12236,6 +12236,23 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, bool UsesSM = NewFD->hasAttr(); bool UsesZA = Attr && Attr->isNewZA(); bool UsesZT0 = Attr && Attr->isNewZT0(); + +if (UsesSM) { + if

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,41 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +bool IsCalleeStreaming = ((ExtInfo.AArch64SMEAttributes & +

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -3717,6 +3717,14 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-14 Thread Sander de Smalen via cfe-commits
@@ -7517,34 +7517,37 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } auto *CallerFD = dyn_cast(CurContext); -if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && -!FD->getBuiltinID()) { +bool IsCalleeStreaming

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
@@ -445,3 +448,54 @@ void conflicting_state_attrs_preserves_out_zt0(void) __arm_preserves("zt0") __ar // expected-cpp-error@+2 {{conflicting attributes for state 'zt0'}} // expected-error@+1 {{conflicting attributes for state 'zt0'}} void

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
@@ -3717,6 +3717,30 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
@@ -3717,6 +3717,30 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,38 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && +!FD->getBuiltinID()) { + // If the

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,38 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && dtemirbulatov wrote: Done.

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-12 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/79842 >From af323998a63a72f569d543cf5167d5d28e784682 Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Mon, 29 Jan 2024 14:43:13 + Subject: [PATCH 1/5] [Clang][AArch64] Warn when calling

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-09 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,38 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && sdesmalen-arm wrote: This code

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-09 Thread Sander de Smalen via cfe-commits
@@ -445,3 +448,54 @@ void conflicting_state_attrs_preserves_out_zt0(void) __arm_preserves("zt0") __ar // expected-cpp-error@+2 {{conflicting attributes for state 'zt0'}} // expected-error@+1 {{conflicting attributes for state 'zt0'}} void

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-09 Thread Sander de Smalen via cfe-commits
@@ -3717,6 +3717,30 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-09 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,38 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && +!FD->getBuiltinID()) { + // If the

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-09 Thread Sander de Smalen via cfe-commits
@@ -3717,6 +3717,30 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-08 Thread Dinar Temirbulatov via cfe-commits
@@ -3717,6 +3717,30 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-08 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/79842 >From af323998a63a72f569d543cf5167d5d28e784682 Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Mon, 29 Jan 2024 14:43:13 + Subject: [PATCH 1/4] [Clang][AArch64] Warn when calling

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-08 Thread Sander de Smalen via cfe-commits
@@ -3717,6 +3717,30 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-07 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,44 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && +!FD->getBuiltinID()) { + // If the

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-07 Thread Dinar Temirbulatov via cfe-commits
@@ -7513,6 +7516,44 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && +!FD->getBuiltinID()) { + // If the

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-07 Thread Dinar Temirbulatov via cfe-commits
@@ -1,5 +1,6 @@ -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -fsyntax-only -verify %s -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -fsyntax-only -verify=expected-cpp -x c++ %s +// RUN: %clang_cc1 -triple

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-07 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/79842 >From af323998a63a72f569d543cf5167d5d28e784682 Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Mon, 29 Jan 2024 14:43:13 + Subject: [PATCH 1/3] [Clang][AArch64] Warn when calling

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-07 Thread Dinar Temirbulatov via cfe-commits
@@ -3717,6 +3717,30 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-06 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov edited https://github.com/llvm/llvm-project/pull/79842 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-06 Thread Dinar Temirbulatov via cfe-commits
@@ -1,5 +1,6 @@ -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -fsyntax-only -verify %s -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -fsyntax-only -verify=expected-cpp -x c++ %s +// RUN: %clang_cc1 -triple

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-02 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,44 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && +!FD->getBuiltinID()) { + // If the

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-02 Thread Sander de Smalen via cfe-commits
@@ -1,5 +1,6 @@ -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -fsyntax-only -verify %s -// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sme -fsyntax-only -verify=expected-cpp -x c++ %s +// RUN: %clang_cc1 -triple

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-02 Thread Sander de Smalen via cfe-commits
@@ -7513,6 +7516,44 @@ void Sema::checkCall(NamedDecl *FDecl, const FunctionProtoType *Proto, } } +auto *CallerFD = dyn_cast(CurContext); +if (FD && CallerFD && Context.getTargetInfo().hasFeature("sme") && +!FD->getBuiltinID()) { + // If the

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-02-02 Thread Sander de Smalen via cfe-commits
@@ -3717,6 +3717,30 @@ def err_sme_definition_using_za_in_non_sme_target : Error< "function using ZA state requires 'sme'">; def err_sme_definition_using_zt0_in_non_sme2_target : Error< "function using ZT0 state requires 'sme2'">; +def

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-01-30 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov updated https://github.com/llvm/llvm-project/pull/79842 >From af323998a63a72f569d543cf5167d5d28e784682 Mon Sep 17 00:00:00 2001 From: Dinar Temirbulatov Date: Mon, 29 Jan 2024 14:43:13 + Subject: [PATCH 1/2] [Clang][AArch64] Warn when calling

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-01-29 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dinar Temirbulatov (dtemirbulatov) Changes …or size might be different. The compiler doesn't know in advance if the streaming and non-streaming vector-lengths are different, so it should be safe to give a warning diagnostic to warn the

[clang] [Clang][AArch64] Warn when calling streaming/non-streaming about vect… (PR #79842)

2024-01-29 Thread Dinar Temirbulatov via cfe-commits
https://github.com/dtemirbulatov created https://github.com/llvm/llvm-project/pull/79842 …or size might be different. The compiler doesn't know in advance if the streaming and non-streaming vector-lengths are different, so it should be safe to give a warning diagnostic to warn the user about