From 0966fdf1e80e9cdd230d4f62742ca9f8bbcb44ef Mon Sep 17 00:00:00 2001 From: Chris Fallin Date: Tue, 29 Nov 2022 21:39:29 -0800 Subject: [PATCH] Reachability bugfix. --- src/frontend.rs | 2 +- src/ir/module.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/frontend.rs b/src/frontend.rs index a0f76d0..4f594a6 100644 --- a/src/frontend.rs +++ b/src/frontend.rs @@ -1296,7 +1296,7 @@ impl<'a, 'b> FunctionBodyBuilder<'a, 'b> { out, params, results, - merge_reachable, + merge_reachable: merge_reachable || self.reachable, }); self.cur_block = el; self.locals.start_block(el, self.reachable); diff --git a/src/ir/module.rs b/src/ir/module.rs index 4bb2701..5556bf2 100644 --- a/src/ir/module.rs +++ b/src/ir/module.rs @@ -224,7 +224,6 @@ impl<'a> Module<'a> { let mut module = frontend::wasm_to_ir(bytes)?; for func_decl in module.funcs.values_mut() { if let Some(body) = func_decl.body_mut() { - crate::passes::rpo::run(body); let cfg = crate::cfg::CFGInfo::new(body); crate::passes::basic_opt::gvn(body, &cfg); crate::passes::resolve_aliases::run(body);