MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / cranelift_opt_level

Method cranelift_opt_level

crates/wasmtime/src/config.rs:1454–1464  ·  view source on GitHub ↗
(&mut self, level: OptLevel)

Source from the content-addressed store, hash-verified

1452 /// Panics if this configuration's compiler was [disabled][Config::enable_compiler].
1453 #[cfg(any(feature = "cranelift", feature = "winch"))]
1454 pub fn cranelift_opt_level(&mut self, level: OptLevel) -> &mut Self {
1455 let val = match level {
1456 OptLevel::None => "none",
1457 OptLevel::Speed => "speed",
1458 OptLevel::SpeedAndSize => "speed_and_size",
1459 };
1460 self.compiler_config_mut()
1461 .settings
1462 .insert("opt_level".to_string(), val.to_string());
1463 self
1464 }
1465
1466 /// Configures the regalloc algorithm used by the Cranelift code generator.
1467 ///

Callers 7

to_configMethod · 0.45
compileMethod · 0.45
big_stack_works_okFunction · 0.45
mainFunction · 0.45

Calls 3

compiler_config_mutMethod · 0.80
insertMethod · 0.45
to_stringMethod · 0.45