Skip to main content

variable_forwarding

Function variable_forwarding 

Source
pub fn variable_forwarding<'db>(
    db: &'db dyn Database,
    lowered: &mut Lowered<'db>,
)
Expand description

Applies variable forwarding optimization.

Each def is attempted at most once, in backward (reverse-topological) order. Each attempt is an isolated transaction that recursively removes producers whose outputs become unconsumed, committing on success. Failed attempts are never retried — the order and no-retry are therefore load-bearing for correctness.