| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
RUBY_DEBUG have a very significant performance overhead. Enough that
YJIT with RUBY_DEBUG is noticeably slower than the interpreter without
RUBY_DEBUG.
This makes it hard to collect yjit-stats in production environments.
By allowing to collect JIT statistics without the RUBy_DEBUG overhead,
I hope to make such use cases smoother.
|
|
|
|
|
|
|
|
| |
The FIXME is there so we remember to investigate why insns clears the
temporary array. Is this necessary? If it's not we can remove it from
both.
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Similar to the previous fix to ctx_clear_local_types, we must detach
mappings to a local if we are changing its value.
|
|
|
|
|
|
| |
Previously all stack operands would become unknown once the stack grew
beyond a certain size. This worked, but unnecessarily hid available
information.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
If we hit this at PC > 0 (ie. with an optional argument) the provided
types and context are likely incorrect and it is likely this block can't
be used.
|
|
|
|
| |
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
|
|
|
|
|
| |
Nobu pointed out that saving the old ci to a local is enough to keep it
reachable.
|
|
|
|
| |
This reverts commit 1e0f2e4b09ca9443524acf4b50ffd50a80f330f3.
|
| |
|
| |
|
|
|
|
| |
This should have referenced MAX_TEMP_TYPES, not MAX_LOCAL_TYPES.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
These instructions are marked as not leaf in insns.def, which indicate
that they could raise exceptions and/or call Ruby methods.
|
|
|
|
|
|
|
| |
Adds yjit support for setting global variables.
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Co-authored-by: John Hawthorn <john@hawthorn.email>
|
|
|
|
| |
return Qnil
|
|
|
|
|
|
| |
Adds getglobal to yjit and a test for it.
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
|
|
|
|
|
|
| |
Previously, under the scraper, this would side-exit because it was
returning to a C method. Now that we use the jit_func entrypoint, this
test no longer side-exits.
|
| |
|
|
|
|
|
| |
The old code didn't keep old_operands[0] reachable while allocating. You
can crash it by requiring erb under GC stress mode.
|
|
|
|
| |
This is just for helping my own understanding, but could be useful for others as well.
|
|
|
|
|
| |
Clear out any JIT code on iseqs when tracepoints get enabled. We can't
handle tracepoints right now, so we'll just try to recompile later.
|
|
|
|
|
|
|
| |
If `--disable-jit-support` is passed to configure, then `jit_func` is
removed from the iseq body and we can't compile YJIT. This commit
detects when the JIT function pointer is gone and disables YJIT in that
case.
|
|
|
|
|
| |
Now that we're using the jit function entry point, we don't need the
scraper. Thank you for your service, scraper. ❤️
|
|
|
|
|
| |
The JIT entry point passes the CFP as RSI and the EC as RDI. Lets match
that so we don't have to shuffle registers around.
|
| |
|
| |
|
|
|
|
| |
Instead of mutating the iseqs, just clear the JIT function.
|
|
|
|
|
|
|
| |
Methods with optional parameters don't always start executing at the
first PC, but we compile all methods assuming that they do. This commit
adds a guard to ensure that we're actually starting at the first PC for
methods with optional params
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Always using `ret` to return to the interpreter means that we never have
to check the VM_FRAME_FLAG_FINISH flag.
In the case that we return `Qundef`, the interpreter will execute the
cfp. We can take advantage of this by setting the PC to the instruction
we can't handle, and let the interpreter pick up the ball from there.
If we return a value other than Qundef, the interpreter will take that
value as the "return value" from the JIT and push that to the SP of the
caller
The leave instruction puts the return value on the top of the calling
frame's stack. YJIT does the same thing for leave instructions.
However, when we're returning back to the interpreter, the leave
instruction _should not_ put the return value on the top of the stack,
but put it in RAX and use RET. This commit pops the last value from the
stack pointer and puts it in RAX so that the interpreter is happy with
SP.
|
|
|
|
| |
of RUBY_DEBUG and --yjit-stats/YJIT_STATS settings
|
| |
|
| |
|
| |
|
| |
|
| |
|