-
Notifications
You must be signed in to change notification settings - Fork 776
Enable fan-in heuristics at high opt, reduce method size threshold from 50 to 30 for all opt levels #22834
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
+3
−2
Merged
Enable fan-in heuristics at high opt, reduce method size threshold from 50 to 30 for all opt levels #22834
Changes from all commits
Commits
Show all changes
2 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.
Was
||intended instead of&&here? I would have expected that the behavior (whenTR_disableFanInAtHighOptis not present) would not change.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.
We do want to change the default behaviour and revert to the old behaviour when the env var is set.
The env var isn't there to control the fan-in heuristic in general (that can be done via
-Xjit), it's there to quickly revert just this part of the change in case it causes perf regressions or functional issues in the near future. Thanks for double checking it.Uh oh!
There was an error while loading. Please reload this page.
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.
But when the environment variable is not set,
disableFanInAtHighOpt == falseand theifcondition is false.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.
Right, that causes control to skip the return and execute the rest of the routine as intended.
Before:
<=warmdon't return here and execute the rest of the routine, and are thereby subject to the fan-in heuristic.>warmreturn here and aren't subjected to fan-in heuristic.After:
>warmreturn, are not subject to fan-in; methods<=warmdon't return, are subject to fan-in as before.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.
@keithc-ca That is intentional from my understanding. Now at higher opts, unless
TR_disableFanInAtHighOptis set, we do not do an early return from the methodadjustFanInSizeInWeighCallSite. The behaviour prior to this change was that at opt levels > warm,adjustFanInSizeInWeighCallSitewas disabled. This PR now allows things to proceed at higher opt levels, with the option to disable it at higher opt levels.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.
Ok, thanks for the explanations.