From a040947a9e2526b1f1ce5d57ca2a4452ae2aee14 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sat, 18 Mar 2023 15:29:46 +0000 Subject: [PATCH] Remove no longer necessary eliminate_unreachable_code pass cranelift-frontend now uses iconst.i64 + uextend instead of the invalid iconst.i128. --- src/base.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/base.rs b/src/base.rs index d0af3729b23..607acbf97ec 100644 --- a/src/base.rs +++ b/src/base.rs @@ -141,16 +141,6 @@ pub(crate) fn compile_fn( context.clear(); context.func = codegened_func.func; - // If the return block is not reachable, then the SSA builder may have inserted an `iconst.i128` - // instruction, which doesn't have an encoding. - context.compute_cfg(); - context.compute_domtree(); - context.eliminate_unreachable_code(module.isa()).unwrap(); - context.dce(module.isa()).unwrap(); - // Some Cranelift optimizations expect the domtree to not yet be computed and as such don't - // invalidate it when it would change. - context.domtree.clear(); - #[cfg(any())] // This is never true let _clif_guard = { use std::fmt::Write;