* 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
* 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
* .
* Assert everything is compiled in test_zjit
* Update a comment on rb_zjit_assert_compiles
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
* Add a comment about assert_compiles
* Actually use pipe_fd
---------
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
* 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
* Implement FixnumAdd and stub PatchPoint/GuardType
Co-authored-by: Max Bernstein <max.bernstein@shopify.com>
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
* Clone Target for arm64
* Use $create instead of use create
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
* Fix misindentation from suggested changes
* Drop an unneeded variable for mut
* Load operand into a register only if necessary
---------
Co-authored-by: Max Bernstein <max.bernstein@shopify.com>
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
* Profile instructions for fixnum arithmetic
* Drop PartialEq from Type
* Do not push PatchPoint onto the stack
* Avoid pushing the output of the guards
* Pop operands after guards
* Test HIR from profiled runs
* Implement Display for new instructions
* Drop unused FIXNUM_BITS
* Use a Rust function to split lines
* Use Display for GuardType operands
Co-authored-by: Max Bernstein <max@bernsteinbear.com>
* Fix tests with Display-ed values
---------
Co-authored-by: Max Bernstein <max@bernsteinbear.com>
* Add zjit_* instructions to profile the interpreter
* Rename FixnumPlus to FixnumAdd
* Update a comment about Invalidate
* Rename Guard to GuardType
* Rename Invalidate to PatchPoint
* Drop unneeded debug!()
* Plan on profiling the types
* Use the output of GuardType as type refined outputs
This is a left-over from https://github.com/Shopify/zjit/pull/12.
It was supposed to be removed from both workflows in the PR, but this
was somehow uncommitted.
The 2024 edition pointed out that setting env vars in multiple threaded
programs is unsafe, due to it being thread unsafe in glibc. Sure don't
want to crash while already crashing! Always grab a backtrace with
force_backtrace().