-
Notifications
You must be signed in to change notification settings - Fork 24
[EVM][InlineCost] Set threshold to a small value when BB is unreachable-terminated #867
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
Conversation
dc11487
to
4d393ff
Compare
|
|
📊 Excel Report Available Benchmarks measured for:
|
d9d33cb
to
9dbc203
Compare
9dbc203
to
78a86b0
Compare
ea56e72
to
d317fe0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #867 +/- ##
==========================================
+ Coverage 30.07% 30.08% +0.01%
==========================================
Files 2442 2442
Lines 807946 807951 +5
Branches 176475 176476 +1
==========================================
+ Hits 242985 243088 +103
+ Misses 522792 522694 -98
Partials 42169 42169 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
d317fe0
to
6af3496
Compare
6af3496
to
0f1095d
Compare
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.
Could we add a positive and a negative test case for inlining with unreachable?
…alue when BB is unreachable-terminated Add positive and negative tests to show why in some cases is preferable to inline when BB is unreachable-terminated. Functions callee_inline is taken from real world example where inlining this function reduces one SLOAD after optimizations (we have the same load from the callers and in the callee). Signed-off-by: Vladimir Radosavljevic <[email protected]>
…le-terminated For EVM, to return from the contract we are using different instructions (e.g. return, revert) which are followed by unreachable. In the Inliner heuristic, if BB is unreachable-terminated threshold is set to 0 and these callsites are unlikely to be inlined. Instead, add small threshold and continue to calculate cost model, since in some cases we benefit from inlining. Signed-off-by: Vladimir Radosavljevic <[email protected]>
0f1095d
to
eff88db
Compare
For EVM, to return from the contract we are using different instructions (e.g. return, revert) which are followed by unreachable. In the Inliner heuristic, if BB is unreachable-terminated threshold is set to 0 and these callsites are unlikely to be inlined. Instead, add small threshold and continue to calculate cost model, since in some cases we benefit from inlining.