Skip to content

Conversation

@AlfieRichardsArm
Copy link
Contributor

Hi all,

This is a PR to implement option 3 of #403 proposed by @labrinea .

It adds the proposed syntax, with higher priority values taking precedence.

Happy to modify wording if needed.


  • If an issue reporting the bug exists, I have mentioned it in the
    PR (do not bother creating the issue if all you want to do is
    fixing the bug yourself).
  • I have added/updated the SPDX-FileCopyrightText lines on top
    of 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 use
    commas to separate gaps, as in 2018-2020, 2022).
  • I have updated the Copyright section of the sources of the
    specification 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.
  • I have run the CI scripts (if applicable, as they might be
    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.
  • I have added an item that describes the changes I have
    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.
  • When modifying content and/or its rendering, I have checked the
    correctness of the result in the PDF output (please refer to the
    instructions on how to build the PDFs
    locally
    ).
  • The variable draftversion is set to true in the YAML header
    of the sources of the specifications I have modified.
  • Please DO NOT add my GitHub profile to the list of contributors
    in the README page of the project.

@AlfieRichardsArm
Copy link
Contributor Author

Lint failure is due to https://allcontributors.org/docs/en/emoji-key being dead at the moment. Not relevant to the change.

The precedence for two target version strings is determined by:

1. If both target version strings specify a `priority`, with different values,
then the version with the higher `priority` has precedence.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jroelofs if I read your comment #371 (comment) correctly you'd also prefer higher number = higher priority?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping

main/acle.md Outdated
| <version string>
<version string> := <priority string> ';' <arch strings>
| <arch strings>
<priority string> := 'priority=[1-31]'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jroelofs with llvm/llvm-project#150079 we have plenty of room to go beyond 5 bits of priority. Any preference?

Copy link
Contributor

@labrinea labrinea Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally find 6 bits the maximum sensible, but I am also happy with 5 or less.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ping

This addresses the changes requested by Chris, most importantlt the ordering
of the priority string and the arch string.

Otherwise its working nits.
@AlfieRichardsArm
Copy link
Contributor Author

Addressed Chris' comments. Unless there's any more discussion I'd like to move towards merging this soon?

Copy link
Contributor

@labrinea labrinea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

labrinea added a commit to labrinea/llvm-project that referenced this pull request Aug 13, 2025
Implements ARM-software/acle#404

This allows the user to specify "priority=[1-255];featA+featB"
where priority=255 means highest priority. If the explicit
priority string is omitted then the priority of "featA+featB"
is implied, which is lower than priority=1.

Internally this gets expanded using special FMV features P0 ... P7
which can encode up to 256-1 priority levels (excluding all zeros).
Those do not have corresponding detection bit at pos FEAT_#enum
so I made this field optional in FMVInfo. Also they don't affect
the codegen or name mangling of versioned functions.
@vhscampos
Copy link
Member

Thanks for the patch. Let's wait for further comments until end of tomorrow before we merge it.

@vhscampos vhscampos merged commit d294acf into ARM-software:main Aug 15, 2025
3 of 4 checks passed
* Added `svdot[_n_f16_mf8]_fpm` and `svdot[_n_f32_mf8]_fpm`.
* Added Guarded Control Stack (GCS) at
[**Beta**](#current-status-and-anticipated-changes) quality level.
* Add Function Multi Versioning feature priority syntax.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Add Function Multi Versioning feature priority syntax.
    Change to Added

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Sally. I'm going to fix this.

Copy link
Contributor

@sallyarmneale sallyarmneale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - apart from one very minor change

labrinea added a commit to llvm/llvm-project that referenced this pull request Dec 9, 2025
Implements ARM-software/acle#404

This allows the user to specify "featA+featB;priority=[1-255]" where
priority=255 means highest priority. If the explicit priority string is
omitted then the priority of "featA+featB" is implied, which is lower
than priority=1.

Internally this gets expanded using special FMV features P0 ... P7 which
can encode up to 256-1 priority levels (excluding all zeros). Those do
not have corresponding detection bit at pos FEAT_#enum so I made this
field optional in FMVInfo. Also they don't affect the codegen or name
mangling of versioned functions.
llvm-sync bot pushed a commit to arm/arm-toolchain that referenced this pull request Dec 9, 2025
…150267)

Implements ARM-software/acle#404

This allows the user to specify "featA+featB;priority=[1-255]" where
priority=255 means highest priority. If the explicit priority string is
omitted then the priority of "featA+featB" is implied, which is lower
than priority=1.

Internally this gets expanded using special FMV features P0 ... P7 which
can encode up to 256-1 priority levels (excluding all zeros). Those do
not have corresponding detection bit at pos FEAT_#enum so I made this
field optional in FMVInfo. Also they don't affect the codegen or name
mangling of versioned functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants