summaryrefslogtreecommitdiff
path: root/yjit_codegen.c
AgeCommit message (Collapse)Author
2021-10-20Implement opt_freeze and opt_uminus (#49)John Hawthorn
2021-10-20Increase default YJIT call threshold to 10. Add exec mem size arg. (#52)Maxime Chevalier-Boisvert
2021-10-20Merge pull request #50 from jhawthorn/detect_typeJohn Hawthorn
Detect types from putobject and getinlinecache
2021-10-20Add commentMaxime Chevalier-Boisvert
2021-10-20Add T_OBJECT check to getivarMaxime Chevalier-Boisvert
2021-10-20Implement opt_not with deferred compilation (#44)Maxime Chevalier-Boisvert
2021-10-20Avoid interrupt checks for forward branches (#41)Maxime Chevalier-Boisvert
2021-10-20Implement defined bytecode (#39)Maxime Chevalier-Boisvert
2021-10-20Implement opt_nil_p and opt_empty_b by delegating to send (#35)Maxime Chevalier-Boisvert
2021-10-20Implement setivar with a plain old function call (#34)Maxime Chevalier-Boisvert
* Implement setivar with a plain old function call * Remove return
2021-10-20Implement getblockparamproxyAlan Wu
* Implement getblockparamproxy * Parallel runner: wait for timeout thread to terminate after killing Or else the leak cheaker could sees the thread as running and cause test failures in test-tool. * Add a comment, use jne * Comment about where 0x3 comes from
2021-10-20Deletate to opt_send_without_block for opt_ltlt (#33)Maxime Chevalier-Boisvert
2021-10-20Implement opt_aset as interpreter handler callMaxime Chevalier-Boisvert
2021-10-20Implement opt_mod as call to interpreter function (#29)Maxime Chevalier-Boisvert
2021-10-20Implement opt_eq by calling interpreter function (#28)Maxime Chevalier-Boisvert
2021-10-20Implement branchnil bytecode (#26)Maxime Chevalier-Boisvert
2021-10-20Check for easy-to-handle cases of block param (#24)Alan Wu
In some cases, methods taking block parameters don't require extra paramter setup. They are fairly popular in railsbench.
2021-10-20Implement send with alias method (#23)Maxime Chevalier-Boisvert
* Implement send with alias method * Add alias_method tests
2021-10-20Implement send with blocksAlan Wu
* Implement send with blocks Not that much extra work compared to `opt_send_without_block`. Moved the stack over flow check because it could've exited after changes are made to cfp. * rename oswb counters * Might as well implement sending block to cfuncs * Disable sending blocks to cfuncs for now * Reconstruct interpreter sp before calling into cfuncs In case the callee cfunc calls a method or delegates to a block. This also has the side benefit of letting call sites that sometimes are iseq calls and sometimes cfunc call share the same successor. * only sync with interpreter sp when passing a block Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com> Co-authored-by: Aaron Patterson <aaron.patterson@shopify.com>
2021-10-20Implement dupn for n==2 (only case used in RDoc/railsbench) (#20)Maxime Chevalier-Boisvert
* Implement dupn for n==2 (only case used in RDoc/railsbench) * Implement adjuststack bytecode
2021-10-20Use rb_ivar_get() for general case of getivar (#17)Alan Wu
* Use rb_ivar_get() for general case of getivar Pretty straight forward. Buys about 1% coverage on railsbench. * Update yjit_codegen.c Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2021-10-20Implement setn bytecode (#15)Maxime Chevalier-Boisvert
2021-10-20Implement calls to methods with simple optional paramsAlan Wu
* Implement calls to methods with simple optional params * Remove unnecessary MJIT_STATIC See comment for MJIT_STATIC. I added it not knowing whether it's required because the function next to it has it. Don't use it and wait for problems to come up instead. * Better naming, some comments * Count bailing on kw only iseqs On railsbench: ``` opt_send_without_block exit reasons: bmethod 59729 (27.7%) optimized_method 59137 (27.5%) iseq_complex_callee 41362 (19.2%) alias_method 33346 (15.5%) callsite_not_simple 19170 ( 8.9%) iseq_only_keywords 1300 ( 0.6%) kw_splat 1299 ( 0.6%) cfunc_ruby_array_varg 18 ( 0.0%) ```
2021-10-20Implement greedy versioning. Refactor versioning logic. (#10)Maxime Chevalier-Boisvert
* Implement eager versioning. Refactor versioning logic. * Add --version-limit and --greedy-versioning command-line args
2021-10-20Make gen_opt_aref() delegate to gen_opt_send_without_block() (#9)Alan Wu
Basically mirroring the interpreter for the general case.
2021-10-20Comment editsAlan Wu
2021-10-20Aesthetic changes and add missing counterMaxime Chevalier-Boisvert
2021-10-20EnglishAlan Wu
2021-10-20Use jmp with memory operand for smaller code sizeAlan Wu
2021-10-20YJIT: use a context-free landing pad to optimize `leave`Alan Wu
This allows gen_leave to always do an indirect to cfp->jit_return.
2021-10-20Don't check if value is immediate if context has type infoMaxime Chevalier-Boisvert
2021-10-20Remove redundant movMaxime Chevalier-Boisvert
2021-10-20Fix frozen check (use jnz) and move heap object check.Maxime Chevalier-Boisvert
2021-10-20Improve set instance variableAaron Patterson
This commit improves the set ivar implementation.
2021-10-20Pass self type through method callsMaxime Chevalier-Boisvert
2021-10-20Malloc branch entries (#112)Maxime Chevalier-Boisvert
* Malloc branch entries * Add ASM comment for stack overflow check * WIP * Fix branch GC code. Add rb_darray_remove_unordered(). * Fix block end_pos after branch rewriting. Remove dst_patched bits.
2021-10-20Merge pull request #114 from Shopify/yjit-dup-commentsMaxime Chevalier-Boisvert
YJIT: Avoid adding duplicate code comments
2021-10-20Switch to 2-comparison heap object checkMaxime Chevalier-Boisvert
2021-10-20Improve codegen and type tracking in putobjectMaxime Chevalier-Boisvert
2021-10-20Remove debug printsMaxime Chevalier-Boisvert
2021-10-20Fix local type tracking in getlocal, setlocal. Add test.Maxime Chevalier-Boisvert
2021-10-20WIPMaxime Chevalier-Boisvert
2021-10-20Use a insn_opnd instead of a boolAlan Wu
2021-10-20move assert. opnd.idx doesn't make sense for OPND_SELFAlan Wu
2021-10-20YJIT: implement calls to ivar getter methodsAlan Wu
2021-10-20Re-enable local type tracking, until first callMaxime Chevalier-Boisvert
2021-10-20Update yjit_codegen.cMaxime Chevalier-Boisvert
2021-10-20Factor our guard_two_fixnums(). Implement opt_or.Maxime Chevalier-Boisvert
2021-10-20Introduce concept of YJIT instruction operandsMaxime Chevalier-Boisvert
2021-10-20YJIT: Fancier opt_getinlinecacheAlan Wu
Make sure `opt_getinlinecache` is in a block all on its own, and invalidate it from the interpreter when `opt_setinlinecache`. It will recompile with a filled cache the second time around. This lets YJIT runs well when the IC for constant is cold.