pub fn reorder_statements(db: &dyn LoweringGroup, lowered: &mut FlatLowered)
Expand description
Reorder the statments in the lowering in order to move variable definitions closer to their usage. Statement with no side effects and unused outputs are removed.
The list of call statements that can be moved is currently hardcoded.
Removing unnessary remapping before this optimization will result in better code.