Cranelift: add a config option for alias analysis and redundant-load elimination. (#4349)
This allows for experiments as in here [1] and also generally gives an option to anyone who is concerned that the extra optimization may be counterproductive or take too much time. The optimization remains enabled by default. [1] https://github.com/bytecodealliance/wasmtime/pull/4163#issuecomment-1169303683
This commit is contained in:
@@ -31,6 +31,16 @@ pub(crate) fn define() -> SettingGroup {
|
||||
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(
|
||||
"enable_verifier",
|
||||
"Run the Cranelift IR verifier at strategic times during compilation.",
|
||||
|
||||
Reference in New Issue
Block a user