summaryrefslogtreecommitdiff
path: root/ujit_core.c
AgeCommit message (Collapse)Author
2021-10-20Yet Another Ruby JIT!Jose Narvaez
Renaming uJIT to YJIT. AKA s/ujit/yjit/g.
2021-10-20Machinery to implement deferred compilationMaxime Chevalier-Boisvert
2021-10-20YJIT: fix leak, remove unused field on block_tAlan Wu
This field was never used and is now covered by jit_mov_gc_ptr.
2021-10-20YJIT: Use 2D array to group block versionsAlan Wu
For deferred compilation, we sometimes want to care about the order of the block versions. Use an array instead of a linked list to do that.
2021-10-20WIP refactor block lists to use darrayMaxime Chevalier-Boisvert
2021-10-20At jit_at_current_insn, jit_peek_at_stack functionsMaxime Chevalier-Boisvert
2021-10-20Update ec->cfp->pc when hitting a stub.Maxime Chevalier-Boisvert
2021-10-20Thread EC through jit state. Add codegen status enum.Maxime Chevalier-Boisvert
2021-10-20uJIT: Implement opt_getinlinecacheAlan Wu
* ujit: implement opt_getinlinecache Aggressively bet that writes to constants don't happen and invalidate all opt_getinlinecache blocks on any and all constant writes. Use alignment padding on block_t to track this assumption. No change to sizeof(block_t). * Fix compile warnings when not RUBY_DEBUG * Fix reversed condition * Switch to st_table to keep track of assumptions Co-authored-by: Aaron Patterson <aaron.patterson@gmail.com> Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2021-10-20Remove dead codeAlan Wu
2021-10-20Use rb_darray_make in ujitAlan Wu
2021-10-20Use darray for incoming branchesMaxime Chevalier-Boisvert
2021-10-20Free your memories!Alan Wu
2021-10-20Mark and update object references in generated codeAlan Wu
Co-authored-by: Maxime Chevalier-Boisvert <maximechevalierb@gmail.com>
2021-10-20Ujit bug fixesAlan Wu
* uJIT: don't compile tailcalls * Don't compile calls to protected methods We need to generate extra code to check whether the call goes through if we want to support these. * Fix copy pasta * Update blockids in branches * Update dependencies
2021-10-20Stop printing when invalidating uJIT blocksAlan Wu
2021-10-20Fix compiled iseq count statMaxime Chevalier-Boisvert
2021-10-20Tie lifetime of uJIT blocks to iseqsAlan Wu
* Tie lifetime of uJIT blocks to iseqs Blocks weren't being freed when iseqs are collected. * Add rb_dary. Use it for method dependency table * Keep track of blocks per iseq Remove global version_tbl * Block version bookkeeping fix * dary -> darray * free ujit_blocks * comment about size of ujit_blocks
2021-10-20Copy right number of bytes in add_incomingAlan Wu
2021-10-20Free block->incoming in invalidate_block_version()Maxime Chevalier-Boisvert
2021-10-20fix: ensure add_incoming allocates the proper length memoryMike Dalessio
Without this fix, valgrind reports for zero-length blocks: ==149294== Invalid write of size 4 ==149294== at 0x408121: add_incoming (ujit_core.c:173) ==149294== by 0x408121: gen_block_version (ujit_core.c:286) ==149294== by 0x40873C: gen_entry_point (ujit_core.c:303) ==149294== by 0x3609DF: rb_ujit_compile_iseq (ujit_iface.c:319) ==149294== by 0x33BD2F: mjit_exec (mjit.h:158) ==149294== by 0x33BD2F: rb_vm_exec (vm.c:2167) ... ==149294== Address 0x11278850 is 0 bytes inside a block of size 1 alloc'd ==149294== at 0x483B7F3: malloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so) ==149294== by 0x40811B: add_incoming (ujit_core.c:171) ==149294== by 0x40811B: gen_block_version (ujit_core.c:286) ==149294== by 0x40873C: gen_entry_point (ujit_core.c:303) ==149294== by 0x3609DF: rb_ujit_compile_iseq (ujit_iface.c:319) ==149294== by 0x33BD2F: mjit_exec (mjit.h:158) ==149294== by 0x33BD2F: rb_vm_exec (vm.c:2167)
2021-10-20WIP JIT-to-JIT returnsMaxime Chevalier-Boisvert
2021-10-20Fix bug unnecessarily causing version limit hitMaxime Chevalier-Boisvert
2021-10-20Fix overflow check in ujitMaxime Chevalier-Boisvert
2021-10-20Alan & Max at TanagraMaxime Chevalier-Boisvert
2021-10-20Implement block version limitMaxime Chevalier-Boisvert
2021-10-20Fix bug, block added with wrong blockid.Maxime Chevalier-Boisvert
2021-10-20Keep track of multiple versions per blockidMaxime Chevalier-Boisvert
2021-10-20Make find_block_version() do list searchMaxime Chevalier-Boisvert
2021-10-20Write ctx_diff() function to compate ctx_t objectsMaxime Chevalier-Boisvert
2021-10-20Add support for multiple versions per blockMaxime Chevalier-Boisvert
2021-10-20Added comments. Fixed compiler warning.Maxime Chevalier-Boisvert
2021-10-20Remove assert that doesn't compileAlan Wu
2021-10-20Prototype type-specialization for temp valuesMaxime Chevalier-Boisvert
2021-10-20Take VM lock in branch_stub_hit(), fix ractor deadlock.Maxime Chevalier-Boisvert
2021-10-20Fix ujit block hash table bugMaxime Chevalier-Boisvert
2021-10-20Fix bug with ujit code invalidationMaxime Chevalier-Boisvert
2021-10-20Added gen_direct_jump() for unary branchesMaxime Chevalier-Boisvert
2021-10-20Complete refactoring to eliminate recursion in ujit's compilationMaxime Chevalier-Boisvert
2021-10-20Fix ujit cc/cme invalidation code for opt_send_without_blockMaxime Chevalier-Boisvert
2021-10-20Sketch code to invalidate basic blocks. Rename version_t to block_t.Maxime Chevalier-Boisvert
2021-10-20Keep track of incoming branches in ujitMaxime Chevalier-Boisvert
2021-10-20Refactor ujit logic for generating iseq entry pointsMaxime Chevalier-Boisvert
2021-10-20Progress on code invalidationMaxime Chevalier-Boisvert
2021-10-20Introduce version_t struct. Will be needed for code invalidation.Maxime Chevalier-Boisvert
2021-10-20Fix hash map key issueMaxime Chevalier-Boisvert
2021-10-20Refactorings in ujit. Implement Ruby jump instruction.Maxime Chevalier-Boisvert
2021-10-20Avoid generating redundant interpreter exit code after branchesMaxime Chevalier-Boisvert
2021-10-20Use a versioning context when compiling blocksMaxime Chevalier-Boisvert
2021-10-20Split out context object into jitstate_t and ctx_tMaxime Chevalier-Boisvert