next up previous contents index
Next: loop interchanging Up: Simple functions Previous: Loop distribution

Loop fusion

The loop fusion transformation moves the body of a do-loop statement in another do-loop statement.

$\vartriangleright$ Example 63: 



    DO I=1,N
      PRINT *,I
    ENDDO 
    DO I=1,N
      A[I] = F(I)+1 
    ENDDO



$\longrightarrow$

    DO I=1,N
      PRINT *,I
      A[I] = F(I)+1 
    ENDDO



  $\blacktriangleright$ Fits:LoopFusion:Check(LOOP DIAGMESG LOOP2)
 
This function check if the fusion of two do-loop statements is allowed.
  $\blacktriangleright$ Fits:LoopFusion:Advice(LOOP DIAGMESG LOOP2)
 
This function emits a diagnostic about the interest of the fusion of LOOP2 into LOOP.

  $\blacktriangleright$ Fits:LoopFusion:Safe(LOOP,DIAGMESG,LOOP2)
 
This functions check if the fusion of LOOP2 in LOOP is safe.
  $\blacktriangleright$ Fits:LoopFusion:Apply(LOOP,VERBOSE,LOOP2)
 
This function applies the loop fusion transformation.


next up previous contents index
Next: loop interchanging Up: Simple functions Previous: Loop distribution
Yann Mevel
1999-04-30