[interp] Add inlining of small methods (#11735)
commit765f462bb435495ed3f421b9b78773b1a0bae986
authorVlad Brezae <brezaevlad@gmail.com>
Wed, 21 Nov 2018 16:15:35 +0000 (21 18:15 +0200)
committermonojenkins <jo.shields+jenkins@xamarin.com>
Wed, 21 Nov 2018 16:15:35 +0000 (21 11:15 -0500)
treeffd36772c6c6b837019c617b6399da74b6889825
parentb6a2f252fcbb3a9c04723e3300cedf7c348d7959
[interp] Add inlining of small methods (#11735)

[interp] Add inlining of small methods

Avoid call overhead by inlining small methods. We replace stinarg opcodes with storing of the arguments in locals allocated in the parent frame (for each argument).

TODO
- support for methods with locals
- maybe add inline costs to prevent over inlining

On microbenchmark inlining can improve up to 3.5x (less than the 5x that I observed with jit).

Contributes to #11531
mono/mini/interp/interp-internals.h
mono/mini/interp/interp.c
mono/mini/interp/transform.c