-
Notifications
You must be signed in to change notification settings - Fork 5.5k
ZJIT: Optimize variadic cfunc Send calls into CCallVariadic
#14898
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
zjit/src/hir.rs
Outdated
| @@ -12907,26 +12933,46 @@ | |||
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.
I decided to not use Array#index because it only considers either the passed arg, or the block. And if you pass both, it'd warn about block not being used.
This comment has been minimized.
This comment has been minimized.
5691488 to
00e7889
Compare
72f68f3 to
1186b4f
Compare
1186b4f to
555c8b2
Compare
555c8b2 to
835ac10
Compare
| gen_stack_overflow_check(jit, asm, state, state.stack_size()); | ||
|
|
||
| gen_prepare_non_leaf_call(jit, asm, state); | ||
| let args_with_recv_len = args.len() + 1; |
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.
The math here is different than gen_ccall_with_frame's because CCallWithFrame doesn't have recv field. I think this is confusing so I'll add a recv to it in a separate PR to make things consistent.
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.
| let ci_flags = unsafe { vm_ci_flag(call_info) }; | ||
|
|
||
| // When seeing &block argument, fall back to dynamic dispatch for now | ||
| // TODO: Support block forwarding |
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.
iirc, @tekknolagi suggested before that TODOs have to be specifically targeted to ensure that they have someone to follow up on.
Like todo(aidenfoxivey): foo bar baz. I could be wrong though.
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.
Hmm this is different then I'm aware of. I can create an issue for it though.
k0kubun
left a comment
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.
👍
…#14898) ZJIT: Optimize variadic cfunc Send calls into CCallVariadic
Similar to
SendWithoutBlock, this should eliminate most of the remaining unoptimized cfucc send.This PR removes
send_cfunc_variadic: 2,178,105 ( 4.6%)from Lobsters' send fallback reasons.Closes Shopify#825
LobstersBeforeLobstersAfter