Pipelining for ItaniumŪ-based Applications

The SWP and NOSWP  directive indicate preference for a loop to get software-pipelined or not. The SWP directive does not help data dependency, but overrides heuristics based on profile counts or lop-sided control flow.

The Software Pipelining optimization triggered by the SWP directive applies instruction scheduling to certain innermost loops, allowing instructions within a loop to be split into different stages, allowing increased instruction level parallelism. This can reduce the impact of long-latency operations, resulting in faster loop execution. Loops chosen for software pipelining are always innermost loops that do not contain procedure calls that are not inlined. Because the optimizer no longer considers fully unrolled loops as innermost loops, fully unrolling loops can allow an additional loop to become the innermost loop (see loop unrolling options).

You can request and view the optimization report to see whether software pipelining was applied (see Optimizer Report Generation).

Example 1: SWP Directive

!DEC$ SWP

do i = 1, m

  if (a(i) .eq. 0)  then

     b(i) = a(i) + 1

  else

     b(i) = a(i)/c(i)

  endif

enddo

For more details on these directives, see "Directive Enhanced Compilation", section "General Directives", in the IntelŪ Fortran Language Reference.