[ruby-cvs:71079] k0kubun:r63988 (trunk): mjit_compile.c: resurrect local variable stack

k0kubun at ruby-lang.org k0kubun at ruby-lang.org
Wed Jul 18 00:09:42 JST 2018


k0kubun	2018-07-18 00:09:41 +0900 (Wed, 18 Jul 2018)

  New Revision: 63988

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

  Log:
    mjit_compile.c: resurrect local variable stack
    
    This optimization was reverted on r63863, but this commit resurrects the
    optimization to skip some sp motions on JIT execution.
    
    tool/ruby_vm/views/_mjit_compile_insn_body.erb: ditto
    tool/ruby_vm/views/_mjit_compile_insn.erb: ditto
    
    insns.def: resurrect handles_frame as handles_stack, which was deleted
    on r63763.
    tool/ruby_vm/models/bare_instructions.rb: ditto
    
    vm_insnhelper.c: prevent moving sp outside insns.def to allow modifying
    it by JIT.
    
    * Optcarrot benchmark
    
    $ benchmark-driver benchmark.yml --rbenv 'before --jit;after --jit' --repeat-count 12 -v
    before --jit: ruby 2.6.0dev (2018-07-17 trunk 63987) +JIT [x86_64-linux]
    after --jit: ruby 2.6.0dev (2018-07-17 local-stack 63987) +JIT [x86_64-linux]
    last_commit=mjit_compile.c: resurrect local variable stack
    Calculating -------------------------------------
                             before --jit  after --jit
    Optcarrot Lan_Master.nes       70.518       72.144 fps
    
    Comparison:
                 Optcarrot Lan_Master.nes
                 after --jit:        72.1 fps
                before --jit:        70.5 fps - 1.02x  slower

  Modified files:
    trunk/insns.def
    trunk/mjit_compile.c
    trunk/tool/ruby_vm/models/bare_instructions.rb
    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


More information about the ruby-cvs mailing list