Loop Fusion in Array Assignments
Loop Fusion is instrumental in generating good F90 code
compiler can optimize the loop sequence by fusion
- for that, all assignments (loops) should be adjacent
- preserving data dependencies, this can fused:
-
-
-
-
-
-
-
- for this optimization to work automatically, no code should be placed between the array assignments, such that the assignments are adjacent
Further peeling to break data dependencies
will merge the two remaining loops