Skip to content

[SLP] vectorizeStores: Name things a bit more clearly (NFC) #144511

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
Jun 17, 2025

Conversation

gbossu
Copy link
Contributor

@gbossu gbossu commented Jun 17, 2025

I believe the new variable names better convey their purpose. However, I also believe that function is more complex than it needs to be, and this tiny patch should be seen as a first step towards (maybe) further refactoring.

The previous names were very generic (Size, Sz, Cnt, StartIdx). This made it easy to get confused given that the vecotrizeStores() function is already complex enough.

My hope would be to eventually have a function concise enough to clearly see what are the different strategies being attempted to vectorise a group of related store instructions.

I believe the new variable names better convey their purpose. However, I
also believe that function is more complex than it needs to be, and this
tiny patch should be seen as a first step towards (maybe) further
refactoring.

The previous names were very generic (Size, Sz, Cnt, StartIdx). This
made it easy to get confused given that the vecotrizeStores() function
is already complex enough.

My hope would be to eventually have a function concise enough to clearly
see what are the different strategies being attempted to vectorise a
group of related store instructions.
Copy link
Collaborator

@sdesmalen-arm sdesmalen-arm left a comment

Choose a reason for hiding this comment

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

As someone who's not very familiar with this code, I can say that these names make the code easier to comprehend, at least for me. Happy to hear someone else's opinion as well.

@gbossu gbossu merged commit 087d83e into llvm:main Jun 17, 2025
7 of 8 checks passed
@gbossu gbossu deleted the gbossu.slp.vectorizeStores.naming branch June 17, 2025 12:20
ajaden-codes pushed a commit to Jaddyen/llvm-project that referenced this pull request Jun 17, 2025
)

I believe the new variable names better convey their purpose. However, I
also believe that function is more complex than it needs to be, and this
tiny patch should be seen as a first step towards (maybe) further
refactoring.

The previous names were very generic (Size, Sz, Cnt, StartIdx). This
made it easy to get confused given that the vecotrizeStores() function
is already complex enough.

My hope would be to eventually have a function concise enough to clearly
see what are the different strategies being attempted to vectorise a
group of related store instructions.
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