bjorn3
a0cdbd1aa6
Rustfmt
2021-07-05 18:44:37 +02:00
bjorn3
6a31385363
Misc target related improvements
2021-07-03 14:28:53 +02:00
Alan Egerton
4a7068dbfc
Ensure Instances are only jitted once
2021-06-17 09:42:38 +01:00
Alan Egerton
2945b96e58
Multithreading support for lazy-jit
2021-06-17 09:42:37 +01:00
bjorn3
2f9ca10b1d
Update Cranelift, object and gimli
2021-05-24 16:06:54 +02:00
bjorn3
8a2520c1dc
Sync from rust a5560a6a90
2021-05-18 19:42:37 +02:00
Camille GILLOT
915d766307
Use () for codegen queries.
2021-05-12 13:58:46 +02:00
Camille GILLOT
f22ab98d4c
Use () in dependency_formats.
2021-05-12 13:58:41 +02:00
bjorn3
7c40338ba1
Implement imported_main feature
...
Fixes #1164
2021-05-11 14:22:23 +02:00
Erin Power
df68e5ac73
[cg_clif] Fix run_jit from sync
2021-04-30 15:37:19 +02:00
Erin Power
ee570b1302
Sync rustc_codegen_cranelift ' ddd4ce2553'
2021-04-30 14:49:58 +02:00
Charles Lew
fa559fb2df
Implement RFC 1260 with feature_name imported_main.
2021-04-29 08:35:08 +08:00
bjorn3
e01de0f58d
Avoid .to_string() for symbol names where possible
2021-04-18 10:37:02 +02:00
bjorn3
ff38b37769
Fix docs
2021-04-14 15:16:02 +02:00
bjorn3
eed9aaa268
Extract create_jit_module function
2021-04-14 15:05:57 +02:00
bjorn3
d4d270d503
Merge BACKEND_CONFIG and CURRENT_MODULE thread locals
2021-04-14 15:01:09 +02:00
bjorn3
6fac7f089f
Don't unregister unwind tables after the JIT is done
2021-04-14 15:01:07 +02:00
bjorn3
86530f889e
Use maybe_create_entry_wrapper again in jit mode
...
This simplifies the jit driver a lot
2021-04-14 14:59:36 +02:00
bjorn3
ba8e610b26
Inline driver::codegen_crate
2021-04-14 14:57:04 +02:00
bjorn3
d9e9fedfe5
Remove CodegenCx::finalize and pass Module separately from CodegenCx
2021-04-14 14:57:02 +02:00
bjorn3
b09b8b1bd4
Re-use Context in codegen_shim
2021-04-14 14:20:42 +02:00
bjorn3
65420b50f8
Don't deduplicate anonymous allocations
2021-04-14 10:38:18 +02:00
bjorn3
53bfc6729a
Centralize all configuration into config.rs
2021-04-07 11:52:11 +02:00
bjorn3
07968a001d
Merge commit ' 0969bc6dde' into sync_cg_clif-2021-03-29
2021-03-29 10:45:09 +02:00
bjorn3
94b51d14e6
Make all compiler-builtins symbols hidden
...
This matches cg_llvm
Fixes #1152
2021-03-27 17:32:41 +01:00
bjorn3
56fe51cb36
Update Cranelift
2021-03-21 10:05:22 +01:00
bjorn3
e86b95480f
Directly invoke the main function in JIT mode
...
Fixes #1151
2021-03-17 13:56:54 +01:00
bjorn3
27886cd6b6
Merge commit ' 9a0c32934e' into sync_cg_clif-2021-03-05
2021-03-05 19:12:59 +01:00
bjorn3
5e736293b3
Rustfmt
2021-03-05 11:21:44 +01:00
bjorn3
73d3a1c14a
Use dynamic dispatch for the inner Module
...
This improves compilation time and shrinks the linked backend from
13MB to 9.7MB on Linux.
2021-02-23 18:49:37 +01:00
bjorn3
013b3c5a7c
Rustfmt
2021-02-21 17:03:21 +01:00
bjorn3
4eb6754749
Sync from rust 3e826bb112
2021-02-21 17:02:04 +01:00
bjorn3
25f7eeec46
Don't import the metadata symbol
...
Helps with #1134
2021-02-21 10:40:30 +01:00
bjorn3
f2f5452089
Use real atomic instructions instead of a global lock
2021-02-18 18:14:21 +01:00
Camille GILLOT
fe8d11bb99
Use an ItemId inside mir::GlobalAsm.
2021-02-15 19:24:58 +01:00
bjorn3
94aac0af59
Pass around BackendConfig
2021-02-12 15:39:58 +00:00
bjorn3
c5dff34ae9
Revert "Update libc and libloading"
...
This reverts commit bfcf97bd83 .
It causes a "can't resolve symbol" crash on macOS
2021-02-09 13:19:19 +01:00
bjorn3
bfcf97bd83
Update libc and libloading
2021-02-09 12:40:43 +01:00
bjorn3
a75f9bc3be
Merge commit ' d556c56f79' into sync_cg_clif-2021-02-01
2021-02-01 10:11:46 +01:00
bjorn3
aa23f862dc
Remove vararg support check
...
This check wasn't very useful and removing it simplifies the code.
2021-01-27 10:32:56 +01:00
bjorn3
4555737152
Split symbol name and signature calculation
2021-01-26 15:11:03 +01:00
bjorn3
77f74ed070
Merge commit ' dbee13661e' into sync_cg_clif-2020-12-27
2020-12-27 10:30:38 +01:00
bjorn3
3f6a3b5ebe
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.
2020-12-25 12:08:21 +01:00
bjorn3
0b9b2532d2
Move finalize CodegenCx timer out of codegen mono items timer
2020-12-25 11:49:50 +01:00
bjorn3
20ffea6b8a
Change the way JIT mode is selected
2020-12-25 11:31:33 +01:00
bjorn3
c556e4dd35
Use PIC in JIT mode too
2020-12-25 10:55:11 +01:00
bjorn3
f8e22bfb1b
Update Cranelift
2020-12-12 10:37:10 +01:00
bjorn3
5f21ff20b3
Inline codegen_mono_item
2020-12-04 10:19:50 +01:00
bjorn3
d404840788
Merge commit ' 5988bbd24a' into sync_cg_clif-2020-11-27
2020-11-27 20:48:53 +01:00
bjorn3
db8fa0edfa
Inline codegen_mono_items and outline predefine_mono_items
2020-11-12 17:07:02 +01:00