-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
8331764: C2 SuperWord: refactor _align_to_ref/_mem_ref_for_main_loop_alignment #19115
8331764: C2 SuperWord: refactor _align_to_ref/_mem_ref_for_main_loop_alignment #19115
Conversation
👋 Welcome back epeter! A progress list of the required criteria for merging this PR into |
@eme64 This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 203 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
MemNode* first = pack->at(0)->isa_Mem(); | ||
if (first == nullptr) { continue; } | ||
|
||
int vw = first->memory_size() * pack->size(); |
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 assume first
is verified already and first->memory_size()
is reasonable (size of primitive type).
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.
Yes, it is. All of this code is run in SuperWord::output
, and at this point we are committed to vectorization - everything is verified.
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.
That is what I tried to say in the PR description:
It makes more sense to pick a mem_ref directly in SuperWord::adjust_pre_loop_limit_to_align_main_loop_vectors, where we already know what packs are going to be vectorized.
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.
Yes, first->memory_size()
knows the size in bytes of the load/store. It is used many places in SuperWord.
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.
Good.
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.
Looks good to me, too!
Thanks @vnkozlov @chhagedorn for the reviews! |
Going to push as commit d517d2d.
Your commit was automatically rebased without conflicts. |
This PR accomplishes these things:
_align_to_ref
->_mem_ref_for_main_loop_alignment
.mem_ref
finding for alignment out ofSuperWord::find_adjacent_refs
. This is too early, and we don't even know if the relevantmem_ref
is going to be vectorized. It makes more sense to pick amem_ref
directly inSuperWord::adjust_pre_loop_limit_to_align_main_loop_vectors
, where we already know what packs are going to be vectorized.vector_width
of the pack to which themem_ref
belongs, rather than the potentially much largervector_width_in_bytes
. I track this with_aw_for_main_loop_alignment
now.I need this for #18822, and decided to split it out into an independent change.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19115/head:pull/19115
$ git checkout pull/19115
Update a local copy of the PR:
$ git checkout pull/19115
$ git pull https://git.openjdk.org/jdk.git pull/19115/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19115
View PR using the GUI difftool:
$ git pr show -t 19115
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19115.diff
Webrev
Link to Webrev Comment