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.
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
[RISCV][FMV] Support target_version #99040
[RISCV][FMV] Support target_version #99040
Changes from 3 commits
54b5d68
68cbc16
c7ad1a9
5414680
7c6f108
5e00115
2fcfc9c
a487f19
b89211c
8cd911d
e98d84f
e449161
9c70204
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Do you happen to know what the "fmv" feature is? I don't have context here. Any docs, or a good starting point in the code to understand what we're leaving out here?
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.
My understand is the
fmv
is a aarch64 feature to control the function multi-versioning. They(target_version and fmv) are both be introduced by this commit.The ACLE spec and review comment can help to understand the context.
Additionally, it is treated as a generic option in the Clang command-line options, and it was also introduced in the same commit.
Do you think it's a good idea to add this similar feature to RISC-V, or should we just skip it?
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.
The need to version all of this by target is unfortunate. Is there a way we can reduce the duplication here?
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.
I reduce the part of duplication, and the remain part is causing by different syntax between aarch64 and RISC-V.
To reducing the remain part of duplication, we could implement the RISC-V syntax inside
clang/include/clang/Basic/Attr.td getFeatures
or make Aarch64 using theAArch64TargetInfo::parseTargetAttr
for target_version, or make something likeparseTargetVersionAttr
hook here.By the way, the parsing of target_clones syntax is controlled by the target. (Reference:
llvm-project/clang/lib/Sema/SemaDeclAttr.cpp
Line 3121 in 9cd9377