[interp] Add super instructions for field storing (#17525)
commitb7ef7363382757c2951a7a84026d5a1baa7f0130
authorVlad Brezae <brezaevlad@gmail.com>
Thu, 24 Oct 2019 15:05:04 +0000 (24 18:05 +0300)
committerGitHub <noreply@github.com>
Thu, 24 Oct 2019 15:05:04 +0000 (24 18:05 +0300)
treea34624eceeb5d260de301d46c2c64ede6de8ca90
parent6fd07e47457587cf2679e597d90b372d1f4a6e3e
[interp] Add super instructions for field storing (#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
mono/mini/interp/interp.c
mono/mini/interp/mintops.def
mono/mini/interp/mintops.h
mono/mini/interp/transform.c