| Age | Commit message (Collapse) | Author |
|
* ZJIT: Compile sendforward with dynamic dispatch
* Reload locals only if it has blockiseq
* Add a test case of ... with other args
|
|
* ZJIT: Support variadic C calls
This reduces the `dynamic_send_count` in `liquid-render` by ~21%
* ZJIT: Reuse gen_push_frame
* ZJIT: Avoid optimizing variadic C call when tracing is enabled
|
|
It's a no-op and always returns `nil`.
Fixes https://github.com/Shopify/ruby/issues/755
|
|
|
|
|
|
|
|
|
|
This has fewer effects (can be elided!) and will eventually get better
codegen, too.
Fix https://github.com/Shopify/ruby/issues/752
|
|
* ZJIT: Split Insn::Const from Insn::GetBlockParamProxy
* Print [BlockParamProxy]
* Link a TODO comment to a Shopify/ruby issue
|
|
I thought about creating a new HIR like `SendWithoutBlockFailedToOptimize` that can carry very specific reasons later. But it'll mean adding it to every branch matching `SendWithoutBlock` and may make code unnecessarily complicated.
So I take the easier path for now:
```
Top-4 send fallback def_types (100.0% of total 21,375,357):
cfunc: 20,164,487 (94.3%)
optimized: 1,197,897 ( 5.6%)
attrset: 12,953 ( 0.1%)
alias: 20 ( 0.0%)
```
|
|
|
|
Follow-up on https://github.com/ruby/ruby/pull/14565
I meant to push this this as well but it was left un-committed locally.
|
|
* functional debug mechanism; small refactor
* make all tests pass
* clean up implementation of debug mechanism for gen_prepare_call_with_gc
* revert unnecessary change to gen_object_alloc
* make ObjectAlloc non-leaf
* fix merge error; reintroduce accidentally deleted counter
* remove outdated comment
* changes as per review comments
* make set_stack_canary more stable
* add todo comment to specialize object_alloc
* revert whitespace changes
* create gen_prepare_leaf_call_with_gc helper
* fix spacing
|
|
|
|
|
|
|
|
* ZJIT: Share more code with YJIT in jit.c
* Fix ZJIT references to JIT
|
|
|
|
|
|
* Using the shared jit crate, support for a single global_allocator can
function
* Solves --zjit-mem-size
|
|
Previously, the included test crashed or turned into an infinite
loop due to the missing check.
|
|
* Revert "ZJIT: Removed unused self_val from Send"
This reverts commit 13c2f8d5c2b41ec78344ae60f9b5ec1564029418.
* Revert "ZJIT: Removed unused self_val from InvokeSuper"
This reverts commit 877b625922e0f8de4e7ad801dd0306e69b34d263.
* ZJIT: Rename self_val in dispatching HIRs to recv
* ZJIT: Remove unnecessary constructor param names
|
|
|
|
|
|
ZJIT: Support invokeblock insn
Basically like other send-ish insns, except that it doesn't pop the receiver.
|
|
|
|
|
|
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
|
|
* failing test for ObjToString optimization with GuardType
* profile ObjToString receiver and rewrite with guard
* adjust integration tests for objtostring type guard optimization
* Implement new GuardTypeNot HIR; objtostring sends to_s directly on profiled nonstrings
* codegen for GuardTypeNot
* typo fixes
* better name for tests; fix side exit reason for GuardTypeNot
* revert accidental change
* make bindgen
* Fix is_string to identify subclasses of String; fix codegen for identifying if val is String
|
|
This allows for more precise tracking of stats programmatically
which is particularly useful for our nightly benchmarking suite.
- Define rust function
- Expose to C
- Wrap with Ruby API
- Add a test
|
|
* ZJIT: Allow label generation above 19 bits
* Refactor emit_conditional_jump to use generate_branch
* Make branching functionality generic across Label and CodePtr
* ZJIT: Add > 19 bit jump test and helper function
* Remove an empty line
---------
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
|
|
|
|
Similar to YJIT's --yjit-stats=quiet, this option allows ZJIT to collect
statistics and make them available via the Ruby API without printing them
at exit. This is useful for programmatic access to stats without the
output noise.
- Added print_stats field to Options struct
- Modified option parsing to support --zjit-stats=quiet
- Added rb_zjit_print_stats_p primitive to check if stats should be printed
- Updated zjit.rb to only register at_exit handler when print_stats is true
- Update the help text shown by `ruby --help` to indicate that
--zjit-stats now accepts an optional =quiet parameter.
- Added test for --zjit-stats=quiet option
|
|
Ref: https://github.com/ruby/ruby/pull/14134#issuecomment-3207733725
We can't safely use low-bit pointer tagging anymore because `RTypedData.type`
lines up with `RData.dfree` and there is no aligment guarantee on function
pointers, as evidenced by `memcached` and `gpgme` gems.
We also can't use FL_USER* for this, because extensions may use these
for other purposes.
Using a general flag for this is a bit unfortunate, as general flags
are hard to come by, however I recently freed several of them, and
we still have two or three free ones left.
|
|
|
|
|
|
Co-authored-by: Max Bernstein <ruby@bernsteinbear.com>
|
|
This fixes:
```
warning: unused import: `ParseError`
--> zjit/src/codegen.rs:20:61
|
20 | use crate::hir::{Const, FrameState, Function, Insn, InsnId, ParseError};
| ^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
```
|
|
ZJIT: Add patchpoint for TracePoint activation
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
|
|
* ZJIT: Support compiling ISEQs for opt_pc = 0
* Test send with optional arguments
|
|
|
|
|
|
|
|
|
|
ZJIT: Handle opt_case_dispatch insn
|
|
|
|
|
|
|
|
|
|
|