Cleanup Phase


A phase run after propagation to finish the job, so to speak. Codifies speculative inlining decisions, deletes branches marked as never taken, replaces folded calls with constants and flattens local recursive blocks that do not call themselves.

Main entry point:
cleanup-tree ( nodes -- nodes' )


Each node type implements its own method on the cleanup-tree* generic.

Previous pass: compiler.tree.propagation, next pass: compiler.tree.escape-analysis.