Documentation

Lean.Compiler.LCNF.CoalesceRC

Coalesce Reference Counting Operations #

This pass coalesces multiple inc/dec operations on the same variable within a basic block. Within a basic block, it is always safe to:

Crucially this pass must be placed after expandResetReuse as that one relies on incs still being present in their original location for optimization purposes.