Commit Graph

590 Commits

Author SHA1 Message Date
bjorn3
8243a370d2 Rustup to rustc 1.40.0-nightly (fa0f7d008 2019-10-17) 2019-10-18 18:31:26 +02:00
bjorn3
f0c774e05d Rustup to rustc 1.40.0-nightly (237d54ff6 2019-10-15) 2019-10-16 18:43:52 +02:00
bjorn3
82fde5b622 Remove bitflags dependency 2019-10-06 17:52:23 +02:00
bjorn3
75db7cc49d Remove logfile support from unimpl.rs
I haven't used it in months
2019-10-06 17:36:15 +02:00
bjorn3
6129921529 More 128bit support
* UnOp::Neg
* ctpop
* bitreverse

Also replaces `if let Some(64u128) = ...` with `if ... = Some(u64u128)`
to be able to compile cg_clif using cg_clif, as cranelift_frontend::Switch
doesn't support i128 yet.
2019-10-06 15:51:43 +02:00
bjorn3
b5d29a8c58 Rustup to rustc 1.40.0-nightly (787005079 2019-10-04) 2019-10-06 10:41:15 +02:00
bjorn3
b0de88b741 Use DisplayFunctionAnnotations::default() 2019-10-04 14:57:07 +02:00
bjorn3
721fe3b43c Predefine all local functions before codegen
Otherwise only calls to previously codegened functions use relative
addressing instead of the GOT

Fixes #692
2019-10-04 14:45:53 +02:00
bjorn3
58a9b648e8 Update cranelift, faerie and target-lexicon 2019-10-03 18:55:01 +02:00
bjorn3
0f938f68a5 Rustup to rustc 1.40.0-nightly (2daa404e9 2019-10-02) 2019-10-03 17:22:01 +02:00
bjorn3
1b6706c924 Call cg_ssa::base::provide_both in provide{,_extern} 2019-09-28 17:01:17 +02:00
bjorn3
0db605040e Use CallConv::triple_default instead of hard coding SystemV
Fixes #718
2019-09-28 17:00:27 +02:00
bjorn3
44792f1089 Rustup to rustc 1.40.0-nightly (084beb83e 2019-09-27) 2019-09-28 14:06:12 +02:00
bjorn3
1e5cea09d5 Add profile code around metadata object generation
cc #719
2019-09-22 16:47:45 +02:00
bjorn3
a1bf96f630 Wrap linker invocation in time() 2019-09-22 16:21:00 +02:00
bjorn3
dbeca50901 Misc cleanup 2019-09-22 16:05:22 +02:00
bjorn3
3a7aa6c0fa Reduce time required to build from scratch in dev mode
* Disable wasm reading of object
* Use tempfile bundled with rustc
* Don't optimize and don't generate debuginfo for build scripts and some
  build deps

Before: 354s (5m 45s)
After: 207s (3m 27s)
2019-09-21 14:27:45 +02:00
bjorn3
fdfb1eda2c Rustup to rustc 1.39.0-nightly (97e58c0d3 2019-09-20) 2019-09-21 11:30:29 +02:00
bjorn3
77d33c1707 Fix trans_ptr_binop for fn() 2019-09-15 18:35:56 +02:00
bjorn3
c34ada7cca Fix foreign type handling 2019-09-14 17:53:36 +02:00
bjorn3
b267995f39 Cleanup 2019-09-14 15:15:06 +02:00
bjorn3
8f12b87542 Implement shl and shr overflow checks
cc #6
2019-09-14 12:13:23 +02:00
bjorn3
6ea4cbdf1b Rustup to rustc 1.39.0-nightly (a6946a817 2019-09-13) 2019-09-14 11:21:18 +02:00
bjorn3
af4009d8c8 Rustup to rustc 1.39.0-nightly (eb48d6bde 2019-09-12) 2019-09-13 21:03:26 +02:00
bjorn3
ce0be229d7 Use upstream cranelift 2019-09-08 19:18:17 +02:00
bjorn3
629f7ab4a3 Don't perform neg overflow checks when they are disabled 2019-09-07 11:00:49 +02:00
bjorn3
bfb49e7d19 Rustup to rustc 1.39.0-nightly (6e19f3f38 2019-09-06) 2019-09-07 10:51:00 +02:00
bjorn3
a2e905f22d Correctly align offset for dst field projections
Fixes #681
2019-09-02 20:09:37 +02:00
bjorn3
cd0e862282 Update ar
Fixes #672
2019-09-01 11:17:01 +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
76d2e085db Improve abi ir comments a bit 2019-08-30 15:07:15 +02:00
bjorn3
d731c4a6a7 Move ir comments generation to abi/comments.rs
Also list locals stored in ssa vars in the comments
2019-08-30 14:21:24 +02:00
bjorn3
deeae2fce4 Small change 2019-08-30 12:42:24 +02:00
bjorn3
16593d264c Move return handling to abi/returning.rs 2019-08-30 12:30:57 +02:00
bjorn3
68dcfc1c78 Move pass mode handling to abi/pass_mode.rs 2019-08-30 11:58:52 +02:00
bjorn3
6427eaf68b Move abi.rs to abi/mod.rs 2019-08-30 11:51:33 +02:00
bjorn3
556d708f20 Rustup to rustc 1.39.0-nightly (72b2abfd6 2019-08-29) 2019-08-30 11:42:42 +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
1018a34662 Don't add stack_addr intructions to prelude
Speeds up simple-raytracer by 30% (cc #684)
Also reduces the size of the simple-raytracer binary from 9.2MB to 8.6MB
2019-08-28 17:59:48 +02:00
bjorn3
6127632c76 Use f{32,64}const insts instead of loading from a global value 2019-08-28 16:38:53 +02:00
bjorn3
40629999bc Don't force RETURN_PLACE to stack
Speeds up simple-raytracer by 7% (cc #684)
2019-08-28 15:29:10 +02:00
bjorn3
b9dc950a11 Rustup to rustc 1.39.0-nightly (9b91b9c10 2019-08-26) 2019-08-27 11:01:36 +02:00
bjorn3
e704eb5259 Sync discriminant getter and setter with upstream
Fixes #683
2019-08-26 11:03:06 +02:00
bjorn3
bb634f3c88 Always use Linkage::Import for relocations targeting a static 2019-08-21 14:57:12 +02:00
bjorn3
1f90b04cd6 Fix float -> u/i128 cast
The original test casts were optimized away by rustc,
so cg_clif never saw them.

cc #668
2019-08-21 14:35:48 +02:00
bjorn3
b2d6705fe2 Implement u/i128 <-> float casts
Fixes #668
2019-08-21 14:01:29 +02:00
bjorn3
3fcd54088c Implement saturating_{add,sub} intrinsics 2019-08-20 10:40:08 +02:00
bjorn3
f99d31dbfe Implement pow{f32,f64} intrinsics 2019-08-19 17:16:21 +02:00
bjorn3
95908f61a0 Add unimpl! for cast between 128bit int and float 2019-08-19 16:43:25 +02:00