Commit graph

1858 commits

Author SHA1 Message Date
Paris DOUADY
3eb649c631 dont set rustflags when no specific linker needed 2021-01-30 16:25:48 +01:00
bjorn3
ae6daf77ba Default to Cranelift newBE 2021-01-22 12:28:32 +01:00
bjorn3
2ced8c0eb0 Fix rust-analyzer pref name 2021-01-21 21:22:19 +01:00
bjorn3
500faf2165
Merge pull request #1127 from bjorn3/newbe
Support building with the new Cranelift backends
2021-01-21 19:55:19 +01:00
bjorn3
da4aa92df1 Test both oldbe and newbe on CI 2021-01-21 19:34:58 +01:00
bjorn3
173ec34e3d Add a feature flag to switch between oldbe and newbe 2021-01-21 19:33:29 +01:00
bjorn3
a19ef67f14 Update Cranelift
This implements everything in the new backend necessary for usage with cg_clif
2021-01-21 19:19:48 +01:00
bjorn3
9bf5cb43ab Fix indirectly linking to libstd.so with the JIT 2021-01-21 16:14:32 +01:00
bjorn3
7f60301a7a Disable new failing libcore tests 2021-01-21 15:19:31 +01:00
bjorn3
c0aefeb5b7 Rustup to rustc 1.51.0-nightly (a4cbb44ae 2021-01-20) 2021-01-21 14:51:28 +01:00
bjorn3
cfedad1f75 Clear domtree after cg_clif optimizations 2021-01-16 13:05:23 +01:00
bjorn3
1952b1ffae Update dependencies 2021-01-16 11:50:58 +01:00
bjorn3
c34e165c66 Update Cranelift 2021-01-16 11:46:21 +01:00
bjorn3
3ea8915d4a Disable timings by default for cargo.sh
Fixes #1121
2021-01-06 14:54:19 +01:00
bjorn3
1a1cdac930 Remove code that was moved from the backend to rustc_incremental 2021-01-02 16:59:23 +01:00
bjorn3
2c41a6953b Rustup to rustc 1.51.0-nightly (44e3daf5e 2020-12-31) 2021-01-01 17:15:04 +01:00
bjorn3
50a6a84543 Merge branch 'sync_from_rust' 2020-12-27 10:30:56 +01:00
bjorn3
77f74ed070 Merge commit 'dbee13661efa269cb4cd57bb4c6b99a19732b484' into sync_cg_clif-2020-12-27 2020-12-27 10:30:38 +01:00
bjorn3
dbee13661e Rustfmt 2020-12-25 12:48:19 +01:00
bjorn3
5b32489e72 Set rust-analyzer importMergeBehaviour option to last 2020-12-25 12:47:03 +01:00
bjorn3
2ca8daab42
Merge pull request #1120 from bjorn3/lazy_jit
Lazy compilation in jit mode
2020-12-25 12:40:18 +01:00
bjorn3
35f4a25c6b Add documentation 2020-12-25 12:19:14 +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
510616fc07 Rustup to rustc 1.50.0-nightly (bb1fbbf84 2020-12-22) 2020-12-23 12:47:20 +01:00
bjorn3
dfe6495b60 Sync from rust 28d73a3ee3 2020-12-23 12:27:58 +01:00
Jack Huey
6c1fc324b2 Make BoundRegion have a kind of BoungRegionKind 2020-12-18 15:27:28 -05:00
bjorn3
54ba238a6d Remove implementation of intrinsics that are now lowered
See rust-lang/rust#80040
2020-12-18 11:12:52 +01:00
bjorn3
32f92aa34f Rustup to rustc 1.50.0-nightly (eb4fc71dc 2020-12-17) 2020-12-18 11:11:48 +01:00
bjorn3
06e77b979f Sync from rust fee693d08e 2020-12-18 11:06:23 +01:00
bors
a921a476c8 Auto merge of #79945 - jackh726:existential_trait_ref, r=nikomatsakis
Move binder for dyn to each list item

This essentially changes `ty::Binder<&'tcx List<ExistentialTraitRef>>` to `&'tcx List<ty::Binder<ExistentialTraitRef>>`.

This is a first step in moving the `dyn Trait` representation closer to Chalk, which we've talked about in `@rust-lang/wg-traits.`

r? `@nikomatsakis`
2020-12-17 18:21:20 +00:00
bjorn3
8e234d5d4b Rustup to rustc 1.50.0-nightly (b32e6e6ac 2020-12-16) 2020-12-17 18:36:00 +01:00
bjorn3
0f57e1cf9b Sync from rust caeb3335c0 2020-12-17 16:40:10 +01:00
David Wood
5f6c32af15 cg_clif: fix build with split dwarf
This commit makes minor changes to the cranelift backend so that it can
build given changes in cg_ssa for Split DWARF.

Signed-off-by: David Wood <david@davidtw.co>
2020-12-16 10:33:48 +00:00
bjorn3
44b331047d Also emit vcode when emitting clif ir while using new style backends 2020-12-14 12:54:18 +01:00
Jesse
cd21269ae0
Fix Cranelift link in readme (#1118) 2020-12-13 10:58:47 +01:00
bjorn3
3f47f938ba Enable Cranelift optimizations when optimizing
LICM in Cranelift has been fixed recently
2020-12-12 10:38:46 +01:00
bjorn3
f8e22bfb1b Update Cranelift 2020-12-12 10:37:10 +01:00
Jack Huey
42b267d221 Move binder for dyn to each list item 2020-12-11 15:02:46 -05:00
bors
aec0fc58ad Auto merge of #77611 - oli-obk:atomic_miri_leakage, r=nagisa
Directly use raw pointers in `AtomicPtr` store/load

I was unable to find any reason for this limitation in the latest source of LLVM or in the documentation [here](http://llvm.org/docs/Atomics.html#libcalls-atomic).

fixes https://github.com/rust-lang/miri/issues/1574
2020-12-09 19:53:23 +00:00
bjorn3
994b91ac73 Optimize branches when the target is statically known to a jump
This can happen in generic code
2020-12-09 19:55:11 +01:00
bjorn3
5f21ff20b3 Inline codegen_mono_item 2020-12-04 10:19:50 +01:00
bjorn3
3f28a49177 Update Cranelift
This includes bytecodealliance/wasmtime#2403 which enables hotswapping with SimpleJIT
2020-12-04 10:19:32 +01:00
bjorn3
d95d03ae8a Support #[repr(simd)] on array wrappers
Complement to rust-lang/rust#78863
2020-12-03 12:59:36 +01:00
bjorn3
64e7ff25f6 Update Cranelift 2020-12-03 12:12:46 +01:00
bjorn3
a8cda1aee1 Rustup to rustc 1.50.0-nightly (f4db9ffb2 2020-12-02) 2020-12-03 11:52:11 +01:00
oli
7760894d3f Allow cranelift to handle atomic pointers 2020-11-29 14:56:19 +00:00
bjorn3
3d357e6505 Sync from rust 760430e6fd 2020-11-29 14:50:21 +01:00