Skip to main content

Module functions

Module functions 

Source
Expand description

Auto-generated module

🤖 Generated with SplitRS

Functions§

collect_usage_info
Collect usage information for every variable referenced in expr.
eliminate_dead_functions
Remove function declarations from module that are not reachable from the given roots. A function is reachable if it is named in roots or transitively called by a reachable function.
eliminate_dead_lets
Remove let-bindings whose bound variable is never used in the continuation body. Only pure (side-effect-free) bindings are removed; applications are conservatively kept because they may diverge or have side-effects.
eliminate_unreachable_alts
Eliminate case alternatives that are statically unreachable.
fold_known_case
Fold a case expression when the scrutinee is a known constructor.
optimize_dce
Run the complete DCE + constant propagation pipeline on a module.
propagate_constants
Propagate literal constants: when let x = <lit>, replace every occurrence of Var(x) with Lit(<lit>) in the continuation and remove the binding when it becomes dead.
propagate_copies
Propagate copies: when let x = y (i.e. LcnfLetValue::FVar(y)), replace every use of x with y in the continuation and drop the binding.