Inline TLS access. (mono/mono#16882)
authorJay Krell <jaykrell@microsoft.com>
Sat, 21 Sep 2019 16:35:19 +0000 (09:35 -0700)
committerAlexander Köplinger <alex.koeplinger@outlook.com>
Sat, 21 Sep 2019 16:35:19 +0000 (18:35 +0200)
commit10bc7dbf2b5f854837e6252e14a7280ef3a2878b
treeefa4511a09625251e2e8a4d223d46aeb91a905a3
parent23842a8148a44b4b2613bf1a98f51057ebb55599
Inline TLS access. (mono/mono#16882)

The same functions are referenced by JIT and runtime.
The JIT uses cannot be inlined. The runtime can.
Since I could not get anything else to build and the change is simple and mechanical, now two sets of functions are provided, inline and extern. Extern just calls inline.
This PR appears to change all the uses, but it is only the JIT uses. The runtime ones just work and keep the old names.

We should also consider building desktop with LTO/LTCG, which would do all this automatically, smarter, more generally. A quick experiment shows it grows the runtime size, which is why I say desktop.

Commit migrated from https://github.com/mono/mono/commit/aca55a42aa5117f4406b68b1ac217063cc7ab3ec
src/mono/mono/metadata/jit-icall-reg.h
src/mono/mono/mini/exceptions-amd64.c
src/mono/mono/mini/mini-arm.c
src/mono/mono/mini/mini-ppc.c
src/mono/mono/mini/mini-runtime.c
src/mono/mono/mini/mini-s390x.c
src/mono/mono/utils/mono-tls.c
src/mono/mono/utils/mono-tls.h