[interp] Replace frame_objref with a volatile store to local. (mono/mono#16790)
authorJay Krell <jaykrell@microsoft.com>
Fri, 13 Sep 2019 02:39:02 +0000 (19:39 -0700)
committerLarry Ewing <lewing@microsoft.com>
Fri, 13 Sep 2019 02:39:02 +0000 (21:39 -0500)
commite542474b5d45d69ce0e1eb596f7b265327bfa172
treeaa063ba74cb851aa77853a9d0b9806256b3f0732
parent38c0fae3241d6f5bc09158054f4d97f2f186937e
[interp] Replace frame_objref with a volatile store to local. (mono/mono#16790)

* [interp] Replace frame_objref with volatile stores to non-volatile locals.
Non-volatiles subject to volatile read/write still get stack-packed.
Volatiles do not.

This will possibly conserve stack, unless MINT_NEWOBJ_FAST is critical path.
 It looks like it is -- enabling this for Linux/gcc/amd64 grows
  frame from 0x98 to 0xA8.

In either case, it is more efficient as the reads do not have to be volatile.
The value can be on the stack and in registers. The stack value will pin it.

* PR: Comments.

* PR: Rearrange comment for correctness, same length.

Commit migrated from https://github.com/mono/mono/commit/735b2cd20c51a926aae93f50903b4e022e851c58
src/mono/mono/mini/interp/interp-internals.h
src/mono/mono/mini/interp/interp.c