Commit Graph

35 Commits

Author SHA1 Message Date
bjorn3
7564a043d0 Fix some warnings 2019-12-31 15:53:18 +01:00
bjorn3
50d7497708 Write scalars separately for Abi::ScalarPair in write_cvalue
This makes it easier to perform store to load forwarding
2019-12-31 15:28:15 +01:00
bjorn3
30a760dda2 Make it possible it use value_field for SIMD values stored ByVal 2019-12-25 14:38:51 +01:00
bjorn3
b35a5da4ea Remove vector support from load_scalar 2019-12-25 14:38:51 +01:00
bjorn3
f8e846dee0 Add load_vector function 2019-12-25 14:38:37 +01:00
bjorn3
73fd311291 [WIP] Real simd support 2019-12-25 14:38:37 +01:00
bjorn3
c3daf6d220 Add clif ir comment for write_cvalue 2019-12-25 14:38:22 +01:00
bjorn3
399cada762 Directly depend on cranelift_{codegen,frontend}
Fixes #838
2019-12-24 12:43:20 +01:00
bjorn3
e63a94fca6 Rustup to rustc 1.42.0-nightly (fc5deca21 2019-12-21) 2019-12-22 16:53:06 +01:00
bjorn3
ad72afaad3 Remove CPlaceInner::Stack 2019-12-20 22:00:12 +01:00
bjorn3
fbbc910ddc [OPT] Emit stack_{load,store} where possible 2019-12-20 19:30:56 +01:00
bjorn3
8f5ef6172c Remove to_addr and to_addr_maybe_unsized 2019-12-20 19:10:08 +01:00
bjorn3
967709f31a [OPT] Use load and store offsets instead of iadd_imm 2019-12-20 16:02:47 +01:00
bjorn3
ab7ad2caeb Use set_val_label before every def_var 2019-12-16 12:07:12 +01:00
bjorn3
c0aedfef96 [WIP] debuginfo for locals 2019-12-16 12:04:34 +01:00
bjorn3
4a8b0ca274 Correctly align returned addr for to_addr on NoPlace 2019-11-24 14:56:51 +01:00
bjorn3
177b0d2f57 Rustup to rustc 1.41.0-nightly (ded5ee001 2019-11-13) 2019-11-14 21:13:40 +01:00
bjorn3
44792f1089 Rustup to rustc 1.40.0-nightly (084beb83e 2019-09-27) 2019-09-28 14:06:12 +02:00
bjorn3
c34ada7cca Fix foreign type handling 2019-09-14 17:53:36 +02:00
bjorn3
a2e905f22d Correctly align offset for dst field projections
Fixes #681
2019-09-02 20:09:37 +02:00
Atul Bhosale
f481a4b685
Format code using 'cargo fmt' 2019-08-31 22:58:09 +05:30
bjorn3
15b9834d7d Don't copy ByRef passed types to local stack slot when not necessary
Eg when the local is immutable **and** the type is freeze.

This makes the simple raytracer runtime benchmark 1% faster than cg_llvm
without optimizations. Before it was 2% slower.

cc #691
cc #684
2019-08-30 15:42:07 +02:00
bjorn3
d9d8c69af1 Split extract layout field of all CPlace variants into a sparate struct 2019-08-29 11:23:19 +02:00
bjorn3
2a20cc0b94 Use anonymous lifetimes where possible 2019-08-18 16:52:07 +02:00
bjorn3
7f5c2dab9d Remove some unnecessary changes 2019-07-26 11:30:39 +02:00
bjorn3
5180becc7c Fix 128bit CValue::const_val 2019-07-26 11:30:39 +02:00
bjorn3
596fdd5a64 Fix type in load_scalar 2019-07-26 11:28:04 +02:00
bjorn3
d629d97f25 Fix some things 2019-07-26 11:28:04 +02:00
bjorn3
de32ddad23 [WIP] Basic i128 support 2019-07-26 11:28:04 +02:00
bjorn3
d7274ac5fd Fix load and store for ByValPair values with differently sized components 2019-06-23 15:23:06 +02:00
bjorn3
2b61f90c71 Fix returning non ZST uninhabited types 2019-06-16 18:03:38 +02:00
bjorn3
65bc1e5b5b Fix write_cvalue for ByValPair when the cvalue is not trivially a pair
`write_cvalue` didn't work for `Box<[u8]>`, because the inner fat ptr
was wrapped inside a newtype, which meant `Box<[u8]>` itself only had
one field.

This also simplifies `CValue::force_stack` by reusing `write_cvalue`
when it is not already on the stack.
2019-06-16 12:51:16 +02:00
bjorn3
8fb70f259f Move layout out of the enum for CValue 2019-06-11 16:41:40 +02:00
bjorn3
089e75ec42 Encapsulate CPlace constructors 2019-06-11 16:30:47 +02:00
bjorn3
466ecad2f0 Move CValue and CPlace to separate file and remove duplicate scalar_to_clif_type 2019-06-11 15:43:22 +02:00