-
Notifications
You must be signed in to change notification settings - Fork 5.4k
YJIT: Support invokeblock #6640
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
3de640f
to
d85d6d4
Compare
d85d6d4
to
dbab15e
Compare
yjit/src/codegen.rs
Outdated
}; | ||
asm.store(Opnd::mem(64, sp, SIZEOF_VALUE_I32 * -2), specval); | ||
|
||
// Arm requires another register to load the immediate value of Qnil before storing it. | ||
// So donig this after releasing the register for specval to avoid register spill. |
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.
s/donig/doing/
LGTM. At some point I should see if I can figure out approximately how much mem we're using for the context structures. I don't think the new captured-self entry should be a big increase in mem size... But I also haven't tried to figure out how many context structs we allocate, or whether we can easily tell from our stats. |
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.
Well done :)
This PR implements:
yield
an ISEQget_alloc_regs
on x86_64.gen_get_lep
will need to be called again and again to split the live range, but it's not efficient. Besides, using the same number of registers for Intel and Arm would make our life easier; we often need to fix a new issue when we work on stuff on Arm and then switch to Intel with fewer registers.split_bitmask_immediate
with a negative immediate on Arm: lessasm.load
/ register spill pressure.rb_get_iseq_flags_has_accepts_no_kwarg
torb_get_iseq_flags_accepts_no_kwarg
: The naming seems inconsistent withrb_get_iseq_flags_ruby2_keywords
having nohas_
.This results in fewer side exists on railsbench:
Before
After
The following exit reasons are not addressed in this PR as they don't seem like a bottleneck: