-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include SME attributes in the name mangling of types #290
Closed
kmclaughlin-arm
wants to merge
5
commits into
ARM-software:main
from
kmclaughlin-arm:sme-type-mangling
Closed
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0d1959b
Include SME attributes in the name mangling of types
kmclaughlin-arm 44e8a55
Fix errors from check-rst-syntax
kmclaughlin-arm 55f3e6d
- Remove suffix representing SME attributes and instead describe mang…
kmclaughlin-arm d71f379
- Removed separate values for preserves ZA & ZT0 as these are also ZA…
kmclaughlin-arm 0495b41
- Corrections to example name manglings
kmclaughlin-arm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding suffixes like this would conflict with the existing mangling scheme for types. E.g.
sm
would normally indicate an extrashort
argument followed by an extraunsigned long
argument (spec):I wondered whether we could use a vendor-specific qualifier (
U…
), but function argument types are understandably mangled without a qualifier. (For example, there is no difference betweenf(const int)
andf(int)
.)For
__attribute__((arm_sve_vector_bits(N)))
, we used a fake template type__SVE_VLS<…, N>
to attach the vector length N to the underlying standard SVE vector type. Perhaps we could do the same sort of thing here: have a fake template type that wraps the unadorned function type and adds information about the streaming mode and shared state? This would probably mean encoding that information as C++ expressions.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I hopelessly confused myself while writing and rewriting the comment above, so gave the wrong reason. The problem isn't that function argument types have no qualifiers, but that function types themselves have only cv-qualifiers. The spec hard-codes markup for transactional safety (
Tx
), but AFAIK there's no general mechanism for adding vendor extensions at the function type level.The conclusion is the same though :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to qualify functions; we don't support defining both a streaming and non-streaming function with the same signature. We only need to qualify function pointers (which, as pointers, do support qualifiers).