Next | Prev | Up | Top | Contents | Index

Kuck and Associates Preprocessor (KAP)

KAP (Kuck and Associates Preprocessor) is a Fortran optimizer that analyzes data dependence to guide traditional serial optimizations and automatic parallelization. It is built into fef77 (rather, fef77 consists largely of KAP).

This is an example of a transformation that KAP performs. The following routine:

subroutine bar(a,b,c,d,j) real*4 a(1024),b(1024),c(1024) real*4 d,e,f

sum = 0 do m= 1,j do i=1,1024 b(i) = b(i) * d enddo enddo

call foo(a,b,c) end

is turned into this by the KAP:

# 1 "vmuls.f"

subroutine BAR (A, B, C, D, J ) real*4 A(1024), B(1024), C(1024) real*4 D, E, F do 2 M=1,J-3,4 do 2 I=1,1024 B(I) = B(I) * D B(I) = B(I) * D B(I) = B(I) * D B(I) = B(I) * D 2 continue do 3 M=M,J,1 do 3 I=1,1024 B(I) = B(I) * D 3 continue call FOO (A,B,C) end

As you can see, some outer loop unrolling has occurred.


Passing Options to KAP
KAP's Optimization Flags (-o, -r, -so)
Opimization Levels Passed to KAP

Next | Prev | Up | Top | Contents | Index