Skip to content

Commit

Permalink
Remove no longer necessary eliminate_unreachable_code pass
Browse files Browse the repository at this point in the history
cranelift-frontend now uses iconst.i64 + uextend instead of the invalid
iconst.i128.
  • Loading branch information
bjorn3 committed Mar 18, 2023
1 parent b9d7e6f commit a040947
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a040947

Please sign in to comment.