1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Stop always inlining not-optimized get/setivar

As we have the optimization in _mjit_compile_ivar.erb, we don't use
these functions if we successfully optimize ivars. Therefore it's
consuming code size where we can't optimize it well.

To decrease code size, we'd better avoid inlining them.

```
$ benchmark-driver -v --rbenv 'before --jit;after --jit' benchmark.yml --repeat-count=12 --output=all
before --jit: ruby 2.8.0dev (2020-05-13T04:49:21Z master 61d451d6ce) +JIT [x86_64-linux]
after --jit: ruby 2.8.0dev (2020-05-13T05:46:59Z master a072d323db) +JIT [x86_64-linux]
Calculating -------------------------------------
                                 before --jit           after --jit
Optcarrot Lan_Master.nes     69.8567095356444      73.0360609399857 fps
                             70.3283101279035      74.6106251902062
                             72.9135395729567      75.2797344839106
                             76.6944690546044      77.5705757485036
                             77.0027971817715      78.2269524040059
                             78.5069033659736      78.4457471014131
                             80.1873218604913      80.1273811685818
                             81.3079566400696      81.7148593303302
                             81.7285827817226      81.7637234555871
                             81.7657097839637      82.4520295422720
                             81.8310114206406      82.7532354379759
                             81.9886488857863      82.8358739858206
```
This commit is contained in:
Takashi Kokubun 2020-05-12 22:46:59 -07:00
parent 61d451d6ce
commit fcd2576290
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -60,9 +60,6 @@ module MJITHeader
'vm_opt_aref_with',
'vm_opt_aset_with',
'vm_opt_not',
'vm_getinstancevariable',
'vm_setinstancevariable',
'vm_setivar',
]
# Return start..stop of last decl in CODE ending STOP