Age | Commit message (Collapse) | Author |
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Split out from the CCall changes since we discussed during pairing that
this is useful to unblock some other changes. No tests since no one
consumes this profiling data yet.
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
|
|
This makes it easier to update cascading test failures while still
making output reviewable in the PR.
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/78)
We don't need this anymore thanks to the push-driven type union for
basic block arguments.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
I've been bit by this a couple times.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Coming out of VALUE did not work for negative numbers; they came out as
huge numbers instead.
Add more tests.
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
|
|
This gives output stability while still showing address equality and
inequality.
This mapping mechanism is only turned on for FunctionPrinter, so
implementation of Display and Debug can share the same code but not go
through the mapping process. Outside of `cfg!(test)` we don't want
and need to stabilize the addresses.
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
|
|
* Refactor push_fixnum_insn! further
* Take one or zero extra argument
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
|
|
Prism hides the objects from the GC by setting the objects' class fields
to 0, so class_of returns 0 (unexpectedly, at least to me). Instead, use
builtin_type.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
* Convert send (with block) to HIR
* Remove newline
Co-authored-by: Maxime Chevalier-Boisvert <[email protected]>
---------
Co-authored-by: Maxime Chevalier-Boisvert <[email protected]>
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
This reverts commit e2eae71d44ced602946d54a083f600848eab79e9.
The $state exists for switching Fixnum insn, so guard_two_fixnums and
SendWithoutBlock shouldn't need to use $state. The other macro argument
pattern doesn't have $state, so it's now inconsistent.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/68)
* Resurrect icache invalidation for arm64
* Get rid of cfg(not(test))
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
We filed https://github.com/Shopify/zjit/pull/65 and
https://github.com/Shopify/zjit/pull/64 concurrently.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Key here is calling rb_call_builtin_inits(), which sticking to public
API for robustness is done by calling ruby_options().
Fixes: https://github.com/Shopify/zjit/issues/61
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
|
|
* cp -r yjit/bindgen zjit/
* Rename YJIT variables
* Stop mentioning YJIT in zjit.c
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
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/52)
* Explicitly give function parameters types
Entrypoint blocks have no predecessors, so they are not otherwise typed.
This means we have to explicitly mark them as being Object.
* Refactor some tests
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/54)
* Add union and predicates for testing if immediate
* Add tests
* Improve description for Primitive
* Add undef to immediates
Also partition Any into (Primitive | Value), where Value is
(Object | Undef)
* Add BasicObject to hierarchy
* Rename Value to RubyValue and Primitive to CValue
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
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/49)
* Add a make target to run all ZJIT tests
* Remove an unused variable
* Write up a document about testing
* Explain zjit-test-all first
* Clarify what's zjit-test-all
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
|
|
This produces errors that look like
thread 'hir::tests::test_display_types' panicked at src/hir.rs:1777:9:
assertion `left == right` failed: Differences found (-expected, +actual):
---
bb0():
v0:NilClassExact = Const Value(nil)
v2:TrueClassExact = Const Value(true)
v6:CBool[true] = Test v2
- IfFalse v6, bb1(v)
+ IfFalse v6, bb1(v2)
v9:Fixnum[3] = Const Value(3)
Return v9
bb1(v12):
v14 = Const Value(4)
Return v14
---
instead of just
left: "bb0():\n v0:NilClassExact = Const Value(nil)\n v2:TrueClassExact = Const Value(true)\n v6:CBool[true] = Test v2\n IfFalse v6, bb1(v2)\n v9:Fixnum[3] = Const Value(3)\n Return v9\nbb1(v12):\n v14 = Const Value(4)\n Return v14\n"
right: "bb0():\n v0:NilClassExact = Const Value(nil)\n v2:TrueClassExact = Const Value(true)\n v6:CBool[true] = Test v2\n IfFalse v6, bb1(v)\n v9:Fixnum[3] = Const Value(3)\n Return v9\nbb1(v12):\n v14 = Const Value(4)\n Return v14\n"
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
* Add RPO
* Add basic flow typing
* Add more tests, check for type bit equality
* Run to fixpoint
* Only use/flow types if insn has an output
* WIP
* WIP 2: merge pred args
* It compiles again
* Infer more Const instructions
* Boot VM
* Test displaying types
* .
* Use type_of more
* Extract Param inference into its own function for readability
* .
* .
* Add notion of unions to generated type bit patterns
* .
* .
* Fix hierarchy for user/exact
* .
* .
* .
* Give ArraySet a receiver
* Use Function::find consistently
* s/fd/find/g
* Comment
* .
* Add TODO about recursion
* FrameStateId
* Use worklist based type inference
This requires computing "uses", or at least which blocks to revisit if
their params change.
* Just use a set
* Revert "Just use a set"
This reverts commit 54d88be00cbf78ce7e928c66d955c968187a5ec9.
* Revert "Use worklist based type inference"
This reverts commit e99b24629723c8848fefd5a75caa23e84c2f552e.
* .
* Store block params separately
* Sparse type inference
* Get tests passing after rebase
* .
* Use assert_method_hir
* .
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/40)
* Assert everything is compiled in test_zjit
* Update a comment on rb_zjit_assert_compiles
Co-authored-by: Maxime Chevalier-Boisvert <[email protected]>
* Add a comment about assert_compiles
* Actually use pipe_fd
---------
Co-authored-by: Maxime Chevalier-Boisvert <[email protected]>
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
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|