ruby/tool/ruby_vm/views
Takashi Kokubun 37a2e48d76
Avoid generating opt_send with cfunc cc with JIT
only for opt_nil_p and opt_not.

While vm_method_cfunc_is is used for opt_eq too, many fast paths of it
don't call it. So if it's populated, it should generate opt_send,
regardless of cfunc or not. And again, opt_neq isn't relevant due to the
difference in operands.
So opt_nil_p and opt_not are the only variants using vm_method_cfunc_is
like they use.

```
$ benchmark-driver -v --rbenv 'before2 --jit::ruby --jit;before --jit;after --jit' benchmark/mjit_opt_cc_insns.yml --repeat-count=4
before2 --jit: ruby 2.8.0dev (2020-06-22T08:37:37Z master 3238641750) +JIT [x86_64-linux]
before --jit: ruby 2.8.0dev (2020-06-23T01:01:24Z master 9ce2066209) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-06-23T06:58:37Z master 17e9df3157) +JIT [x86_64-linux]
last_commit=Avoid generating opt_send with cfunc cc with JIT
Calculating -------------------------------------
                     before2 --jit  before --jit  after --jit
        mjit_nil?(1)       54.204M       75.536M      75.031M i/s -     40.000M times in 0.737947s 0.529548s 0.533110s
         mjit_not(1)       53.822M       70.921M      71.920M i/s -     40.000M times in 0.743195s 0.564007s 0.556171s
     mjit_eq(1, nil)        7.367M        6.496M       7.331M i/s -      8.000M times in 1.085882s 1.231470s 1.091327s

Comparison:
                     mjit_nil?(1)
        before --jit:  75536059.3 i/s
         after --jit:  75031409.4 i/s - 1.01x  slower
       before2 --jit:  54204431.6 i/s - 1.39x  slower

                      mjit_not(1)
         after --jit:  71920324.1 i/s
        before --jit:  70921063.1 i/s - 1.01x  slower
       before2 --jit:  53821697.6 i/s - 1.34x  slower

                  mjit_eq(1, nil)
       before2 --jit:   7367280.0 i/s
         after --jit:   7330527.4 i/s - 1.01x  slower
        before --jit:   6496302.8 i/s - 1.13x  slower
```
2020-06-23 00:09:54 -07:00
..
_attributes.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
_c_expr.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
_comptime_insn_stack_increase.erb Combine call info and cache to speed up method invocation 2019-10-24 18:03:42 +09:00
_copyright.erb [ci skip] grammers in comments 2019-04-23 10:27:44 +09:00
_insn_entry.erb Verify builtin inline annotation with VM_CHECK_MODE (#3244) 2020-06-21 10:27:04 -07:00
_insn_len_info.erb _insn_len_info.erb: add ASSERT_VM_INSTRUCTION_SIZE 2019-01-31 05:00:41 +00:00
_insn_name_info.erb _insn_name_info.erb: use C99 2019-01-31 04:46:03 +00:00
_insn_operand_info.erb _insn_operand_info.erb: use C99 2019-01-31 05:22:58 +00:00
_insn_sp_pc_dependency.erb Introduce frame-omitted method inlining 2019-04-16 17:02:16 +00:00
_insn_type_chars.erb _insn_type_chars.erb: use C99 2019-01-31 05:36:17 +00:00
_leaf_helpers.erb Avoid top-level search for nested constant reference from nil in defined? 2019-11-13 15:36:58 +09:00
_mjit_compile_insn.erb Delay definition of pc_moved_p 2020-04-06 01:55:18 -07:00
_mjit_compile_insn_body.erb Make sure newarraykwsplat accesses a correct index 2020-04-18 01:41:50 -07:00
_mjit_compile_ivar.erb Optimize exivar access on JIT-ed getivar 2020-03-30 23:16:35 -07:00
_mjit_compile_pc_and_sp.erb Delay definition of pc_moved_p 2020-04-06 01:55:18 -07:00
_mjit_compile_send.erb Avoid generating opt_send with cfunc cc with JIT 2020-06-23 00:09:54 -07:00
_notice.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
_sp_inc_helpers.erb VALUE size packed callinfo (ci). 2020-02-22 09:58:59 +09:00
_trace_instruction.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
insns.inc.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
insns_info.inc.erb Combine call info and cache to speed up method invocation 2019-10-24 18:03:42 +09:00
mjit_compile.inc.erb Avoid generating opt_send with cfunc cc with JIT 2020-06-23 00:09:54 -07:00
opt_sc.inc.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
optinsn.inc.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
optunifs.inc.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
vm.inc.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00
vmtc.inc.erb delete emacs mode lines [ci skip] 2018-12-27 06:12:09 +00:00