Skip to content

Commit e21aa91

Browse files
committed
Use builtin knob for forcing intra-module inlining instead.
1 parent 41f44cf commit e21aa91

File tree

2 files changed

+6
-13
lines changed

2 files changed

+6
-13
lines changed

crates/wasmtime/src/config.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use core::str::FromStr;
66
#[cfg(any(feature = "cache", feature = "cranelift", feature = "winch"))]
77
use std::path::Path;
88
use wasmparser::WasmFeatures;
9-
use wasmtime_environ::{ConfigTunables, IntraModuleInlining, TripleExt, Tunables};
9+
use wasmtime_environ::{ConfigTunables, TripleExt, Tunables};
1010

1111
#[cfg(feature = "runtime")]
1212
use crate::memory::MemoryCreator;
@@ -2084,17 +2084,6 @@ impl Config {
20842084
self
20852085
}
20862086

2087-
/// Whether to force all possible inlining.
2088-
pub fn compiler_force_inlining(&mut self, inlining: bool) -> &mut Self {
2089-
let inlining = if inlining {
2090-
IntraModuleInlining::Yes
2091-
} else {
2092-
IntraModuleInlining::No
2093-
};
2094-
self.tunables.inlining_intra_module = Some(inlining);
2095-
self
2096-
}
2097-
20982087
/// Returns the set of features that the currently selected compiler backend
20992088
/// does not support at all and may panic on.
21002089
///

tests/all/debug.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ fn stack_values_two_frames() -> anyhow::Result<()> {
5050
"#,
5151
|config| {
5252
config.compiler_inlining(inlining);
53-
config.compiler_force_inlining(inlining);
53+
if inlining {
54+
unsafe {
55+
config.cranelift_flag_set("wasmtime_inlining_intra_module", "true");
56+
}
57+
}
5458
},
5559
|mut caller: Caller<'_, ()>| {
5660
let mut stack = caller.stack_values().unwrap();

0 commit comments

Comments
 (0)