bjorn3
598f090956
Update to Cranelift 0.92
2023-01-20 18:52:58 +00:00
bjorn3
6768d0dd72
Booleans have been removed from Cranelift
2022-12-01 17:45:59 +00:00
bjorn3
701b2747c3
Remove optimize_function
...
It currently doesn't have any optimizations at all.
2022-08-17 13:03:32 +00:00
bjorn3
5f6c59e63f
Pass only the Function to write_clif_file
2022-01-18 18:58:37 +01:00
bjorn3
2e62516496
Remove workarounds for things unimplemented in Cranelift
...
Many are now implemented, so it is much nicer to directly use the
respective Cranelift instructions
2021-07-28 17:30:39 +02:00
bjorn3
6a31385363
Misc target related improvements
2021-07-03 14:28:53 +02:00
bjorn3
2ceb527728
Remove the cold block optimization
...
It isn't effective with the new backend framework
2021-03-31 12:42:30 +02:00
bjorn3
a793be8ee8
Remove the stack2reg optimization completely
...
It is broken and needs to be rewritten from scratch
2021-03-31 12:34:01 +02:00
bjorn3
cecd7a9ae6
Add clif comments when in release mode
...
Fixes #1130
2021-03-06 18:45:04 +01:00
bjorn3
5e736293b3
Rustfmt
2021-03-05 11:21:44 +01:00
bjorn3
92c1b858ef
Disable stack2reg optimization
...
It causes a miscompilation of lewton
Fixes #1142
2021-02-20 16:55:30 +01: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
4cc6b4f9bf
Fix many clippy warnings
2020-10-28 21:47:25 +01:00
bjorn3
1c272b1224
Fix a compilation error in debug mode
2020-10-15 18:49:50 +02:00
bjorn3
1c40840738
Fix warning
2020-10-15 15:39:06 +02:00
bjorn3
c8699076f9
Document almost all modules
...
Fixes #1082
2020-09-23 15:13:49 +02:00
bjorn3
044470a726
Remove hashbrown usage
...
drain_filter is now supported on nightly
2020-09-15 21:00:04 +02:00
Matt Brubeck
bd2313fc11
Update to hashbrown 0.9
2020-09-03 15:38:57 -07:00
bjorn3
3b0f3a0a1e
Optimize SwitchInt for bools
2020-08-30 13:15:53 +02:00
CohenArthur
365cebf779
optimize: Remove conditional compilation on instance
...
Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
2020-08-28 12:26:52 +02:00
CohenArthur
4e685a512e
fmt: Run cargo fmt since it is available
2020-08-28 12:10:48 +02:00
CohenArthur
cb386896ee
stack2reg: Switch to hashbrown::HashSet
2020-08-23 21:44:00 +02:00
CohenArthur
5c8c75b1d2
stack2reg: Drain instead of only iterating
2020-08-23 18:36:42 +02:00
CohenArthur
eb6df58cdd
stack2reg: Remove clone() using filters
2020-08-23 18:16:36 +02:00
CohenArthur
b0ea85fb83
stack2reg: Remove self in remove_unused_stack_addr and()
...
remove_unused_load()
2020-08-23 17:55:35 +02:00
CohenArthur
80ee042a36
stack2reg: Re-add clone() to stop CI
2020-08-23 17:31:07 +02:00
CohenArthur
c62f433e46
remove_unused_stack_addr_and_stack_load: Remove clone()
2020-08-23 15:00:09 +02:00
bjorn3
3086e44733
Only call build_value_labels_ranges when necessary
2020-06-16 13:27:24 +02:00
Ömer Sinan Ağacan
6dd0246199
Dump clif with --emit llvm-ir in release mode
...
Currently it's not possible to dump llvm-ir in release build. With this
patch we allow it with `--emit llvm-ir`. In debug build we dump clif
always as before.
Fixes #1020
2020-05-29 11:43:05 +03: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
f288959c00
Limit publicness to crate where possible and remove unused imports
2020-03-27 12:14:45 +01:00
bjorn3
b113e88ddb
Fix warnings
2020-03-24 13:41:19 +01:00
bjorn3
a59479bd37
Add clif ir comments for stack2reg opt
2020-03-20 12:18:40 +01:00
bjorn3
cc30c20293
Silence some warnings
2020-02-22 15:18:03 +01:00
bjorn3
430f738392
Update Cranelift for basic blocks
2020-02-14 18:23:29 +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
d821f154c5
Disable the code_layout optimization
...
When compiling libcore, it causes ebb params to be dropped for a certain function
2020-01-25 17:55:48 +01:00
bjorn3
aa5c49cf2f
Make unused stack slots zero sized in stack2reg
2020-01-22 18:57:36 +01:00
bjorn3
09b44f5d25
Reduce visibility
2020-01-14 17:11:06 +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
87d6953719
Add documentation about the UB of the stack2reg optimization
2020-01-04 11:31:56 +01:00
bjorn3
196008bee3
Disable stack2reg opt when optimizations are disabled
2019-12-31 16:43:24 +01:00
bjorn3
dbb118a5bc
Fix some warnings
2019-12-31 15:56:33 +01:00
bjorn3
0cb2b60559
Don't print debug messages in release mode
2019-12-31 15:56:28 +01:00
bjorn3
b47c89de0e
Remove unnecessary check from temporal_order
2019-12-31 15:56:28 +01:00
bjorn3
790132523f
Support store to load forwarding for different types of the same size
2019-12-31 15:56:28 +01:00
bjorn3
fd5efa0921
Fix potential_stores_for_load
2019-12-31 15:56:28 +01:00
bjorn3
d6c2db2aea
Return use domtree.dominates in temporal_order
2019-12-31 15:56:28 +01:00
bjorn3
7c4debdb7c
Add functions to remove loads stores etc
2019-12-31 15:56:28 +01:00