bjorn3
b6bbc0f751
Codegen goto return block as return terminator
2020-04-11 15:01:29 +02:00
bjorn3
ea1a99900e
Remove unchecked_cast_to
2020-04-11 15:01:15 +02:00
bjorn3
3ef6170142
Remove CPlace::NoPlace
2020-04-11 15:01:04 +02:00
bjorn3
016673b0c3
Fix rustc::internals lint warnings
2020-04-09 12:12:55 +02:00
bjorn3
291c75d10b
Enable the rust_2018_idioms and unused_lifetimes lints and fix all warnings
...
They are set to deny by default in the rust-lang/rust repo
2020-04-09 12:12:55 +02:00
bjorn3
ac1c5d6954
Rustup to rustc 1.44.0-nightly ( 537ccdf3a
2020-04-02)
2020-04-03 11:54:18 +02:00
bjorn3
17f99b4a96
Take Place by value instead of by reference
2020-04-02 17:23:15 +02:00
bjorn3
13e3a3c8b0
Rustup to rustc 1.44.0-nightly ( 211365947
2020-03-30)
2020-03-31 13:20:19 +02:00
bjorn3
d2964f6a71
Rustup to rustc 1.44.0-nightly ( 75208942f
2020-03-27)
2020-03-28 14:20:24 +01:00
bjorn3
f6d12440aa
Update Cranelift
2020-03-28 14:01:48 +01:00
bjorn3
f288959c00
Limit publicness to crate where possible and remove unused imports
2020-03-27 12:14:45 +01:00
bjorn3
6b30d508f7
Fix some FIXME's and add some new FIXME's
2020-03-21 16:52:02 +01:00
bjorn3
992fae08c4
Simplify handling of unimplemented stuff
2020-03-17 16:26:56 +01:00
bjorn3
dcc86d306c
Emulate <Box<F> as FnOnce>::call_once
without alloca
...
Fixes #884
cc #15
2020-03-10 20:48:58 +01:00
bjorn3
5d2a1daf83
Remove unused inline asm whitelist
2020-03-07 11:10:33 +01:00
bjorn3
9ab2af56aa
Rustup to rustc 1.43.0-nightly ( 4ad624882
2020-03-03)
2020-03-04 15:04:28 +01:00
bjorn3
cc30c20293
Silence some warnings
2020-02-22 15:18:03 +01:00
bjorn3
c1bf153049
Rustup to rustc 1.43.0-nightly ( 8aa9d2014
2020-02-21)
2020-02-22 14:20:37 +01:00
bjorn3
6156f48ffe
Update Cranelift and use the new ineg instruction
2020-02-15 11:59:45 +01:00
bjorn3
430f738392
Update Cranelift for basic blocks
2020-02-14 18:23:29 +01:00
bjorn3
b5b2ffab6a
Rustup to rustc 1.43.0-nightly ( 5d04ce67f
2020-02-13)
2020-02-14 18:20:34 +01:00
bjorn3
33e73091f8
Don't mark unwind ebbs as cold
...
This fixes the code_layout optimization, as it would previously try to
move non-existing ebbs.
Fixes #877
2020-02-01 16:47:35 +01:00
bjorn3
74c7a7b7c5
Replace unimplemented! with unreachable! when it will never be supported
2020-01-25 16:24:48 +01:00
bjorn3
85ce626865
Improve PlaceElem::Subslice handling
2020-01-22 20:10:00 +01:00
bjorn3
217beab62a
Reduce the amount of calls to layout_of
2020-01-15 13:18:54 +01:00
bjorn3
b44d6311ca
Rustup to rustc 1.42.0-nightly ( 3ebcfa145
2020-01-12)
2020-01-14 12:29:04 +01:00
bjorn3
c74b306037
Move all cold code to the end of the function
...
Fixes #836
Benchmark #1 : simple-raytracer/raytracer_cg_clif
Time (mean ± σ): 9.250 s ± 0.056 s [User: 9.213 s, System: 0.015 s]
Range (min … max): 9.151 s … 9.348 s 20 runs
Benchmark #2 : simple-raytracer/raytracer_cg_clif_cold_separated
Time (mean ± σ): 9.179 s ± 0.101 s [User: 9.141 s, System: 0.016 s]
Range (min … max): 9.070 s … 9.473 s 20 runs
Summary
'simple-raytracer/raytracer_cg_clif_cold_separated' ran
1.01 ± 0.01 times faster than 'simple-raytracer/raytracer_cg_clif'
2020-01-11 17:57:18 +01:00
bjorn3
38797f8bad
Implement #[track_caller]
...
Fixes #848
2020-01-11 17:10:42 +01:00
bjorn3
2a082209a6
Fix PlaceElem::Subslice length computation
2020-01-11 14:28:18 +01:00
bjorn3
70c9b3b35b
Better self profiling integration
2020-01-10 14:16:27 +01:00
bjorn3
5424d7d55f
Prepare for basic blocks
2020-01-10 12:14:28 +01:00
bjorn3
33ad67c124
Rustup to rustc 1.42.0-nightly ( caa231d99
2020-01-08)
2020-01-09 17:43:10 +01:00
bjorn3
1bb848d4ac
Re-use cranelift_codegen::ir::Function for every function
...
Fixes #844
2020-01-04 17:58:38 +01:00
bjorn3
c5a7fca527
Use DUMMY_SP in less places
...
Fixes #845
2020-01-04 17:49:00 +01:00
bjorn3
ca92695a2c
Use IndexVec for ebb_map
...
cc #745
2020-01-04 13:23:42 +01:00
bjorn3
4c7abd504c
Revert some changes
2019-12-31 15:59:49 +01:00
bjorn3
b0814a3fd8
Check for cross-ebb temporal overlap between loads and stores
2019-12-31 15:56:28 +01:00
bjorn3
8b82f4f989
[WIP] Add stack2reg optimization pass
2019-12-31 15:56:28 +01:00
bjorn3
958c58545f
Only codegen a trap for functions with uninhabited arguments
...
Fixes #847
2019-12-28 11:10:21 +01:00
bjorn3
399cada762
Directly depend on cranelift_{codegen,frontend}
...
Fixes #838
2019-12-24 12:43:20 +01:00
bjorn3
2485994803
Rustup to rustc 1.42.0-nightly ( 01a46509a
2019-12-20)
2019-12-21 11:22:12 +01:00
bjorn3
967709f31a
[OPT] Use load and store offsets instead of iadd_imm
2019-12-20 16:02:47 +01:00
bjorn3
8d2db1b75d
Monomorphize type of promoted
2019-12-18 20:41:07 +01:00
bjorn3
172522c2e7
[OPT] Push fx.monomorphize to the callers of fx.layout_of
...
This prevents some repeated monomorphizations
2019-12-17 16:58:34 +01:00
bjorn3
d502f8e652
[OPT] Avoid calling target_triple for every call to codegen
2019-12-17 16:34:48 +01:00
bjorn3
b86eb2e8ba
Some optimizations
...
* Only format global _comments when debug_assertions are enabled
* Only call build_value_labels_ranges in base.rs when debug_assertions are enabled
Benchmark #1 : CHANNEL='pre' ../cargo.sh build
Time (mean ± σ): 17.657 s ± 1.050 s [User: 31.871 s, System: 3.014 s]
Range (min … max): 16.907 s … 20.394 s 10 runs
Benchmark #2 : ../cargo.sh build
Time (mean ± σ): 16.640 s ± 0.255 s [User: 30.238 s, System: 2.965 s]
Range (min … max): 16.413 s … 17.186 s 10 runs
Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
Summary
'../cargo.sh build' ran
1.06 ± 0.07 times faster than 'CHANNEL='pre' ../cargo.sh build'
2019-12-16 12:07:31 +01:00
bjorn3
8edbbc45f7
Implement local reading for locals on stack
2019-12-16 12:04:34 +01:00
bjorn3
21f0dfd014
Monomorphize locals
2019-12-16 12:04:34 +01:00
bjorn3
a962835685
[WIP] debuginfo: Add types for locals
2019-12-16 12:04:34 +01:00
bjorn3
c0aedfef96
[WIP] debuginfo for locals
2019-12-16 12:04:34 +01:00
bjorn3
e1613a69d4
Rustup to rustc 1.41.0-nightly ( a605441e0
2019-12-15)
2019-12-16 11:33:57 +01:00
bjorn3
88277f983a
Remove some workarounds for missing inst legalizations
2019-12-08 11:52:04 +01:00
bjorn3
c6086a8fd7
Rustup to rustc 1.41.0-nightly ( 6d77e45f0
2019-12-04)
2019-12-05 21:00:57 +01:00
bjorn3
cdab96d05c
Rustup to rustc 1.41.0-nightly ( 53712f863
2019-11-21)
2019-11-22 15:56:49 +01:00
bjorn3
c0ec688daf
Rustup to rustc 1.40.0-nightly ( 3fc30d884
2019-11-10)
2019-11-11 20:34:42 +01:00
bjorn3
5407b51aa7
Rustup to rustc 1.40.0-nightly ( 9e346646e
2019-11-08)
2019-11-09 11:14:18 +01:00
bjorn3
5873127ec2
Make debuginfo writing backend agnostic
2019-10-18 18:31:38 +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
58a9b648e8
Update cranelift, faerie and target-lexicon
2019-10-03 18:55:01 +02: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
6ea4cbdf1b
Rustup to rustc 1.39.0-nightly ( a6946a817
2019-09-13)
2019-09-14 11:21:18 +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
Atul Bhosale
f481a4b685
Format code using 'cargo fmt'
2019-08-31 22:58:09 +05:30
bjorn3
b9dc950a11
Rustup to rustc 1.39.0-nightly ( 9b91b9c10
2019-08-26)
2019-08-27 11:01:36 +02:00
bjorn3
2a20cc0b94
Use anonymous lifetimes where possible
2019-08-18 16:52:07 +02:00
bjorn3
1bee110d95
Let codegen_get_discriminant accept CValue instead of CPlace
2019-08-18 16:19:33 +02:00
bjorn3
43e68319fa
Rustup to rustc 1.39.0-nightly ( 2111aed0a
2019-08-17)
2019-08-18 11:30:13 +02:00
bjorn3
b4e55cdedd
Refactor num.rs
2019-08-14 15:03:52 +02:00
bjorn3
db071db95a
Calculate sign in trans{,_checked}_int_binop instead of caller
2019-08-14 13:01:55 +02:00
bjorn3
32cb5b8c8e
Move discriminant get and set to discriminant.rs
2019-08-14 12:01:41 +02:00
bjorn3
883894a07a
Move trans_*_binop to num.rs
2019-08-14 11:52:39 +02:00
bjorn3
581b6ea5be
Misc changes
2019-08-14 11:36:24 +02:00
bjorn3
f93cd924ec
Implement float -> small int cast
...
Also workaround small signed int eq/ne binop clif bug
2019-08-12 17:25:16 +02:00
bjorn3
6414f03644
Don't omit overflow checks for *_with_overflow intrinsics when compiling without debug assertions
2019-08-09 12:35:51 +02:00
bjorn3
bd7c119e4b
Rustup to rustc 1.38.0-nightly ( 6a91782b7
2019-08-06)
2019-08-07 12:35:49 +02:00
bjorn3
b806070a88
Fix simd_cast
2019-07-31 09:46:05 +02:00
bjorn3
c7fa94bf00
Fix checked binops when overflow checks are disabled
2019-07-27 16:12:46 +02:00
bjorn3
718a5a2e3f
Display span in Assert panic message
2019-07-26 11:32:04 +02:00
bjorn3
5180becc7c
Fix 128bit CValue::const_val
2019-07-26 11:30:39 +02:00
bjorn3
8693728327
Respect sess.overflow_checks()
2019-07-26 11:29:35 +02:00
bjorn3
641a210ff6
Implement most 128bit binops
2019-07-26 11:29:35 +02:00
bjorn3
8b3628028e
Don't special case u/i128 for UnOp::not
2019-07-26 11:28:28 +02:00
bjorn3
45de0336a5
Fix some more stuff
2019-07-26 11:28:28 +02:00
bjorn3
79f4c3d002
[WIP]
2019-07-26 11:28:04 +02:00
bjorn3
c814ee0d2a
[WIP]
2019-07-26 11:28:04 +02:00
bjorn3
de32ddad23
[WIP] Basic i128 support
2019-07-26 11:28:04 +02:00
bjorn3
bf3ec3be3e
Implement checked binops
2019-07-26 11:19:14 +02:00
bjorn3
92f2b6243d
Rustup to rustc 1.38.0-nightly ( a7f28678b
2019-07-23)
2019-07-24 11:56:24 +02:00
bjorn3
8c2577c747
Don't disable stdsimd anymore
...
This doesn't enable simd support. Actually using the functions will
result in a compilation error.
2019-07-20 15:33:57 +02:00
bjorn3
01e9303857
Fix SetDiscriminant for generators
2019-06-16 18:01:46 +02:00
bjorn3
bd73128d2e
Implement lt, le, ge and gt for fat pointers
2019-06-16 17:59:31 +02:00
bjorn3
76a178098d
Refactor drop codegen
2019-06-16 15:57:53 +02:00
bjorn3
4d406cdcad
Rustup to rustc 1.37.0-nightly ( 0dc9e9c10
2019-06-15)
2019-06-16 11:13:49 +02:00
bjorn3
6d1bc088a7
Rustup to rustc 1.37.0-nightly ( 2887008e0
2019-06-12)
2019-06-13 20:44:40 +02:00
bjorn3
44a98df8c2
Remove workaround for previously missing encoding
2019-06-11 17:24:11 +02:00
bjorn3
089e75ec42
Encapsulate CPlace constructors
2019-06-11 16:30:47 +02:00
bjorn3
3f04e73b40
Use CValue::by_val{,_pair} at more places
2019-06-11 16:25:07 +02:00
bjorn3
d6e07cfcc8
Encapsulate CValue and CPlace creation
2019-06-11 15:32:30 +02:00
bjorn3
161c8aa5cf
Rustup to rustc 1.37.0-nightly ( 7cdaffd79
2019-06-05)
2019-06-06 20:31:09 +02:00
bjorn3
5593bc8cd3
Update cranelift
2019-05-14 16:12:58 +02:00
bjorn3
bb7a990ee7
Extract driver.rs
2019-05-04 16:54:25 +02:00
bjorn3
cc0804e815
Rustup to rustc 1.36.0-nightly ( 33fe1131c
2019-04-20)
2019-04-21 14:41:23 +02:00
bjorn3
de792ad690
Rustup to rustc 1.35.0-nightly ( aa99abeb2
2019-04-14)
2019-04-15 16:34:16 +02:00
bjorn3
c0ffc422ab
Print message when reaching trap
2019-04-10 17:56:44 +02:00
Aaron Hill
e6acbdc20a
Rustup to rustc 1.35.0-nightly ( f8673e0ad
2019-04-03)
2019-04-04 20:53:16 +02:00
bjorn3
0ad4e2cc96
Rustup to rustc 1.35.0-nightly ( e3428db7c
2019-03-31)
2019-04-01 20:22:59 +02:00
bjorn3
b9295f1efd
Rustup to rustc 1.35.0-nightly ( fbd34efb3
2019-03-26)
2019-03-27 17:45:20 +01:00
bjorn3
0df3b41630
Skip ZST arguments
...
Fixes #413 and increases compatibility with cg_llvm
2019-03-26 19:53:04 +01:00
bjorn3
e09ae25299
Remove 0006-alloc-Disable-some-unsupported-stuff.patch
2019-03-06 20:56:53 +01:00
bjorn3
11af20b156
Fix panic with reported const_eval promoted error
2019-03-06 20:56:15 +01:00
bjorn3
a5fdefe45a
Fix trans_get_discriminant for uninhabited types
2019-03-06 20:55:28 +01:00
bjorn3
c2095c4afe
Rustup to rustc 1.35.0-nightly ( 87a436377
2019-03-03)
2019-03-04 18:57:09 +01:00
bjorn3
2ce5387b7c
Rename load_value_pair to load_scalar_pair and fix dynamic dispatch with arbitrary self types
2019-03-03 12:19:55 +01:00
bjorn3
57feadcc13
Replace functions taking or returning u128 or i128 with a trap
...
This makes it possible to remove most of 0002-Disable-u128-and-i128-in-libcore.patch.
The rest has to be kept because of u128 and i128 only being used in the function body.
2019-03-03 11:45:52 +01:00
bjorn3
23a9dcd947
Make CastKind::Misc handling more clean and general
2019-03-02 20:47:15 +01:00
bjorn3
89666d9818
Implement CastKind::ClosureFnPointer
2019-03-02 20:25:08 +01:00
bjorn3
25f3ef5ff9
Implement ProjectionElem::Subslice
2019-03-02 20:11:31 +01:00
bjorn3
99eb418f19
Rustup to rustc 1.34.0-nightly ( c1d2d83ca
2019-03-01)
2019-03-02 12:18:41 +01:00
bjorn3
f02490d960
Rustfmt
2019-02-21 15:06:09 +01:00
bjorn3
ea10842d95
Update cranelift
2019-02-18 18:26:59 +01:00
bjorn3
bab8113954
Fix discriminant_value intrinsic
...
Fixes #349
2019-02-16 17:18:51 +01:00
bjorn3
ccf07adbfb
Implement isize -> raw-ptr cast
2019-02-16 16:37:30 +01:00
bjorn3
4ecbee2f09
Implement float -> int/uint cast
2019-02-16 16:24:38 +01:00
bjorn3
5721542164
Fix BinOp::Offset
...
fixes #341
2019-02-16 14:02:15 +01:00
bjorn3
4c94251f95
Several fixes
2019-02-16 13:49:42 +01:00
bjorn3
06dd020446
Rustup to rustc 1.34.0-nightly ( a9410cd1a
2019-02-15)
2019-02-16 12:35:56 +01:00
bjorn3
c68e76c33b
Implement variadic function calling
2019-02-11 19:18:52 +01:00
bjorn3
1eba7e5f5e
Implement drop for trait objects
2019-02-08 17:20:24 +01:00
bjorn3
feec354d65
Introduce CPlace::Stack
2019-02-04 19:32:32 +01:00
bjorn3
3e24c1212f
Refactor CPlace address handling
2019-02-04 19:32:29 +01:00
bjorn3
0d16dcfce1
Don't try to store func_addr for FnDef in trans_const_value
...
This would crash, because the place provides 0 bytes of space for FnDef
2019-02-03 14:11:24 +01:00
bjorn3
a12eef4d86
Use IndexSet and keep full source info in set_debug_loc
2019-01-26 11:59:57 +01:00
bjorn3
09c4569c87
Implement line debuginfo
2019-01-26 11:59:57 +01:00
bjorn3
a15af1ccba
Rename load_value to load_scalar and make it support all Abi::Scalar types
2019-01-02 13:39:02 +01:00
bjorn3
8561349ece
Only build clif comments in debug mode
2018-12-28 17:09:38 +01:00
bjorn3
3d05ff922c
Use the linkage and visibility produced by tcx.collect_and_partition_mono_itemscc #209
2018-12-23 19:41:35 +01:00
bjorn3
9882576497
Improve debug messages in generated clif files
2018-12-22 18:21:30 +01:00
bjorn3
64d4257387
Rustup to rustc 1.33.0-nightly ( 09d6ab90e
2018-12-20)
2018-12-21 13:45:06 +01:00
bjorn3
6fa3140222
Introduce CodegenCx
2018-12-18 18:28:02 +01:00
bjorn3
bd4b307b42
Support dylibs
2018-12-10 15:10:12 +01:00
bjorn3
a8d52d13f4
Some small changes
2018-12-01 11:49:44 +01:00
bjorn3
3f423c0933
Implement cast C enum -> int
2018-11-30 18:28:33 +01:00
bjorn3
d447f77f03
Rustup to rustc 1.32.0-nightly ( 6acbb5b65
2018-11-25)
2018-11-26 17:51:28 +01:00
bjorn3
95539518ec
Rustfmt
2018-11-24 12:47:53 +01:00
bjorn3
f4ae9a4dbb
Rustup to rustc 1.32.0-nightly ( 1f57e4841
2018-11-23)
2018-11-24 11:23:49 +01:00
bjorn3
06202c007c
Fix some 2018 edition idioms
2018-11-17 18:23:52 +01:00
bjorn3
16334be18e
Remove a workaround for icmp.i8/i16 not having an encoding
2018-11-17 15:02:57 +01:00
bjorn3
2c38313403
Move unimpl! macro to unimpl.rs
2018-11-16 19:53:27 +01:00
bjorn3
e83da7533c
Move trapping to trap_code.rs
2018-11-16 17:35:47 +01:00
bjorn3
faf974b2e6
Rustup to rustc 1.32.0-nightly ( 6b9b97bd9
2018-11-15)
2018-11-16 17:20:00 +01:00
bjorn3
0fa5c0f4fa
Rustup to rustc 1.32.0-nightly ( 9fefb6766
2018-11-13)
2018-11-14 14:31:42 +01:00
bjorn3
72c34be975
Implement raw ptr -> int of native pointer size cast
2018-11-13 18:57:59 +01:00
bjorn3
b906adfffe
Implement some missing CastKind::Misc casts
2018-11-13 18:38:10 +01:00
bjorn3
127e080f62
Implement ProjectionElem::ConstantIndex
2018-11-13 18:28:10 +01:00
bjorn3
a3263bafe0
Change some unimplemented! to unimpl!
2018-11-13 17:58:42 +01:00
Dan Gohman
7b5f4894f1
Change "cton" to "clif".
2018-11-12 07:20:42 -08:00
Dan Gohman
27d90ab1d5
Change "cretonne" to "cranelift".
2018-11-12 07:20:32 -08:00
bjorn3
0b76af2095
Remove should_codegen
2018-11-07 13:35:10 +01:00
bjorn3
29b4c34c54
Rustfmt
2018-11-07 13:32:02 +01:00
bjorn3
648f491977
Enable feature gate extern_crate_item_prelude
2018-11-07 13:29:38 +01:00
bjorn3
438bee5fb1
Rustup to rustc 1.32.0-nightly ( e6c5cf923
2018-11-04)
2018-11-05 18:03:47 +01:00
bjorn3
fc8a6c343a
Update Cargo.lock
...
Also update for cranelift changes.
2018-11-03 13:14:28 +01:00
bjorn3
23e0b0bd9c
Rustup to rustc 1.32.0-nightly ( 8b096314a
2018-11-02)
2018-11-03 12:49:55 +01:00
bjorn3
172e705b27
Rustup to rustc 1.31.0-nightly ( cae6efc37
2018-10-27)
2018-10-28 18:23:03 +01:00
bjorn3
52ab6583dc
Better clif file writing
2018-10-27 18:23:37 +02:00
bjorn3
0195181363
Fix some warnings
2018-10-10 19:08:52 +02:00
bjorn3
b5dffe9765
Rustfmt
2018-10-10 19:07:13 +02:00
bjorn3
0fa547ac98
Use absolute compile time paths for some log files
2018-10-06 14:48:34 +02:00
bjorn3
f4e544894a
Implement Rvalue::Len for arrays
2018-10-06 13:50:31 +02:00
bjorn3
cd4bcb7a2c
Rustup to rustc 1.31.0-nightly ( 8c4ad4e9e
2018-10-04)
2018-10-05 19:24:39 +02:00
bjorn3
69fe4d6f92
Workaround some missing encodings in cranelift
2018-09-30 16:33:55 +02:00
bjorn3
ed996759f1
Rustup
2018-09-28 18:21:11 +02:00
bjorn3
742a795c78
Use FunctionBuilder::call_mem{cpy,move}
2018-09-26 15:42:07 +02:00
bjorn3
16e936b93f
Rustfmt
2018-09-26 15:40:11 +02:00
bjorn3
889150a4f9
Implement binop eq and ne for fat ptr's
2018-09-25 18:35:13 +02:00
bjorn3
b11cb572dc
Use cranelift_frontend::Switch for switchInt
2018-09-25 18:04:30 +02:00
bjorn3
5b721a2940
Rustup to rustc 1.30.0-nightly ( 4591a245c
2018-09-22)
2018-09-23 10:16:26 +02:00
bjorn3
a1b8e02a88
Rustup to rustc 1.30.0-nightly ( cb6d2dfa8
2018-09-16)
2018-09-17 18:49:10 +02:00
bjorn3
0fb7c4d1b9
Implement some intrinsics and fix a codegen error
...
* intrinsic size_of_val for sized types
* intrinsic needs_drop
* incorrect codegen for UnOp::Not for bools
2018-09-14 19:49:33 +02:00
bjorn3
59518987ed
Implement drop support ( fixes #11 )
2018-09-12 14:40:06 +02:00
bjorn3
29c8fcfc24
Rustup to rustc 1.30.0-nightly ( 2f1547c0a
2018-09-11)
2018-09-12 14:16:28 +02:00
bjorn3
6196146ac4
Implement trait objects (cc #14 )
2018-09-08 18:00:06 +02:00
bjorn3
62a0203a5a
Rustfmt
2018-09-08 17:24:52 +02:00
bjorn3
252607ae41
Don't use write_mir_pretty for non local mir
2018-09-08 17:23:03 +02:00
bjorn3
9ede386054
Don't call seal_all_blocks and finalize twice
2018-09-08 14:18:08 +02:00
bjorn3
4c0a2ff59b
Don't print Storage{Live,Dead} as comment in debug clif
2018-09-06 17:39:01 +02:00
bjorn3
8adc744645
Implement Box rvalue
2018-09-04 19:04:25 +02:00
bjorn3
42066522fb
Perform some optimizations
2018-09-02 13:36:45 +02:00
bjorn3
fa4a37759b
Rvalue::Len
2018-08-30 20:22:25 +02:00
bjorn3
12282a8ebc
Implement unsize array -> slice and trait object -> trait object
2018-08-30 20:21:58 +02:00
bjorn3
b5082f7da8
Support unsized types
2018-08-30 20:21:21 +02:00
bjorn3
8111eee37a
Rustup to rustc 1.30.0-nightly ( 02cb8f2a4
2018-08-29)
2018-08-30 20:14:56 +02:00
bjorn3
6f58f94cdb
Add Caches to FunctionCx
2018-08-26 17:14:12 +02:00
bjorn3
42887dfdd9
Remove CodegenCx
2018-08-26 16:58:52 +02:00
bjorn3
9dbc727b72
Rustfmt
2018-08-24 14:54:22 +02:00
bjorn3
0d15d9e5dd
Rustup to rustc 1.30.0-nightly ( 63d66494a
2018-08-23)
2018-08-24 14:51:02 +02:00
bjorn3
d348f5b473
Codegen all instance types
2018-08-22 18:53:57 +02:00
bjorn3
d87edae73b
Add CValue variant ByValPair
2018-08-22 12:35:07 +02:00
bjorn3
954d1e7bf2
Don't hardcode usize being 64 bit ( fixes #8 )
2018-08-22 10:54:32 +02:00
bjorn3
69834cafd3
Use instance_mir instead of optimized_mir
2018-08-18 16:09:49 +02:00
bjorn3
7a3ba963e1
Rustfmt
2018-08-17 13:01:56 +02:00
bjorn3
f27dfc3ac9
Make CodegenCx generic over Backend
2018-08-17 12:57:41 +02:00
bjorn3
eb89830f21
Rustfmt
2018-08-16 20:09:26 +02:00
bjorn3
ca59e4405e
Reduce verbosity of output
2018-08-15 16:17:59 +02:00
bjorn3
a3760040b2
Disable some prinln!'s
2018-08-15 15:28:08 +02:00
bjorn3
bd7031afb1
Fix codegen of SwitchInt
2018-08-15 14:36:45 +02:00
bjorn3
e6fb515406
Craneliftup
2018-08-15 12:36:13 +02:00
bjorn3
a8ca0f02fc
Support emitting object files ( fixes #5 )
2018-08-14 22:01:18 +02:00
bjorn3
0f26781a86
Support simplejit and faerie at the same time
2018-08-14 20:58:24 +02:00
bjorn3
178aa32b0c
Make FunctionCx generic over Backend
2018-08-14 20:31:16 +02:00
bjorn3
f67ad9c120
Refactoring
2018-08-14 19:42:22 +02:00
bjorn3
0978710ffd
Codegen minicore
2018-08-14 12:13:07 +02:00
bjorn3
4b10e6e613
Workaround missing encoding for icmp.i8
2018-08-14 11:58:39 +02:00
bjorn3
b9d7164eff
Fix and test checked binops
2018-08-13 19:14:55 +02:00
bjorn3
1031c659e0
Refactoring of constant.rs in preparation for static codegen
2018-08-13 12:13:43 +02:00
bjorn3
5859b9b65d
Rustfmt
2018-08-12 18:56:05 +02:00
bjorn3
8e2394874e
Group drop glue instances in unimpl log
2018-08-11 15:36:08 +02:00
bjorn3
46ebc2bc5c
Make the hello world example runnable
2018-08-11 15:05:57 +02:00
bjorn3
af69258971
Use tcx.symbol_name
2018-08-11 14:30:05 +02:00
bjorn3
2e0d6d49bf
Deduplicate function name generation
2018-08-11 13:59:08 +02:00
bjorn3
dc323d7ffa
Don't call finalize_all and then finalize_function
2018-08-11 12:07:42 +02:00
bjorn3
b391524b4f
Move return codegen to abi.rs
2018-08-11 11:01:48 +02:00
bjorn3
5ebcea23e4
Extract codegen_intrinsic_call
2018-08-10 19:20:13 +02:00
bjorn3
e1ac09a3f0
Implement bool -> int cast
2018-08-09 15:44:01 +02:00
bjorn3
4c312faf90
brz <-> brnz
2018-08-09 15:36:02 +02:00
bjorn3
48701d758d
Crash on some less code and fix a bug in discriminant read
2018-08-09 15:08:54 +02:00
bjorn3
e9422fd4d4
Implement Rvalue::Aggregate(AggregateKind::Array, ...)
2018-08-09 11:42:35 +02:00
bjorn3
2fd0d52834
Rustfmt
2018-08-09 11:25:14 +02:00
bjorn3
566803f288
Implement raw ptr -> usize, fn ptr -> usize, usize -> raw ptr casts
2018-08-09 11:23:04 +02:00
bjorn3
9a2b1d4ac3
Implement float -> float and int -> float casts
2018-08-09 11:16:46 +02:00
bjorn3
6c86274943
Implement raw ptr -> usize cast
2018-08-09 11:07:10 +02:00
bjorn3
5b85e0fec8
Rustfmt
2018-08-08 19:33:37 +02:00
bjorn3
7f2e68e38e
Better unimplemented stuff handling
2018-08-08 15:38:03 +02:00
bjorn3
c4705af4e2
Implement intrinsics {ctlz,cttz}{,_nonzero} and ctpop
2018-08-08 14:39:46 +02:00
bjorn3
d4b6bce39c
Workaround two bugs
2018-08-08 12:53:09 +02:00
bjorn3
21c52c70b3
Rustfmt
2018-08-08 12:45:34 +02:00
bjorn3
822a181c87
Implement NullOp::SizeOf
2018-08-08 12:44:41 +02:00
bjorn3
1305d1ef23
Implement Rvalue::Repeat
2018-08-08 12:30:25 +02:00
bjorn3
efd203aa0b
Implement indexing for arrays
2018-08-08 12:22:16 +02:00
bjorn3
ece497cc84
Some misc changes
2018-08-08 10:39:10 +02:00
bjorn3
018612cf22
Implement overflowing_* and *_with_overflowing
2018-08-08 09:49:42 +02:00
bjorn3
376ec8c258
Don't crash on checked binops (treated like unchecked ones atm)
2018-08-08 09:35:35 +02:00
bjorn3
f001808249
Run rustfmt 0.9.0-nightly ( 69ad879
2018-07-27)
2018-07-31 12:25:16 +02:00
bjorn3
82dbd07806
Add support for calling C abi functions
2018-07-30 18:20:37 +02:00
bjorn3
37b61e0ca6
Rustup to rustc 1.29.0-nightly ( 866a71325
2018-07-29)
2018-07-30 16:57:40 +02:00