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
bjorn3
79148a3c1e
Extract potential_stores_for_load and potential_loads_of_store functions
2019-12-31 15:56:28 +01:00
bjorn3
af5a2a8509
Let remove_unused_stack_addr_and_stack_load take OptimizeContext
2019-12-31 15:56:28 +01:00
bjorn3
0f3eab589e
Add OptimizeContext
2019-12-31 15:56:28 +01:00
bjorn3
df7f68236c
Remove stack_store without following stack_load
2019-12-31 15:56:28 +01:00
bjorn3
6320c65484
Fix temporal_order argument order for store to load forwarding
2019-12-31 15:56:28 +01:00
bjorn3
7579663199
Extract temporal_order function
2019-12-31 15:56:28 +01:00
bjorn3
9022e09a3e
Fix compilation
2019-12-31 15:56:28 +01:00
bjorn3
b0814a3fd8
Check for cross-ebb temporal overlap between loads and stores
2019-12-31 15:56:28 +01:00
bjorn3
c5f42aef1d
Run dead stack_store removal after stack_store to stack_load forwarding
2019-12-31 15:56:28 +01:00
bjorn3
7d35db5319
[WIP] Implement basic stack store to load forwarding
2019-12-31 15:56:28 +01:00
bjorn3
be6cdb28d0
Refactor stack_store removal
2019-12-31 15:56:28 +01:00
bjorn3
943b81bb40
Extract remove_unused_stack_addr_and_stack_load
2019-12-31 15:56:28 +01:00
bjorn3
a8daa7115e
Group by stack slot earlier
2019-12-31 15:56:28 +01:00
bjorn3
9d77cb95e1
Merge stack_{addr,load}_insts_users
2019-12-31 15:56:28 +01:00
bjorn3
5047856f00
Use BTreeSet and BTreeMap instead of SecondaryMap
2019-12-31 15:56:28 +01:00
bjorn3
c84b1fee09
Record users of stack_addr and stack_load return values
2019-12-31 15:56:28 +01:00
bjorn3
73961709d6
Outline combine_stack_addr_with_load_store and remove unused stack_load insts
2019-12-31 15:56:28 +01:00
bjorn3
b6642e5cd8
Re-order some code
2019-12-31 15:56:28 +01:00