pub fn combine_stack_layouts(
layouts: &[BlockStackLayout],
) -> Option<BlockStackLayout>Expand description
Computes a common stack layout for multiple incoming edges at a merge point.
The algorithm:
- Find values that appear in multiple incoming layouts at the same position
- For values at different positions, choose the position with lowest total shuffle cost
- Values only needed by one predecessor become “junk slots” for others
Returns None if the layouts are incompatible (too many different values).