Skip to main content

eliminate_dead_code

Function eliminate_dead_code 

Source
pub fn eliminate_dead_code(expr: &TLExpr) -> (TLExpr, DeadCodeStats)
Expand description

Apply dead code elimination to an expression.

This pass removes unreachable code and simplifies expressions that have known outcomes.

§Arguments

  • expr - The expression to optimize

§Returns

A tuple of (optimized expression, statistics)