[PATCH] D157270: [Clang][AArch64] Add diagnostic for calls from non-ZA to shared-ZA functions.

2023-08-07 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/test/Sema/aarch64-sme-func-attrs.c:181 +void non_za_definition(void) { + sme_arm_new_za(); // OK sdesmalen wrote: > rsandifo-arm wrote: > > sdesmalen wrote: > > > rsandifo-arm wrote: > > > > Would be good

[PATCH] D157269: [Clang][AArch64] Diagnostics for SME attributes when target doesn't have 'sme'

2023-08-07 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/test/Sema/aarch64-sme-func-attrs-without-target-feature.cpp:20 + +// No code is generated for declarations, so it should be fine to declare using the attribute. +void streaming_compatible_decl() __arm_streaming_compatible;

[PATCH] D157269: [Clang][AArch64] Diagnostics for SME attributes when target doesn't have 'sme'

2023-08-07 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. LGTM in terms of intent. Comment at: clang/lib/Sema/SemaDecl.cpp:12092 + diag::err_sme_definition_using_sm_in_non_sme_target); +if (UsesZA) + Diag(NewFD->getLocation(), Suggest making this an `else

[PATCH] D157270: [Clang][AArch64] Add diagnostic for calls from non-ZA to shared-ZA functions.

2023-08-07 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/test/Sema/aarch64-sme-func-attrs.c:181 +void non_za_definition(void) { + sme_arm_new_za(); // OK sdesmalen wrote: > rsandifo-arm wrote: > > Would be good to have some tests for indirect function calls too

[PATCH] D127762: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-08-07 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm accepted this revision. rsandifo-arm added a comment. LGTM too, thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127762/new/ https://reviews.llvm.org/D127762 ___ cfe-commits mailing

[PATCH] D157270: [Clang][AArch64] Add diagnostic for calls from non-ZA to shared-ZA functions.

2023-08-07 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:6737 +else if (const auto *FPT = CallerFD->getType()->getAs()) + CallerHasZAState |= FPT->getExtProtoInfo().AArch64SMEAttributes & +

[PATCH] D157269: [Clang][AArch64] Diagnostics for SME attributes when target doesn't have 'sme'

2023-08-07 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. The intent looks good to me, but I'm not in a position to approve. Very pedantic, sorry, but on the description, I think: > Calls from non-streaming functions to streaming-functions require the > compiler to enable/disable streaming-SVE mode around the call-site.

[PATCH] D139028: [RFC][clang] Add attribute-like keywords

2023-08-07 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm abandoned this revision. rsandifo-arm added a comment. Superceded by D148700 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139028/new/ https://reviews.llvm.org/D139028

[PATCH] D127762: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-08-03 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Thanks for dropping the attribute requirements down to TargetAArch64. But the offsetting requirement was that something somewhere (CodeGen?) must raise an error if code requires SME and SME isn't present. I think that means: 1. SME is not enabled for an

[PATCH] D127762: [Clang][AArch64] Add/implement ACLE keywords for SME.

2023-08-02 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Mostly LGTM from a spec POV, but some comments below. Comment at: clang/include/clang/Basic/Attr.td:2439 def ArmStreaming : TypeAttr, TargetSpecificAttr { let Spellings = [RegularKeyword<"__arm_streaming">]; In current main,

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-06-13 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Hi @jyknight , @rsmith Do you have any more thoughts on the above? Quick version is: 1. Is it OK to have `[[…]]` attributes in the `arm` namespace that affect semantics? 2. Is it OK to raise an error for unrecognised attributes in the `arm` namespace (for a

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-06-07 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D148700#4401451 , @rsmith wrote: > In D148700#4401353 , @jyknight > wrote: > >> Yes, standard attributes aren't supposed to be used for things which affect >> the type system

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-31 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang-tools-extra/pseudo/lib/grammar/CMakeLists.txt:5 -# Dependencies should be minimal to avoid long dep paths in the build graph. -# It does use clangBasic headers (tok::TokenKind), but linking is not needed. -# We have no

[PATCH] D148702: [clang] Add Parse and Sema support for RegularKeyword attributes

2023-05-31 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG33ee5c466346: [clang] Add Parse and Sema support for RegularKeyword attributes (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-31 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG301eb6b68f30: [clang] Add support for “regular” keyword attributes (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D148699: [clang] Mark keywords that have their own parsing rules

2023-05-31 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGac5c996d5aaa: [clang] Mark keywords that have their own parsing rules (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148699/new/

[PATCH] D148699: [clang] Mark keywords that have their own parsing rules

2023-05-31 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 526944. rsandifo-arm added a comment. Update base commit. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148699/new/ https://reviews.llvm.org/D148699 Files: clang/include/clang/Basic/Attr.td Index:

[PATCH] D148702: [clang] Add Parse and Sema support for RegularKeyword attributes

2023-05-31 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 526936. rsandifo-arm marked an inline comment as done. rsandifo-arm added a comment. Rebase to account for a diagnostic that has moved. No other changes from the previous version. I'll wait for the build results before pushing. Thanks for the review!

[PATCH] D148702: [clang] Add Parse and Sema support for RegularKeyword attributes

2023-05-30 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked an inline comment as done. rsandifo-arm added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:2902 S.Diag(AL.getRange().getBegin(), diag::err_attribute_wrong_decl_type) -<< AL << ExpectedTypeOrNamespace; +<< AL << 0 <<

[PATCH] D148702: [clang] Add Parse and Sema support for RegularKeyword attributes

2023-05-30 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 526600. rsandifo-arm added a comment. Avoid most uses of `<< 0`. Add comments to those that remain. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148702/new/ https://reviews.llvm.org/D148702 Files:

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-25 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Thanks @aaron.ballman and @erichkeane for your patience in reviewing the patch and steering me in the right direction. What do you think about the other two patches in the series: - https://reviews.llvm.org/D148699 (comes before this one) -

[PATCH] D148702: [clang] Add Parse and Sema support for RegularKeyword attributes

2023-05-23 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 524846. rsandifo-arm marked an inline comment as done. rsandifo-arm added a comment. Update onto current main. Only change is to replace C++2b with C++23. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-23 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked an inline comment as done. rsandifo-arm added a comment. In D148700#4364229 , @aaron.ballman wrote: > This basically LGTM, but we should add documentation to the internals manual > too:

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-23 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 524843. rsandifo-arm added a comment. Add internals documentation. Add FIXME to temporary code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148700/new/ https://reviews.llvm.org/D148700 Files:

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-23 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Hi @erichkeane and @aaron.ballman. Does the updated patch look OK? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148700/new/ https://reviews.llvm.org/D148700 ___

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-16 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked an inline comment as done. rsandifo-arm added a comment. Thanks @erichkeane . Adding the documentation with that kind of disclaimer sounds good to me. I've done that in the updated version, and also fixed the comment problem that Aaron pointed out. Repository: rG LLVM

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-16 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 522703. rsandifo-arm added a comment. Add documentation. Fix a comment cut-&-pasto that Aaron pointed out. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148700/new/ https://reviews.llvm.org/D148700

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-16 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Hi @aaron.ballman and @erichkeane . Do you have any more thoughts on this? In principle, I'm happy to convert an existing attribute over to the new scheme, but in practice, I can't find one that seems to be suitable. If we're going to do that, I think I'll need

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-10 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a subscriber: sdesmalen. rsandifo-arm added a comment. Thanks for the review. Comment at: clang/include/clang/Basic/Attr.td:2427-2430 +def ArmStreaming : TypeAttr, TargetSpecificAttr { + let Spellings = [RegularKeyword<"__arm_streaming">]; + let

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-05-09 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked an inline comment as done. rsandifo-arm added a comment. In D148700#4280833 , @erichkeane wrote: > Generally ok with all of this, but want some time to think about it/give > aaron/etc time to see it. Hi @erichkeane & @aaron.ballman

[PATCH] D149148: [Sema] Fix _Alignas/isCXX11Attribute() FIXME

2023-04-26 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG5794ea421a0d: [Sema] Fix _Alignas/isCXX11Attribute() FIXME (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D149148: [Sema] Fix _Alignas/isCXX11Attribute() FIXME

2023-04-25 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added a reviewer: erichkeane. Herald added a reviewer: aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When doing

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked an inline comment as done. rsandifo-arm added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.def:751 +// Keywords defined by Attr.td. +#define KEYWORD_ATTRIBUTE(X) KEYWORD(X, KEYALL) +#include "clang/Basic/AttrTokenKinds.inc"

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 515033. rsandifo-arm marked an inline comment as done. rsandifo-arm added a comment. Add #ifndef guard. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148700/new/ https://reviews.llvm.org/D148700 Files:

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked an inline comment as done. rsandifo-arm added inline comments. Comment at: clang/include/clang/Basic/TokenKinds.h:106 +#include "clang/Basic/AttrTokenKinds.inc" +#undef KEYWORD + ); erichkeane wrote: > Does AttrTokenKinds.inc not do this

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 514993. rsandifo-arm added a comment. Make AttrTokenKinds.inc use a new KEYWORD_ATTRIBUTE macro, rather than using KEYWORD directly. Move the #undef to the .inc file. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148702: [clang] Add Parse and Sema support for RegularKeyword attributes

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm marked an inline comment as done. rsandifo-arm added a comment. Thanks for the reviews! In D148702#4280392 , @erichkeane wrote: > So I don't mind the changes in this stack, though this doing a little bit of > a 'backdoor' way of getting

[PATCH] D148699: [clang] Mark keywords that have their own parsing rules

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. See https://reviews.llvm.org/D139028 for previous discussion on this topic. https://reviews.llvm.org/D148700 contains the Attr.td support (and the main rationale) while https://reviews.llvm.org/D148702 contains the main Parse & Sema support. Repository: rG

[PATCH] D148702: [clang] Add Parse and Sema support for RegularKeyword attributes

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added subscribers: jdoerfert, kristof.beyls, dschuff. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added a

[PATCH] D148700: [clang] Add support for “regular” keyword attributes

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added subscribers: kristof.beyls, dschuff. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald added projects: clang,

[PATCH] D148699: [clang] Mark keywords that have their own parsing rules

2023-04-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch retroactively classified all existing keyword

[PATCH] D148148: [clang] Bump AS_GNU to 1

2023-04-13 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG053bdb77b0ce: [clang] Bump AS_GNU to 1 (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148105: [clang] Fix FIXME in isAlignasAttribute()

2023-04-13 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbd41371be02f: [clang] Fix FIXME in isAlignasAttribute() (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148105/new/

[PATCH] D148104: [clang] Type safety tweak for AttributeCommonInfo::Form

2023-04-13 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGaec3f951bf36: [clang] Type safety tweak for AttributeCommonInfo::Form (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148104/new/

[PATCH] D148103: [clang] Allow attributes to be constructed from keyword tokens

2023-04-13 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG265d87e46535: [clang] Allow attributes to be constructed from keyword tokens (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148102: [clang] Specify attribute syntax & spelling with a single argument

2023-04-13 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb6d4d51f8f5a: [clang] Specify attribute syntax spelling with a single argument (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148101: [clang] Ensure that Attr::Create(Implicit) chooses a valid syntax

2023-04-13 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe841d5092634: [clang] Ensure that Attr::Create(Implicit) chooses a valid syntax (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148102: [clang] Specify attribute syntax & spelling with a single argument

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 512993. rsandifo-arm added a comment. Tweak initializer to avoid an MSVC error: https://godbolt.org/z/sMxsW8G8j Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D148102/new/ https://reviews.llvm.org/D148102

[PATCH] D148148: [clang] Bump AS_GNU to 1

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 512947. rsandifo-arm added a comment. Gah, sorry. Due to a botched git operation, I posted a first cut with a stupid typo, rather than the version that passed testing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D148148: [clang] Bump AS_GNU to 1

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/include/clang/Basic/AttributeCommonInfo.h:135 AttributeCommonInfo(const IdentifierInfo *AttrName, const IdentifierInfo *ScopeName, SourceRange AttrRange, erichkeane wrote: > Did

[PATCH] D148101: [clang] Ensure that Attr::Create(Implicit) chooses a valid syntax

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/include/clang/Basic/AttributeCommonInfo.h:55 + +/// The attibute has no source code manifestation and is only created +/// implicitly. erichkeane wrote: > If I recall, there was some pretty awful

[PATCH] D148148: [clang] Bump AS_GNU to 1

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Following a suggestion from Erich in

[PATCH] D148105: [clang] Fix FIXME in isAlignasAttribute()

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. FWIW, the original reason for looking at this was to explore ways of removing `AS_AttributeLikeKeyword` from https://reviews.llvm.org/D139028 . I wanted to find a way of conveying extra information about a spelling without having to change the existing enums. It

[PATCH] D148105: [clang] Fix FIXME in isAlignasAttribute()

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. AttributeCommonInfo::isAlignasAttribute() was used in

[PATCH] D148104: [clang] Type safety tweak for AttributeCommonInfo::Form

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds static functions for constructing most

[PATCH] D148103: [clang] Allow attributes to be constructed from keyword tokens

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds an extra AttributeCommonInfo::Form

[PATCH] D148102: [clang] Specify attribute syntax & spelling with a single argument

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added a subscriber: martong. Herald added a reviewer: shafik. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber:

[PATCH] D148101: [clang] Ensure that Attr::Create(Implicit) chooses a valid syntax

2023-04-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: erichkeane, aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The purpose of this patch and follow-on patches is to

[PATCH] D147661: [Sema] Tweak merging of availability attributes

2023-04-10 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. > I threw together a patch to make the constructors `explicit` and the only two > compile failures I have are with what you're fixing in this patch. If you'd > like, I can commandeer this patch and subsume it with the larger refactor. > Alternatively, we can land

[PATCH] D147661: [Sema] Tweak merging of availability attributes

2023-04-06 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D147661#4249004 , @erichkeane wrote: > This test doesn't show a change in behavior. Yeah. Is there a way to force the syntax and spelling fields to be dumped, even for implicit attributes? I was struggling to find

[PATCH] D147661: [Sema] Tweak merging of availability attributes

2023-04-06 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D147661#4248574 , @erichkeane wrote: > I think the change is probably fine, Thanks! > but can you add an AST-dump test for this one? Sure. How does this look? Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D147661: [Sema] Tweak merging of availability attributes

2023-04-06 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 511425. rsandifo-arm added a comment. Add AST dump test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D147661/new/ https://reviews.llvm.org/D147661 Files: clang/lib/Sema/SemaDeclAttr.cpp

[PATCH] D147657: [Sema] Fix reporting of invalid shader attribute on HLSL entry function

2023-04-06 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG03a9a1e664de: [Sema] Fix reporting of invalid shader attribute on HLSL entry function (authored by rsandifo-arm). Repository: rG LLVM Github

[PATCH] D147661: [Sema] Tweak merging of availability attributes

2023-04-05 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: arphaman, erichkeane. Herald added a reviewer: aaron.ballman. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Two calls to

[PATCH] D147657: [Sema] Fix reporting of invalid shader attribute on HLSL entry function

2023-04-05 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. rsandifo-arm added reviewers: python3kgae, erichkeane. Herald added a subscriber: Anastasia. Herald added a project: All. rsandifo-arm requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. If the HLSL entry

[PATCH] D139028: [RFC][clang] Add attribute-like keywords

2023-02-28 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Thanks @aaron.ballman and @erichkeane for the comments. I'll split it into stages and use tablegen more, like you say. In D139028#4150761 , @aaron.ballman wrote: > One thing that might also help is to split this into a

[PATCH] D139028: [RFC][clang] Add attribute-like keywords

2023-01-25 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Ping. If this approach is acceptable, I think we could use it for future ACLE features too (rather than the GNU attributes that we've used previously). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139028/new/

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2023-01-04 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D127762#4023803 , @aaron.ballman wrote: > In D127762#3960906 , @rsandifo-arm > wrote: > >> Thanks @aaron.ballman for the feedback about spellings. I've gone with the >>

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-11-30 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Thanks @aaron.ballman for the feedback about spellings. I've gone with the lower-case names like `__arm_streaming` in what follows, as a plausible strawman. My main concern with keywords is: > This approach means there's plenty of flexibility available to parse

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-11-22 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2000 "overridden virtual function is here">; +def err_conflicting_overriding_attributes : Error< + "virtual function %0 has different attributes " aaron.ballman

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-11-16 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2000 "overridden virtual function is here">; +def err_conflicting_overriding_attributes : Error< + "virtual function %0 has different attributes " rsandifo-arm

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-11-16 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2000 "overridden virtual function is here">; +def err_conflicting_overriding_attributes : Error< + "virtual function %0 has different attributes " aaron.ballman

[PATCH] D127762: [Clang][AArch64] Add ACLE attributes for SME.

2022-10-28 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2000 "overridden virtual function is here">; +def err_conflicting_overriding_attributes : Error< + "virtual function %0 has different attributes " sdesmalen

[PATCH] D134681: [Clang][AArch64] Add SME outer product intrinsics

2022-10-14 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Thanks for the patch. This is going to be inconvenient, sorry, but: while implementing the specification in GCC, I noticed that the ZA functions weren't consistent about whether they had an `_m` suffix. `svwrite` (MOVA) had one, but the MOP intrinsics that

[PATCH] D113779: [Clang] Add mfp16, mfp16fml and mdotprod flags for ARM target features.

2022-09-08 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. I can see at least three ways of handling this: 1. @paulwalker-arm's suggestion to allow `-march=` without a base architecture (or with a dummy base architecture that means “no change”) 2. a single new option `-mfoo=` that applies on top of `-march` and can be used

[PATCH] D129135: [doc][ReleaseNotes] Document AArch64 SVE ABI fix from D127209

2022-07-05 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/docs/ReleaseNotes.rst:503 +- Targeting AArch64, since D127209 LLVM now only preserves the z8-z23 + and p4-p15 registers across a call if the registers z0-z7 or p0-p4 are + used to pass data into or out of a subroutine. The

[PATCH] D129135: [doc][ReleaseNotes] Document AArch64 SVE ABI fix from D127209

2022-07-05 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/docs/ReleaseNotes.rst:503 +- Targeting AArch64, LLVM now only preserves the z8-z23 registers across + a call if the registers z0-z7 are used to pass data into or out of a + subroutine. This new behavior now matches the

[PATCH] D103603: [Sema][RISCV] Allow ?: to select Typedef BuiltinType in C

2021-06-03 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Thanks for the fix. I agree this is the right behaviour FWIW. I held off approving it in case there's another idiom that's preferred when comparing canonical types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D77056: [Sema] Allow non-member operators for sizeless SVE types

2021-01-11 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D77056#2487754 , @rsmith wrote: > In D77056#2465936 , @rsandifo-arm > wrote: > >> Either way, I realise this isn't great style. It just seems like a >> practical compromise

[PATCH] D77056: [Sema] Allow non-member operators for sizeless SVE types

2021-01-08 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Ping. Also, please let me know if the response above doesn't answer the concerns and if you'd like more info/justification. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77056/new/ https://reviews.llvm.org/D77056

[PATCH] D77056: [Sema] Allow non-member operators for sizeless SVE types

2020-12-21 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Thanks for the reviews. In D77056#2463959 , @rsmith wrote: > That said, I'm concerned that the design of this feature will severely limit > its utility. For classes and enums, operators are typically defined in an >

[PATCH] D77056: [Sema] Allow non-member operators for sizeless SVE types

2020-12-18 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Herald added a subscriber: NickHung. Ping. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77056/new/ https://reviews.llvm.org/D77056 ___ cfe-commits mailing list

[PATCH] D92222: [Sema] Make more overload candidate types use iterator_ranges (NFC)

2020-12-07 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfd14a2753368: [Sema] Make more overload candidate types use iterator_ranges (NFC) (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D77056: [Sema] Allow non-member operators for sizeless SVE types

2020-11-27 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. Sorry for reviving this after so long, but I'd like to bump it from an RFC to an RFA. As the new covering message says, the spec is now part of the ACLE specification. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D77056: [Sema][SVE] Allow non-member operators for SVE types

2020-11-27 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm updated this revision to Diff 308073. rsandifo-arm added a comment. Rebase onto current trunk, and also on top of: https://reviews.llvm.org/D9 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77056/new/

[PATCH] D92222: [Sema] Make more overload candidate types use iterator_ranges (NFC)

2020-11-27 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. rsandifo-arm requested review of this revision. I have a patch that adds another group of candidate types to BuiltinCandidateTypeSet. Currently two styles are in use: the older begin/end

[PATCH] D62962: Clang implementation of sizeless types

2020-11-27 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm abandoned this revision. rsandifo-arm added a comment. Was superceded by later revisions, but I forgot to close this one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62962/new/ https://reviews.llvm.org/D62962

[PATCH] D62961: [AST] Add new Type queries for sizeless types

2020-11-27 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm abandoned this revision. rsandifo-arm added a comment. Was superceded by later revisions, but I forgot to close this one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62961/new/ https://reviews.llvm.org/D62961

[PATCH] D79584: [SVE] Add a couple of extra sizeless type tests

2020-11-27 Thread Richard Sandiford via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa2d561f1a336: [SVE] Add a couple of extra sizeless type tests (authored by rsandifo-arm). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D79584/new/

[PATCH] D90956: [clang][SVE] Activate macro `__ARM_FEATURE_SVE_VECTOR_OPERATORS`.

2020-11-11 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. The tests look good to me FWIW. The Sema side is already covered by `Sema/attr-arm-sve-vector-bits.c` and the patch seems to test for the important ABI bits. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90956/new/

[PATCH] D86065: [SVE] Make ElementCount members private

2020-08-28 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. In D86065#2241146 , @david-arm wrote: > Hi @ctetreau, ok for now I'm going to completely remove the operators and > revert the code using those operators to how it was before. I'm not sure what > you mean about the

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-21 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/docs/LanguageExtensions.rst:492 + +The memory representation of a boolean vector is the smallest fitting +power-of-two integer. The alignment is the alignment of that integer type. This simoll wrote: >

[PATCH] D85736: [Sema][AArch64] Support arm_sve_vector_bits attribute

2020-08-20 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. LGTM from a spec point of view, but I don't think I should be the one to approve. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85736/new/ https://reviews.llvm.org/D85736 ___ cfe-commits mailing list

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-20 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a comment. I'm not qualified to review the CodeGen stuff (or accept the patch, obvs. :-)) but FWIW, here are some comments on the doc and Sema side. It might be good to have more Sema tests for valid and invalid usage, e.g. for which operators are valid and which aren't.

[PATCH] D86101: [AArch64][SVE] Add missing debug info for ACLE types.

2020-08-19 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:748 + llvm::DINodeArray SubscriptArray = DBuilder.getOrCreateArray(Subscript); + llvm::DIType *ElemTy = + getOrCreateType(Info.ElementType, TheCU->getFile()); I

[PATCH] D85736: [Sema][AArch64] Support arm_sve_vector_bits attribute

2020-08-12 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/include/clang/AST/Type.h:1897 + /// 'arm_sve_vector_bits' type attribute as VectorType. + QualType getFixedLengthSveEltType(const ASTContext ) const; + It feels to me like the information is more general

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-04 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/docs/LanguageExtensions.rst:473 +architectures. The size parameter of a boolean vector type is the number of +bits in the vector (for all non-bool vectors, the number refers to the number +of bytes in the vector).

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-04 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/docs/LanguageExtensions.rst:473 +architectures. The size parameter of a boolean vector type is the number of +bits in the vector (for all non-bool vectors, the number refers to the number +of bytes in the vector).

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-08-04 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added inline comments. Comment at: clang/docs/LanguageExtensions.rst:473 +architectures. The size parameter of a boolean vector type is the number of +bits in the vector (for all non-bool vectors, the number refers to the number +of bytes in the vector).

[PATCH] D81083: [Clang] Allow "vector_size" applied to Booleans

2020-07-31 Thread Richard Sandiford via Phabricator via cfe-commits
rsandifo-arm added a subscriber: lenary. rsandifo-arm added inline comments. Comment at: clang/docs/LanguageExtensions.rst:473 +architectures. The size parameter of a boolean vector type is the number of +bits in the vector (for all non-bool vectors, the number refers to the

  1   2   3   >