-
Notifications
You must be signed in to change notification settings - Fork 732
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change inliner estimate code size heuristic
Do not reset the _analyzedSize value if there was a large callee or there was estimation failure for some other reason. Keep track of all the code we have analyzed (including code that we estimated and then discarded) so that we do not have an undefined amount of estimating on a given top level callee. Introduce an "allowance" factor that gets applied on the size threshold to separate how much we are allowed to analyze and how much we are allowed to bring in as inlined call graph. This commit should limit the amount of code we are allowed to analyze to be a factor no more than 2x of what we we are allowed to bring in to the compiled method via inlining. Added a new env var TR_AnalyzedAllowanceFactor that allows a user to specify the factor by which we multiply the original estimate size threshold to control how much we can analyze even with backtracking. Added a new env var TR_GraceInliningThreshold that controls how big a callee is allowed to be, in order to be inlined even if the call graph size estimate is exceeded. Misc. cleanups: Fixed an inconsistency in how we reset variables during backtracking Renamed _optimisticSize to _analyzedSize since it is less confusing Fixed a typo in a variable name Fixed some white spaces Signed-off-by: Vijay Sundaresan <[email protected]>
- Loading branch information
1 parent
9362c83
commit 2a2ccc3
Showing
2 changed files
with
53 additions
and
44 deletions.
There are no files selected for viewing
This file contains 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 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