Chris Fallin
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
13 additions and
1 deletions
-
cranelift/codegen/meta/src/shared/settings.rs
-
cranelift/codegen/src/context.rs
-
cranelift/codegen/src/settings.rs
-
crates/wasmtime/src/engine.rs
|
@ -31,6 +31,16 @@ pub(crate) fn define() -> SettingGroup { |
|
|
vec!["none", "speed", "speed_and_size"], |
|
|
vec!["none", "speed", "speed_and_size"], |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
settings.add_bool( |
|
|
|
|
|
"enable_alias_analysis", |
|
|
|
|
|
"Do redundant-load optimizations with alias analysis.", |
|
|
|
|
|
r#" |
|
|
|
|
|
This enables the use of a simple alias analysis to optimize away redundant loads. |
|
|
|
|
|
Only effective when `opt_level` is `speed` or `speed_and_size`. |
|
|
|
|
|
"#, |
|
|
|
|
|
true, |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
settings.add_bool( |
|
|
settings.add_bool( |
|
|
"enable_verifier", |
|
|
"enable_verifier", |
|
|
"Run the Cranelift IR verifier at strategic times during compilation.", |
|
|
"Run the Cranelift IR verifier at strategic times during compilation.", |
|
|
|
@ -163,7 +163,7 @@ impl Context { |
|
|
|
|
|
|
|
|
self.remove_constant_phis(isa)?; |
|
|
self.remove_constant_phis(isa)?; |
|
|
|
|
|
|
|
|
if opt_level != OptLevel::None { |
|
|
if opt_level != OptLevel::None && isa.flags().enable_alias_analysis() { |
|
|
self.replace_redundant_loads()?; |
|
|
self.replace_redundant_loads()?; |
|
|
self.simple_gvn(isa)?; |
|
|
self.simple_gvn(isa)?; |
|
|
} |
|
|
} |
|
|
|
@ -516,6 +516,7 @@ libcall_call_conv = "isa_default" |
|
|
baldrdash_prologue_words = 0 |
|
|
baldrdash_prologue_words = 0 |
|
|
probestack_size_log2 = 12 |
|
|
probestack_size_log2 = 12 |
|
|
regalloc_checker = false |
|
|
regalloc_checker = false |
|
|
|
|
|
enable_alias_analysis = true |
|
|
enable_verifier = true |
|
|
enable_verifier = true |
|
|
is_pic = false |
|
|
is_pic = false |
|
|
use_colocated_libcalls = false |
|
|
use_colocated_libcalls = false |
|
|
|
@ -384,6 +384,7 @@ impl Engine { |
|
|
| "machine_code_cfg_info" |
|
|
| "machine_code_cfg_info" |
|
|
| "tls_model" // wasmtime doesn't use tls right now
|
|
|
| "tls_model" // wasmtime doesn't use tls right now
|
|
|
| "opt_level" // opt level doesn't change semantics
|
|
|
| "opt_level" // opt level doesn't change semantics
|
|
|
|
|
|
| "enable_alias_analysis" // alias analysis-based opts don't change semantics
|
|
|
| "probestack_func_adjusts_sp" // probestack above asserted disabled
|
|
|
| "probestack_func_adjusts_sp" // probestack above asserted disabled
|
|
|
| "probestack_size_log2" // probestack above asserted disabled
|
|
|
| "probestack_size_log2" // probestack above asserted disabled
|
|
|
| "regalloc" // shouldn't change semantics
|
|
|
| "regalloc" // shouldn't change semantics
|
|
|