| Age | Commit message (Collapse) | Author |
|
Just loop until you find a non-alias.
|
|
|
|
|
|
|
|
|
|
These count caller-side features we don't support. But because we side
exit when we see them through unhandled_call_type(), these new counters
currently don't trigger.
|
|
`send_fallback_fancy_call_feature`
In cases we fall back when the callee has an unsupported signature, it
was a little inaccurate to use `send_fallback_send_not_optimized_method_type`.
We do support the method type in other situations.
Add a new `send_fallback_fancy_call_feature` for these situations. Also,
`send_fallback_bmethod_non_iseq_proc` so we can stop using
`not_optimized_method_type` completely for bmethods.
Add accompanying `fancy_arg_pass_*` counters. These don't sum to the number
of unoptimized calls that run, but establishes the level of support the
optimizer provides for a given workload.
|
|
|
|
We can see send/block call/struct aref/... e.g. on lobsters:
```
Top-9 not optimized method types for send_without_block (100.0% of total 3,133,812):
iseq: 2,004,557 (64.0%)
optimized_struct_aref: 496,232 (15.8%)
alias: 268,579 ( 8.6%)
optimized_call: 224,883 ( 7.2%)
optimized_send: 120,531 ( 3.8%)
bmethod: 12,011 ( 0.4%)
null: 4,636 ( 0.1%)
optimized_block_call: 1,930 ( 0.1%)
cfunc: 453 ( 0.0%)
```
railsbench:
```
Top-8 not optimized method types for send_without_block (100.0% of total 5,735,608):
iseq: 2,854,551 (49.8%)
optimized_struct_aref: 871,459 (15.2%)
optimized_call: 862,185 (15.0%)
alias: 588,486 (10.3%)
optimized_send: 482,171 ( 8.4%)
null: 39,942 ( 0.7%)
bmethod: 36,784 ( 0.6%)
cfunc: 30 ( 0.0%)
```
shipit:
```
Top-10 not optimized method types for send_without_block (100.0% of total 4,844,304):
iseq: 2,881,206 (59.5%)
optimized_struct_aref: 1,158,935 (23.9%)
optimized_call: 472,898 ( 9.8%)
alias: 208,010 ( 4.3%)
optimized_send: 55,479 ( 1.1%)
null: 47,273 ( 1.0%)
bmethod: 12,608 ( 0.3%)
optimized_block_call: 7,860 ( 0.2%)
cfunc: 31 ( 0.0%)
optimized_struct_aset: 4 ( 0.0%)
```
|
|
Right now we have a subtle type system bug around `types::Class`. Until
that is resolved, stop marking `Kernel#class` as returning
`types::Class`, which fixes Rubocop.
Re: https://github.com/Shopify/ruby/issues/850
|
|
For test_zjit.rb output, it was too long for a single test to print
thousands of lines.
|
|
I wanted to see comments on test_zjit.rb failures.
|
|
so that it can be easily specified with `--zjit-dump-lir=`.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Allow instructions to constrain their operands' input types to avoid
accidentally creating invalid HIR.
|
|
|
|
|
|
|
|
|
|
https://github.com/ruby/ruby/actions/runs/18887695798/job/53907237061?pr=14975
|
|
`hir.rs` was getting rather large, so I've opted to move the inline tests into their own files. This should also help when looking for where to put your tests, as the optimization tests have a dedicated file.
Future follow up work could make the layout of test modules more idiomatic to Rust.
|
|
We can measure how many we can remove by adding type information to C
functions, etc.
|
|
|
|
|
|
|
|
Once we add register spill, the C stack will have not only spilled basic
block params but also spilled VRegs.
We won't know how many stack slots are used for spilled VRegs until
alloc_regs, so you can't compute an offset as of writing LIR.
|
|
|
|
|
|
Fixes https://github.com/Shopify/ruby/issues/814
This change specializes the case of calling `Array#pop` on a non frozen array with no arguments. `Array#pop` exists in the non-inlined C function list in the ZJIT SFR performance burndown list.
If in the future it is helpful, this patch could be extended to support the case where an argument is provided, but this initial work seeks to elide the ruby frame normally pushed in the case of `Array#pop` without an argument.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
We can fully remove the CCall now.
|
|
|
|
|
|
|
|
|
|
trace_getinstancevariable (#14969)
We treat getinstancevariable differently from other opcodes: it does not
look at the stack for its self operand, but instead looks at
`cfp->self`. In some cases, we might see the `trace_` variant in the
front-end, so make sure we treat that the same.
Example repro:
```
def test
@foo
end
28.times do
test
end
trace = TracePoint.trace(:call) do |tp|
puts tp.method_id
end
trace.enable do
30.times do
test
end
end
```
|
|
|
|
|
|
|