[llvm] Fix patching of calls from LLVM JITted code. (#14520)
commitccb505b6ecc478cfc4ca9d30af1164a41685c298
authorZoltan Varga <vargaz@gmail.com>
Mon, 20 May 2019 14:22:26 +0000 (20 10:22 -0400)
committerGitHub <noreply@github.com>
Mon, 20 May 2019 14:22:26 +0000 (20 10:22 -0400)
treeb5799500a6a944c557bcf0016ebdbc6167204307
parentc2118341c634fd845d3ab15304bdf3fa84191841
[llvm] Fix patching of calls from LLVM JITted code. (#14520)

* [runtime] Fix mono_icall_get_wrapper_full () to always compile the wrapper even if a trampoline was created previously.

* [jit] Add a mini_patch_llvm_jit_callees () function to patch callsite variables for LLVM JIT.

* [llvm] Patch LLVM JIT callees in trampolines as well. Patching after a method is compiled is not enough, since new callsites can be created after a method has been compiled.

* [llvm] Cleanup calls from JITted code. Compile referenced jit icall wrappers immediately, since the calls will not be patched.

* Add a missing MONO_LLVM_INTERNAL.
mono/mini/mini-llvm.c
mono/mini/mini-runtime.c
mono/mini/mini-runtime.h
mono/mini/mini-trampolines.c
mono/mini/mini.c