[interp] Add super instructions for field storing (mono/mono#17525)
authorVlad Brezae <brezaevlad@gmail.com>
Thu, 24 Oct 2019 15:05:04 +0000 (18:05 +0300)
committerGitHub <noreply@github.com>
Thu, 24 Oct 2019 15:05:04 +0000 (18:05 +0300)
commit53929d630f0e6b55be049e914dfb886f1ef3a385
tree8f18a21e25455221b34f3571fdb30e3926512cbe
parentc619d18853b2fcd8b0eb301bcf6f71fee6e954f3
[interp] Add super instructions for field storing (mono/mono#17525)

* [interp] Add also floating versions for stloc.np

* [interp] Add super instructions for stfld

When storing into a field of a local or an argument (ldloc/ldarg -> random instructions that end up pushing one value -> stfld). We add this instruction to the cprop pass because the instructions that are optimized together are not consecutive and we need the stack information to be able to access the instruction that loaded the argument / local and to make sure that the local wasn't dirtied. Alternatively we could make the super instruction pass stack aware, which we should probably do if more super instruction candidates turn out to require stack state information.

* [interp] Enable cprop for methods without locals

We do some optimizations here that don't apply to locals.

* [interp] Fix result stack type of CEE_CONV_OVF_I_UN

Commit migrated from https://github.com/mono/mono/commit/b7ef7363382757c2951a7a84026d5a1baa7f0130
src/mono/mono/mini/interp/interp.c
src/mono/mono/mini/interp/mintops.def
src/mono/mono/mini/interp/mintops.h
src/mono/mono/mini/interp/transform.c