-
Notifications
You must be signed in to change notification settings - Fork 6.2k
JDK-8277496 Remove duplication in c1 Block successor lists #6614
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
JDK-8277496 Remove duplication in c1 Block successor lists #6614
Conversation
create separate versions for two cases _end == NULL, _end != NULL. This makes it explicit that the former case is only ever used in GraphBuilder (and in the printer). GraphBuilder accessor methods for _successors: In preparation for creating a temporary list of lists in graphbuilder
This makes it clear how weird this is. The nonnull case doesnt even set begin!
|
👋 Welcome back LudwikJaniuk! A progress list of the required criteria for merging this PR into |
|
@LudwikJaniuk The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
neliasso
left a comment
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.
A very nice clean up!
| if (PrintCompilation && Verbose) tty->print_cr("Created %d Instructions", _instruction_count); | ||
| #endif | ||
|
|
||
| // JANIUK: If we iterate all the blocks in _blocks, some of them have end NULL. |
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.
Left over comment?
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.
Indeed! Removed it
src/hotspot/share/c1/c1_LIR.cpp
Outdated
| } | ||
| } | ||
|
|
||
| if (end != NULL) |
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.
Missing braces on if statement
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.
Corrected it
neliasso
left a comment
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! Thanks for fixing!
|
@LudwikJaniuk 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 96 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@neliasso, @vnkozlov) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
/integrate |
|
@LudwikJaniuk |
vnkozlov
left a comment
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.
@LudwikJaniuk Please, rerun your testing. Running only -b linux-x64 is not enough - you should not specify this option at all. Testing should be done on all platforms. Also linux-x64 is product build which does not include asserts. So we may not catch possible issues.
vnkozlov
left a comment
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.
Testing results looks good too.
|
/sponsor |
|
Going to push as commit 8d190dd.
Your commit was automatically rebased without conflicts. |
|
@neliasso @LudwikJaniuk Pushed as commit 8d190dd. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Remove
BlockBegin::_successors, leavingBlockEnd::_suxas the SSOT for the successors of a block. Prior to this PR, these two lists were both tracking the same list of successors of the same block. This necessitated a lot of syncing and verification code.With this PR, as long as a block has its end pointer assigned, its successors can always be reached by querying the
BlockEnd.BlockEnd::_suxbecomes the single place where the list of successors is maintained. When modified, the successor list no longer needs to be synchronized in two places, reducing complexity and confusion. Asserts on the two lists corresponding no longer need to be made.While being created in
GraphBuilder,BlockBegins don't have aBlockEndassigned yet. To temporarily track block successors in this small interval, add a lookup structureBlockListBuilder::_bci2block_successors.This PR affects debug printing code. If the end pointer of a
BlockBeginis NULL for some reason, then the successor list can no longer be printed (for obious reasons).This PR introduces an additional check to IR::verify to check that
BlockBegin::_endis not set to null.This PR also performs some minor refactoring, polishing, inlining, and removing of dead code around the affected areas.
The commit history has been polished to attempt to guide the reader through the changes.
hs-tier1 and hs-tier2 tests pass.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6614/head:pull/6614$ git checkout pull/6614Update a local copy of the PR:
$ git checkout pull/6614$ git pull https://git.openjdk.java.net/jdk pull/6614/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6614View PR using the GUI difftool:
$ git pr show -t 6614Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6614.diff