[ruby-cvs:71090] k0kubun:r63999 (trunk): mjit_compile.c: reduce sp motion on JIT

k0kubun at ruby-lang.org k0kubun at ruby-lang.org
Thu Jul 19 22:25:23 JST 2018


k0kubun	2018-07-19 22:25:22 +0900 (Thu, 19 Jul 2018)

  New Revision: 63999

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63999

  Log:
    mjit_compile.c: reduce sp motion on JIT
    
    This retries r62655, which was reverted at r63863 for r63763.
    
    tool/ruby_vm/views/_mjit_compile_insn.erb: revert the revert.
    tool/ruby_vm/views/_mjit_compile_insn_body.erb: ditto.
    tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb: ditto.
    tool/ruby_vm/views/_mjit_compile_send.erb: ditto.
    tool/ruby_vm/views/mjit_compile.inc.erb: ditto.
    
    tool/ruby_vm/views/_insn_entry.erb: revert half of r63763. The commit
      was originally reverted since changing pc motion was bad for tracing,
      but changing sp motion was totally fine. For JIT, I wanna resurrect
      the sp motion change in r62051.
    tool/ruby_vm/models/bare_instructions.rb: ditto.
    insns.def: ditto.
    vm_insnhelper.c: ditto.
    vm_insnhelper.h: ditto.
    
    * benchmark
    
    $ benchmark-driver benchmark.yml --rbenv 'before;after;before --jit;after --jit' --repeat-count 12 -v
    before: ruby 2.6.0dev (2018-07-19 trunk 63998) [x86_64-linux]
    after: ruby 2.6.0dev (2018-07-19 add-sp 63998) [x86_64-linux]
    last_commit=mjit_compile.c: reduce sp motion on JIT
    before --jit: ruby 2.6.0dev (2018-07-19 trunk 63998) +JIT [x86_64-linux]
    after --jit: ruby 2.6.0dev (2018-07-19 add-sp 63998) +JIT [x86_64-linux]
    last_commit=mjit_compile.c: reduce sp motion on JIT
    Calculating -------------------------------------
                                 before       after  before --jit  after --jit
    Optcarrot Lan_Master.nes     51.354      50.238        70.010       72.139 fps
    
    Comparison:
                 Optcarrot Lan_Master.nes
                 after --jit:        72.1 fps
                before --jit:        70.0 fps - 1.03x  slower
                      before:        51.4 fps - 1.40x  slower
                       after:        50.2 fps - 1.44x  slower

  Modified files:
    trunk/insns.def
    trunk/mjit_compile.c
    trunk/tool/ruby_vm/models/bare_instructions.rb
    trunk/tool/ruby_vm/views/_insn_entry.erb
    trunk/tool/ruby_vm/views/_mjit_compile_insn.erb
    trunk/tool/ruby_vm/views/_mjit_compile_insn_body.erb
    trunk/tool/ruby_vm/views/_mjit_compile_pc_and_sp.erb
    trunk/tool/ruby_vm/views/_mjit_compile_send.erb
    trunk/tool/ruby_vm/views/mjit_compile.inc.erb
    trunk/vm_insnhelper.c
    trunk/vm_insnhelper.h


More information about the ruby-cvs mailing list