Repository navigation
cmake: Raise GCC's inline budget for the Baseline interpreter - #1814
Merged
Merged
Conversation
GCC inlines functions into a file only until it has grown by inline-unit-growth (40%), and into a large function only until that has grown by large-function-growth (100%). The Baseline dispatch loops in baseline_execution.cpp reach these limits: LOG1-LOG4, CALLDATACOPY, CODECOPY, EXTCODECOPY, MCOPY, RETURNDATACOPY and SAR are called out of line, and any change of code size, e.g. in intx, moves instructions in or out of the loops. Raise the limits for this file with GCC to 100% and 200%. The loops then call only the instructions defined in other files and the largest ones (EXP, SELFDESTRUCT, the intx division, and SDIV and SMOD at x86-64-v2), the same as with ten times the limits.
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the GCC-only Baseline inlining-limit change.
No open issues 🎉
What changed in this PR
Raises GCC’s inlining limits for the Baseline interpreter to reduce out-of-line instruction calls and make inlining less sensitive to code-size changes.
Changes:
- Sets
inline-unit-growthto 100% andlarge-function-growthto 200% forbaseline_execution.cpp. - Applies the options only to GCC and documents the rationale.
| File | Description |
|---|---|
lib/evmone/CMakeLists.txt |
Adds GCC-only, source-specific inlining limits for the Baseline interpreter. |
Review effort: Balanced
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1814 +/- ##
=======================================
Coverage 98.23% 98.23%
=======================================
Files 186 186
Lines 17192 17192
Branches 3963 3963
=======================================
Hits 16888 16888
Misses 235 235
Partials 69 69
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
GCC inlines functions into a file only until it has grown by
inline-unit-growth(40%), and into a large function only until that has grown bylarge-function-growth(100%). The Baseline dispatch loops inbaseline_execution.cppreach these limits: LOG1-LOG4, CALLDATACOPY, CODECOPY, EXTCODECOPY, MCOPY, RETURNDATACOPY and SAR are called out of line, and any change of code size, e.g. in intx, moves instructions in or out of the loops.Raise the limits for this file with GCC to 100% and 200%. The loops then call only the instructions defined in other files and the largest ones (EXP, SELFDESTRUCT, the intx division, and SDIV and SMOD at x86-64-v2), the same as with ten times the limits.