-
Notifications
You must be signed in to change notification settings - Fork 193
Rewrite inlining pass #1935
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
base: master
Are you sure you want to change the base?
Rewrite inlining pass #1935
Conversation
840420d
to
7b64a79
Compare
79446f9
to
ba1a622
Compare
b62b39e
to
5cb6652
Compare
Rewrite code locations everywhere, so that it can used to duplicate nested functions.
; body_size : int cache | ||
; full_size : int cache | ||
; closure_count : int cache | ||
; init_code : int cache |
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 you add a comment to some of these fields explain what there are for ?
At least for init_code
, interesting_params
, full_size
&& (not (contains_loop ~context info)) | ||
&& returns_a_block ~context info | ||
&& count_init_code ~context info * 2 > body_size ~context info | ||
&& full_size ~context info - body_size ~context info <= 20 * closure_count ~context info |
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.
maybe add a small comment explaining the two heuristics above , init_code * 2 > body_size
and full_size <= 20 * closure_count
- We are a lot more aggressive at inlining functor-like functions, since this may enable further optimizations. - We are more cautious at inlining nested functions, since this can result in memory leaks. - We inline a larger class of small functions
I've pushed a fixup to the testsuite. |
We need a changelog entry |
I'm not certain I read the benchmark correctly. |
No description provided.