about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage/debug.rs
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2020-12-25 11:41:48 +0100
committerbjorn3 <bjorn3@users.noreply.github.com>2020-12-25 12:08:21 +0100
commit3f6a3b5ebece5f6d3b1010b68a5fd86756593098 (patch)
treeb57a10461b73d921be7fbbab4ed2d6159b0b6c78 /compiler/rustc_mir/src/transform/coverage/debug.rs
parent0b9b2532d262bf590b769a7cd2f32602b8925183 (diff)
downloadrust-3f6a3b5ebece5f6d3b1010b68a5fd86756593098.tar.gz
rust-3f6a3b5ebece5f6d3b1010b68a5fd86756593098.zip
Implement lazy compilation in JIT mode
Lazy compilation has the potential to significantly improve the startup
time of a program. While functions have to be codegened when called, it
is expected that a significant amount of all code is only required when
an error occurs or only when the program is used in certain ways.

The basic approach is to first codegen a shim for each function. This
shim calls the `__cg_clif_jit` function of cg_clif with a pointer to the
`Instance` corresponding to the function for which it is a shim.
`__cg_clif_jit` function then codegens this function and uses the hot
code swapping support of SimpleJIT to redirect future calls to the
function to the real version. Finally it calls the newly codegened
function.
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions