fhelium.compile.passes.program._reuse_intermediates
Reuse internal deterministic transforms and simplify reference plumbing.
ReuseIntermediatesPass
class View source
python
ReuseIntermediatesPass(name: str = 'reuse-intermediates')1
Remove duplicate references/casts and share internal transform results.
Transform reuse requires the same SSA operands, result types, and attributes. A mutation, random draw, unknown operation, or region ends a local reuse run. Directly returned results, views that escape, and unknown consumers prevent reuse so this pass does not merge independently observable output storage. It does not cancel approximate arithmetic or move rounding across sums.
Attributes
| Name | Type | Default/value |
|---|---|---|
name | str | 'reuse-intermediates' |
run
method
python
def run(compilation: 'Compilation') -> PassResult: ...1