fhelium.compile.passes.program._eliminate_dead_values
Remove unused pure computations across represented execution regions.
EliminateDeadValuesPass
class View source
python
EliminateDeadValuesPass(name: str = 'eliminate-dead-values')1
Erase unused operations according to registered effects.
The pass traverses known structured regions while preserving terminators and result interfaces. Unknown operations or regions, random draws, mutation, and opaque effects remain liveness roots. Removal requires purity registered for the operation's concrete class; an inherited Pure trait alone is insufficient.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | str | 'eliminate-dead-values' |
run
method
python
def run(compilation: 'Compilation') -> PassResult: ...1
Walk blocks in reverse dependency order and remove dead producers.