Fuses an array of do-loops with identical range controls into a single loop.
All statements from loops[1..n] are appended to loops[0]'s body, and the remaining loops are detached from the AST.
Two or more do-loops to fuse; all must share the same range control.
The surviving first loop with all statements merged in.
If fewer than 2 loops are supplied, any loop is not a range loop, or the loop boundaries differ.
// Before:// do i = 1, n// a(i) = b(i)// end do// do i = 1, n// c(i) = d(i)// end do// After:// do i = 1, n// a(i) = b(i)// c(i) = d(i)// end do Copy
// Before:// do i = 1, n// a(i) = b(i)// end do// do i = 1, n// c(i) = d(i)// end do// After:// do i = 1, n// a(i) = b(i)// c(i) = d(i)// end do
Fuses an array of do-loops with identical range controls into a single loop.
All statements from loops[1..n] are appended to loops[0]'s body, and the remaining loops are detached from the AST.