Skip to content

[llvm-opt-report] Show scalable vectorization factors #123367

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

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

iamlouk
Copy link
Contributor

@iamlouk iamlouk commented Jan 17, 2025

Scalable vectorization factors are printed as "vscale x VF" where VF is the known minimum number of elements, a integer. Currently, llvm-opt-report always expects a integer (like for vectorization with fixed-sized vectors), and does not display any vectorization factor in the output (just 'V', but without a number).

This patch adds support for scalable vectorization factors and prints them as "VNx", so for example "VNx4". The "Nx" is used to differentiate between fixed-sized and scalable factors, and is consistent with the way LLVM mangles scalable vectors in other places.

@iamlouk
Copy link
Contributor Author

iamlouk commented Jan 17, 2025

Hello, there seams to be no fixed maintainer assigned to llvm-opt-report, @francisvm sorry to ping you, but could you have a look at this? Thank you very much in advance.

@francisvm francisvm self-requested a review January 17, 2025 17:45
Copy link
Collaborator

@francisvm francisvm left a comment

Choose a reason for hiding this comment

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

No bother at all, LGTM!

Scalable vectorization factors are printed as "vscale x VF" where VF is
the known minimum number of elements, a integer. Currently,
llvm-opt-report always expects a integer (like for vectorization with
fixed-sized vectors), and does not display any vectorization factor
in the output (just 'V', but without a number).

This patch adds support for scalable vectorization factors and prints
them as "VNx<VF>", so for example "VNx4". The "Nx" is used to
differentiate between fixed-sized and scalable factors, and is
consistent with the way LLVM mangles scalable vectors in other places.
@iamlouk
Copy link
Contributor Author

iamlouk commented Jan 20, 2025

@francisvm I don't have write access, would you mind suggesting other reviewers or merging this PR yourself? Thanks!

@iamlouk
Copy link
Contributor Author

iamlouk commented Jan 24, 2025

@nikic , as I can't find another still-active contributor and there is no maintainer assigned to this, would you mind taking a look at the PR (and in case you approve, click the merge button for me?). Thank you very much in advance, sorry for the disturbance.

@nikic nikic merged commit 970094d into llvm:main Jan 24, 2025
9 checks passed
@francisvm
Copy link
Collaborator

Sorry for missing this @iamlouk. Thanks @nikic for stepping up.

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.

3 participants