-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8370077: C2: make Compile::_major_progress a boolean #27912
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Perhaps the comment should be updated too?
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 makes sense. A suggestion? Maybe "Whether something big happened"?
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.
It is kind of scary that there is basically no documentation on this. But it is quite important actually. The current comment is really not very helpful.
My understanding is that the flag is set if the loop-opts data-structures are invalid (or at least there is no guarantee that they are valid). So we need to re-build the loop tree.
If we ever set the flag, we don't continue with more loop-opts, but spin back to IGVN, clean the graph, and maybe come back to a new loop-opts round.
There may be others who have a better understanding / definition though.
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 don't think it's the right place for this kind of comment. It's quite hidden, far from where it's actually useful to know we need to set or check that. I'd say it should rather be on
PhaseIdealLoopfor instance, orPhaseIdealLoop::optimize, something like that, as a part of a more global overview of how things work.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.
There should just be some documentation around the
major_progressfamily of field/methods. Or at least link from there to where the documentation resides ;)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 don't think anyone is saying we should not have such comments. I just think it's out of scope here and mainly I just don't know enough to write anything useful and correct. But if somebody more knowledgeable in this gives me a patch that adds such documentation, I can sneak it in this PR. Otherwise, it will be another time.
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.
Absolutely, it should not hold up this PR. It was more meant to be an endorsement that we should definitely add some documentation some point.
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, I'd say just file an RFE, and link to the conversation here. Feel free to assign it to me if you don't want to own it ;)
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.
Let's ask @vnkozlov , @TobiHartmann and @rwestrel , do any of you have a good definition for the
major_progressconcept?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.
Until jdk11, there were comments in the code like this:
"If _major_progress, then more loop optimizations follow"
but those uses of major_progress() have been changed to !post_loop_opts_phase(). So "major progress" seems to imply "expect more loop opts".