Age | Commit message (Collapse) | Author |
|
Otherwise we might have stale types floating around
Notes:
Merged: https://github.com/ruby/ruby/pull/13162
|
|
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
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13162
|
|
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]>
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/111)
This makes the output a little nicer when doing --zjit-dump-hir=all
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
* 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
|
|
Helps with readability and threads type info that's there around for
longer. Amend test so `GuardType` doesn't DCE'ed.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
We need to keep the Snapshot instruction alive.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
We don't want to only guard on the class
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/99)
* Disable ZJIT profiling at call-threshold
* Stop referencing ZJIT instructions in codegen
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
* Add --zjit-profile-interval option
* Fix min to max
* Avoid rewriting instructions for --zjit-call-threshold=1
* Rename the option to --zjit-num-profiles
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
|
|
(https://github.com/Shopify/zjit/pull/96)
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
|
|
We want to return representatives for the stack and locals.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
* Remove redundant statements
* Remove .clone() since A64 implements Copy
* Remove .clone() since InsnId implements Copy
.
* Dereference since *const rb_call_data implements Copy
* Remove unnecessary return statement
* Remove unnecessary braces
* Use .is_empty() over length checks
* Remove unnecessary conversion handling
Since i32 can always fit into i64 (the inner type in Opnd::Imm), the conversion is infallibile.
* Use slice notation in lieu of Vec
https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
* Simplify match statement
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
(https://github.com/Shopify/zjit/pull/90)
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Initialize with a vector of operands instead of ArraySet instructions.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Dead code elimination (DCE) is like garbage collection for your HIR
graph: it removes instructions that are not referenced by the "root
set"---in this case, the instructions marked critical.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Only emit them on-demand.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
https://github.com/Shopify/zjit/pull/87#discussion_r2025152210
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
|
|
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
|
|
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
|
|
We want to otherwise see real pointers in print output.
Notes:
Merged: https://github.com/ruby/ruby/pull/13131
|
|
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
|