summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-10-20YJIT: hash specialization for opt_arefAlan Wu
Make it lazy and add a hash specialization in addition to the array specialization.
2021-10-20Exit reason breakdown for opt_arefAlan Wu
2021-10-20YJIT: use a flat array for finding codegen functionsAlan Wu
Simpler and faster.
2021-10-20YJIT: unify exits. Patch iseqs only when necessaryAlan Wu
* YJIT: unify exits. Patch iseqs only when necessary This fixes the gotcha that returning YJIT_CANT_COPMILE for an instruction at entry position leading to infinite loop. Also, iseq patching is only done only when necessary, which should make most exits faster. * Now that exits are the same, return YJIT_CANT_COMPILE
2021-10-20Yjit: rename context structAlan Wu
2021-10-20Fix condition in cb_align_pos which should return early when alignedDylan Thacker-Smith
2021-10-20Update yjit.mdMarc Feeley
Fix a typo in the bibtex.
2021-10-20Tweak include order in yjit_core.cAlan Wu
This is playing it safe. Ruby headers rely on some macros generated by autoconf that affect what system headers behave. We should take care to bring in those configs before including systme headers to stay consistent with the rest of Ruby.
2021-10-20YJIT: lazy polymorphic getinstancevariableAlan Wu
Lazily compile out a chain of checks for different known classes and whether `self` embeds its ivars or not. * Remove trailing whitespaces * Get proper addresss in Capstone disassembly * Lowercase address in Capstone disassembly Capstone uses lowercase for jump targets in generated listings. Let's match it. * Use the same successor in getivar guard chains Cuts down on duplication * Address reviews * Fix copypasta error * Add a comment
2021-10-20Add metric for average # of insns spent in yjit before exitingMaxime Chevalier-Boisvert
2021-10-20Include ruby/ruby.h before vm_core.hAlan Wu
This is how vm.c does it, and if we don't follow it in yjit compilation units, rb_vm_t would have a conflicting size.
2021-10-20Remove trailing whitespacesMaxime Chevalier-Boisvert
2021-10-20Check for nullAlan Wu
Sometimes you bop before you init, you know?
2021-10-20Fix trailing spacesMaxime Chevalier-Boisvert
2021-10-20Update yjit.mdMaxime Chevalier-Boisvert
2021-10-20Make Blocks depend on BOPSAaron Patterson
When a BOP is redefined, the BOP redefinition callback will invalidate any blocks that depend on BOPS. This allows us to eliminate runtime checks for BOP redefinition.
2021-10-20Update yjit.mdMaxime Chevalier-Boisvert
2021-10-20Update yjit.mdMaxime Chevalier-Boisvert
2021-10-20Yet Another Ruby JIT!Jose Narvaez
Renaming uJIT to YJIT. AKA s/ujit/yjit/g.
2021-10-20YJIT: handle when all counters are zero in printout codeAlan Wu
Also filter with not equal to zero instead of greater than zero, in case there is memory corruption and counters are negative. Fixes Shopify/ruby#70
2021-10-20Update ujit_core.hMaxime Chevalier-Boisvert
2021-10-20Update ujit_core.hMaxime Chevalier-Boisvert
Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
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-20Rename test filesMaxime Chevalier-Boisvert
2021-10-20Update yjit.mdMaxime Chevalier-Boisvert
2021-10-20Update yjit.mdMaxime Chevalier-Boisvert
2021-10-20Update yjit.mdMaxime Chevalier-Boisvert
2021-10-20Update and rename ujit.md to yjit.mdMaxime Chevalier-Boisvert
2021-10-20WIP refactor block lists to use darrayMaxime Chevalier-Boisvert
2021-10-20Update ujit.mdMaxime Chevalier-Boisvert
2021-10-20uJIT: support 64 bit operands for TEST. Use it to check for zeroAlan Wu
It's one byte shorter than `cmp reg64, 0`. To illustrate: ``` 48 83 f9 00 cmp rcx, 0x0 48 85 c9 test rcx, rcx ```
2021-10-20Add UJIT.reset_stats!Alan Wu
To allow analyzing sections of the application.
2021-10-20uJIT: Add exit counters for leave and refactor stats printout codeAlan Wu
Filter out counters that are zero and make it easier to have multiple printout groups. On `railsbench`: ``` opt_send_without_block exit reasons: se_finish_frame 184809 (100.0%) ```
2021-10-20uJIT: add guards for protected opt_send_without_block callsAlan Wu
These account for about 12% of the time when we were bailing from calls in railsbench. `ratio_in_ujit` went up 0.1% with this change.
2021-10-20At jit_at_current_insn, jit_peek_at_stack functionsMaxime Chevalier-Boisvert
2021-10-20Runtime counters for bailing from opt_send_without_blockAlan Wu
This allows counting things in generated code such as side exits or different reasons for failing to compile. Runtime counters are exposed to Ruby as `UJIT.runtime_stats` for ease of reporting and analysis.
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-20Support memory operands to popMax Bernstein
2021-10-20Update ujit.mdMaxime Chevalier-Boisvert
2021-10-20Update ujit.mdMaxime Chevalier-Boisvert
2021-10-20Update ujit.mdMaxime Chevalier-Boisvert
2021-10-20Support memory operands to pushMax Bernstein
2021-10-20Fix jmp encoding. Rename conditional jumps jxx() to jxx_label()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-20Implement support for variadic C functionsMaxime Chevalier-Boisvert
2021-10-20Update ujit.mdMaxime Chevalier-Boisvert
2021-10-20Update ujit.mdMaxime Chevalier-Boisvert