Age | Commit message (Collapse) | Author |
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13602
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13602
|
|
Co-authored-by: Max Bernstein <[email protected]>
Notes:
Merged-By: k0kubun <[email protected]>
|
|
Adds support for code like:
```ruby
$foo
$foo = x
```
Notes:
Merged: https://github.com/ruby/ruby/pull/13569
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13527
|
|
I didn't know `rb_ivar_get` existed until @Xrxr pointed me to it.
Thanks, Alan!
Notes:
Merged: https://github.com/ruby/ruby/pull/13527
|
|
Notes:
Merged-By: k0kubun <[email protected]>
|
|
* ZJIT: Pass self through basic block params
Co-authored-by: Max Bernstein <[email protected]>
* Add comments for self
* Use self_param for ivar
* Make self_param a loop local
* Fix rest parameter type check
* Push self_param first
* Add a test case for putself
* Use SELF_PARAM_IDX
Co-authored-by: Max Bernstein <[email protected]>
* Fix test_unknown
---------
Co-authored-by: Max Bernstein <[email protected]>
Notes:
Merged-By: k0kubun <[email protected]>
|
|
* Add newrange support to zjit
* Add RangeType enum for Range insn's flag
* Address other feedback
Notes:
Merged-By: k0kubun <[email protected]>
|
|
Co-authored-by: Max Bernstein <[email protected]>
Co-authored-by: Alan Wu <[email protected]>
Notes:
Merged-By: k0kubun <[email protected]>
|
|
The FrameState on the SendWithoutBlock represents the entry state,
but for instructions that push to the stack in the middle of the
instruction before actually doing the send like opt_aref_with,
the FrameState is incorrect. We need to write to the stack using the
arguments for the instruction.
Notes:
Merged: https://github.com/ruby/ruby/pull/13468
|
|
Allow DCE to remove some CCalls
Add `elidable` field that signals that there would be no discernible
effect if the call to the method were removed. The default is false.
Notes:
Merged-By: k0kubun <[email protected]>
|
|
Right now we just crash if we can't compile an ISEQ for any reason
(unimplemented in HIR, unimplemented in codegen, ...) and this fixes
that by bailing out.
Notes:
Merged: https://github.com/ruby/ruby/pull/13356
|
|
* ZJIT: Drop a duplicated call into optimize
* Update a comment
Co-authored-by: Max Bernstein <[email protected]>
---------
Co-authored-by: Max Bernstein <[email protected]>
Notes:
Merged-By: k0kubun <[email protected]>
|
|
We don't have a good model for modeling weakref-like instruction
dependency behavior and I don't think we should add it just for this.
Notes:
Merged: https://github.com/ruby/ruby/pull/13162
|
|
Now we can dump HIR, optimized HIR, LIR, and assembly.
Notes:
Merged-By: k0kubun <[email protected]>
|
|
* Show failing test
* Add second test case
* Add empty NewArray setup
* Update opt_tests and fix NewArray instantiation
* Add code generation for NewArray
* Add NewArray ordering test
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
* Implement JIT-to-JIT calls
* Use a closer dummy address for Arm64
* Revert an obsoleted change
* Revert a few more obsoleted changes
* Fix outdated comments
* Explain PosMarkers for CCall
* s/JIT code/machine code/
* Get rid of ParallelMov
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
A new optimization pass. Also:
- Printing for `Insn::CCall`
- Wrap `ID` and add convenience method for printing, replacing calls to rb_id2name()
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
In case the callee writes to the caller's locals, we need to be able to
immediately side-exit because our frame's invariants might have been
invalidated.
If in the course of optimization we rewrite the Send, we can choose to
remove the PatchPoint too---but it's not an error to keep it around.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/95)
* Remove immediately deferenced borrow operators
source: https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
* Remove unnecessary cast as i64
Since Const::CInt64 wraps i64, it is unnecessary to cast to i64.
* Remove unnecessary borrow operators
* Beautify assign operation syntax
* Use .is_null() convenience method
* Omit .into() call from u32 to u32
* Use more descriptive std::ptr::null<VALUE>()
In lieu of casting a literal as a type, opt to use the convenience type.
* Use sized integer literal
* Simplify pattern matching to explicit check
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
We want to return representatives for the stack and locals.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
In calls to top-level functions, we assume that call targets will not
get rewritten, so we can insert a PatchPoint and do the lookup at
compile-time.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/87)
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
This makes the disassembly comments much easier to read because they use
the more familiar `v2` rather than `InsnId(2)` and `Fixnum` rather than
`Type { bits: ...... }`.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Add a constant folding pass for HIR. This pass uses the types left by
`infer_types` to fold away:
* `GuardType(val, ty)` where `val` is already `ty`
* `FixnumAdd(l, r)` where `l` and `r` are constants
* `FixnumLt(l, r)` where `l` and `r` are constants
* `FixnumEq(l, r)` where `l` and `r` are constants
* `Test(v)`, where `v` is a constant
* `IfTrue(v)` and `IfFalse(v)` where `v` is a constant
It does this by using the union-find data structure in the IR to avoid a
complicated manual find-and-replace process for all the uses. Right now, for
branch instructions that it deletes, we remove from the block completely. This
is safe only because we have ensured that nothing refers to branch
instructions---they produce no values. However, if we want to instead replace
them with Nops that get ignored during codegen or removed by a later DCE pass,
that works for me as well.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/72)
* Compile IfFalse instruction
* Add a TODO comment
* Rename *s_len to num_*s
* Run only gen_param() against block.params
* Add a few more tests
* Wrap label indexes with Label
* Compile blocks in reverse post-order
* Simplify a nested test
* s/get_block/block/
* Return a number instead of an iterator
* Clarify the allocator uses disjoint sets of registers
* Use Display for Block and Insn
* Compile IfTrue and Jump
* Avoid resolving Param instructions
* Always compile Insn::Param as basic block arguments
* Remove an obsoleted variable
* Change it back to use find
* Use find for params too
* Use Display more
* Add more tests
* nested if
* if after if
* if elsif else
* loop after loop
* nested loops
* if in loop
* loop in if
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/63)
* Implement dynamic dispatch for opt_send_without_block
* Rename stack methods
* Fix typos
* More clarification on gen_save_sp()
* Update a comment
* Update a comment about spills
* Rename name to method_name
* Test no-arg and 2-arg method calls
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
* Implement codegen for Test insn
* Update zjit/src/codegen.rs
Co-authored-by: Alan Wu <[email protected]>
---------
Co-authored-by: Alan Wu <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/50)
* Implement all basic Fixnum instructions
* Use opnd! macro for other instructions as well
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/41)
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/43)
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/39)
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/38)
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
* Load Param off of cfp->ep
* Test with --zjit-call-threshold=1 as well
* Fix get_opnd's debug output
* Return Mem operand from gen_param
* Test both first and second calls
* Spell out the namespace for Opnd returns
* Update a comment about gen_param
* Explain why we take a lock
* Fix a typo
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Give every instruction a cheap ID to hold onto instead of owning a copy.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/30)
* Implement FixnumAdd and stub PatchPoint/GuardType
Co-authored-by: Max Bernstein <[email protected]>
Co-authored-by: Maxime Chevalier-Boisvert <[email protected]>
* Clone Target for arm64
* Use $create instead of use create
Co-authored-by: Alan Wu <[email protected]>
* Fix misindentation from suggested changes
* Drop an unneeded variable for mut
* Load operand into a register only if necessary
---------
Co-authored-by: Max Bernstein <[email protected]>
Co-authored-by: Maxime Chevalier-Boisvert <[email protected]>
Co-authored-by: Alan Wu <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
This will be used for local type inference and potentially SCCP.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
* Compile Insn::Const
* Update the comment on JITState
* Print insn index like YJIT
* Wrap and unwrap InsnId
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/17)
* Rename --zjit-dump-ssa to --zjit-dump-hir
* Update comments
* Add a comment on iseq_to_hir
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/13)
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|