-
Notifications
You must be signed in to change notification settings - Fork 60
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
[FMV] Change the default versions name mangling. #277
Conversation
Some points aren't clear in the text:
|
Only when FMV enabled. By amending the
Depends on, for the same as above reasons. if the toolchain can avoid emitting redirections then no need to use the default version. maybe a alias could be useful. |
main/acle.md
Outdated
mangling. | ||
The `"default"` version is mangled with `".default"` on top of the | ||
language-specific name mangling. When the `"default"` version matches with an | ||
explicitly provided version an alias to be generated. |
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.
explicitly provided version an alias to be generated. | |
explicitly provided version an alias to be generated. | |
All versions expected to have at least alias that points to actual version. |
I don't understand the remark about aliases in this change. Is this saying that the compiler can optimise versions with identical function bodies to a single function with additional aliased names? If so, I don't think that's relevant to this spec. Alternatively, is it referring to a case where a non-default version specifies only features that the compiler is already assuming to be present? |
Aside from that, I think the mangling changes are reasonable. It might be worth adding an explicit remark that the versioned symbol (i.e. the one that is resolved to one of the versions) should have the same mangling as would be used if the function didn't use function multiversioning. |
The intention is to be sure all function names remain always available when the certain optimisation eliminates a version. (e.g. the default and a given version got merged).
ACK. |
6817c23
to
905ff1a
Compare
905ff1a
to
e5094a5
Compare
This looks good to me now. I've already implemented this mangling in GCC. |
* Change name mangling of the default version. | ||
* Align priorities to account for feature dependencies. | ||
* Introduce alternative names (aliases) `rdma` for `rdm`. | ||
* Correct FEAT_BTI feature register value. |
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.
Changed
Aligned
Introduced
Corrected
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.
Minor changes
The default version's name to be mangled to avoid problems with ifuncs due to the ifunc to be called as the base name of the function.
As for any pull request, please make sure to go through the below
checklist.
Checklist: (mark with
X
those which apply)PR (do not bother creating the issue if all you want to do is
fixing the bug yourself).
SPDX-FileCopyrightText
lines on topof any file I have edited. Format is
SPDX-FileCopyrightText: Copyright {year} {entity or name} <{contact informations}>
(Please update existing copyright lines if applicable. You can
specify year ranges with hyphen , as in
2017-2019
, and usecommas to separate gaps, as in
2018-2020, 2022
).Copyright
section of the sources of thespecification I have edited (this will show up in the text
rendered in the PDF and other output format supported). The
format is the same described in the previous item.
tricky to set up on non-*nix machines). The sequence can be
found in the contribution
guidelines. Don't
worry if you cannot run these scripts on your machine, your
patch will be automatically checked in the Actions of the pull
request.
introduced in this PR in the section Changes for next
release of the section Change Control/Document history
of the document. Create Changes for next release if it does
not exist. Notice that changes that are not modifying the
content and rendering of the specifications (both HTML and PDF)
do not need to be listed.
correctness of the result in the PDF output (please refer to the
instructions on how to build the PDFs
locally).
draftversion
is set totrue
in the YAML headerof the sources of the specifications I have modified.
in the README page of the project.