pub fn optimize_dce(
module: &LcnfModule,
config: &DceConfig,
) -> (LcnfModule, DceStats)Expand description
Run the complete DCE + constant propagation pipeline on a module.
The optimizer runs the enabled passes in a fixed-point loop:
- Constant propagation
- Copy propagation
- Known case folding
- Dead let elimination
- Unreachable alt elimination
After the fixed point, dead function elimination is applied once (interprocedural).
Returns the optimized module and accumulated statistics.