DIGITAL Software Product Description ___________________________________________________________________ PRODUCT NAME: DIGITAL KAP[TM] for C Version 3.2 SPD 45.73.07 for DIGITAL UNIX[R] DESCRIPTION The DIGITAL KAP[TM] for C product is developed by Kuck and Associates, Incorporated (KAI), and is distributed under Digital Equipment Cor- poration's Standard Terms and Conditions. DIGITAL KAP for C supports only the DIGITAL C compiler (cc -migrate) on DIGITAL UNIX systems. The DIGITAL KAP for C optimizer is a C-language source-to-source pre- processor that restructures code for improved performance on serial and parallel processors. The DIGITAL KAP optimizer performs an inter- procedural dependence analysis (IPA), allowing it to use advanced op- timizations safely. When installed, the DIGITAL KAP optimizer inte- grates with the DIGITAL C compiler for seamless operation. Major ca- pabilities of the DIGITAL KAP C optimizer include: o Automatic parallel decomposition for SMP o Loop optimizations o Memory management optimizations o Scalar optimizations o Function inlining o Informational program listings Parallel Decomposition Support December 1997 DIGITAL KAP[TM] for C Version 3.2 SPD 45.73.07 for DIGITAL UNIX[R] The DIGITAL KAP products provide true shared memory multiprocessing capabilities for DIGITAL AlphaServer Symmetric Multiprocessing (SMP) systems, providing the ability to do automatic and guided automatic decomposition of Fortran codes. When performing automatic parallel decomposition, the DIGITAL KAP op- timizer will: 1. analyze the code; 2. identify the compute intensive loops that are candidates for par- allelization 3. determine if the selected loops can be safely executed in paral- lel; 4. transform the code, creating and managing the parallel threads; 5. insert all necessary synchronization points. Because a primary objective of the automatic parallel decomposition facility is to produce a correct parallel program, the DIGITAL KAP op- timizer must often pass up opportunities to parallelize loops that cannot be properly analyzed due to lack of information or complex program structure. The advanced programmer can often improve parallel efficiency by guiding the DIGITAL KAP optimizer in performing auto- matic parallel decomposition, supplying missing information through the use of directives, assertions, and command line options. Parallel Run Time Environment The DIGITAL KAP optimizers for C, Fortran 77, and Fortran 90 all share a common run time environment based on DECthreads. Programs may be composed of modules written in one or more of the three languages, and may be parallelized by use of the appropriate DIGITAL KAP optimizers. A program parallelized with a DIGITAL KAP optimizer may be given one or more of the following options at run time by setting environment variables: o Set number of threads to use (normally set to number of processors) o Schedule for fastest turnaround or maximum throughput 2 DIGITAL KAP[TM] for C Version 3.2 SPD 45.73.07 for DIGITAL UNIX[R] o Allocate additional thread stack Loop Optimizations The DIGITAL KAP optimizer provides a variety of loop transformations intended to improve execution performance. These include: o Inner loop unrolling o Loop interchange o Loop fusion o Loop splitting o Loop rerolling o Loop distribution o Loop peeling Memory Management Optimizations The DIGITAL KAP optimizer provides several optimizations to conserve memory resources and improve data locality. These include: o Outer loop (two-dimensional) unrolling to block data for the cache o Natural data alignment Function Inlining The DIGITAL KAP optimizer can selectively insert both function and subroutine code into the main code stream, a capability referred to as "inlining". Inlining a function allows the DIGITAL KAP optimizer to include the function code in its IPA, resulting in a more thorough analysis and optimization. Inlining also eliminates the call overhead and may enable better code scheduling by the compiler. In addition to inlining, the DIGITAL KAP optimizer can perform only the IPA operation on a function or subroutine. When this option is se- lected, the function or subroutine is temporarily inlined while IPA 3 DIGITAL KAP[TM] for C Version 3.2 SPD 45.73.07 for DIGITAL UNIX[R] is performed, and then is removed. The IPA option provides the ben- efit of an improved interprocedural analysis without the code size ex- pansion that results from inlining. The source of function and sub- routine code for inlining or IPA can be a specific set of files, or a special inline library file that is built and maintained by the DIG- ITAL KAP optimizer. Scalar Optimizations The DIGITAL KAP optimizer can perform many standard scalar compiler optimizations, including: o Dead code elimination o Induction variable recognition o Invariant IF restructuring o Reciprocal substitution o Global forward substitution o Lifetime analysis Informational Program Listings The DIGITAL KAP optimizer optionally provides an informational list- ing file, outlining the results of its processing. The content of the listing file may be controlled through an option switch. Content op- tions include: o Call tree of entire program o KAP options used for each program unit o Loop optimization table for each program unit o Program unit names inserted in error output as they are processed o Compilation performance statistics o Loop summary table, summarizing number of loops transformed o Transformed program listing 4 DIGITAL KAP[TM] for C Version 3.2 SPD 45.73.07 for DIGITAL UNIX[R] Control of KAP Options The DIGITAL KAP optimizer is provided with a set of default option settings. While the default settings make the optimizer easier to use, they may not provide optimal performance for every program. And, since some of the transformations change the order of computation, some nu- merical differences in results may occur in sensitive programs. The DIGITAL KAP optimizer provides a large set of command qualifiers and in-source directives and assertions that allow the advanced user to customize KAP transformations for a particular application program. For cases where the application is sensitive to accumulated rounding error, the optimization level may need to be reduced. Consult the user documentation for advice on using the many options provided. Run-Time Library Distribution The DIGITAL KAP for C kit includes one or more Run-Time Libraries that are needed to support the execution of certain DIGITAL KAP functions. You may copy and distribute royalty-free the Run-Time Libraries (the "RTLs") with your application, provided that you: o distribute the RTLs only in conjunction with and as a part of your application; o include KAI's copyright notice on each copy of the application; o do not use the DIGITAL or KAI name, logo, or trademarks to market your application; o agree to indemnify, hold harmless, and defend both DIGITAL and KAI from and against any claims or lawsuits, including attorney's fees, that arise or result from the use or distribution of your appli- cation. For DIGITAL UNIX V3.2C-V3.2G, the RTL images are designated as: o libkmp_osf.a o libkio.a 5 DIGITAL KAP[TM] for C Version 3.2 SPD 45.73.07 for DIGITAL UNIX[R] For DIGITAL UNIX V4.0-V4.0D, the RTL images are designated as: o libkmp_osfp10.a o libkio.a HARDWARE REQUIREMENTS DIGITAL KAP for C V3.2 for DIGITAL UNIX will operate on any AlphaS- tation or AlphaServer capable of running DIGITAL UNIX. Disk Space Requirements Disk space required for installation: Root file system: / 0 KB Other file systems: /usr 9,000 KB /tmp 3 KB /var 0 KB Disk space required for use (permanent): Root file system: / 0 KB Other file systems: /usr 9,000 KB /var 0 KB These counts refer to the disk space required on the system disk. The sizes are approximate; actual sizes may vary depending on the user's system environment, configuration, and software options. SOFTWARE REQUIREMENTS For DIGITAL UNIX Systems: o DIGITAL UNIX Operating System, V3.2C-V3.2G or V4.0-V4.0D o DIGITAL UNIX C Developers' Extensions V3.2C-V3.2G (SPD 44.36), if using DIGITAL UNIX V3.2C-V3.2G 6 DIGITAL KAP[TM] for C Version 3.2 SPD 45.73.07 for DIGITAL UNIX[R] o Developer's Toolkit for DIGITAL UNIX V4.0-V4.0D (SPD 44.36), if us- ing DIGITAL UNIX V4.0-V4.0D Note: When DIGITAL KAP for C V3.2 is installed on DIGITAL UNIX V4.0- V4.0D, the executable images produced will execute only on versions 4.0-V4.0D of Digital UNIX. When DIGITAL KAP for C V3.2 is installed on DIGITAL UNIX V3.2C-V3.2G, the executable images produced will ex- ecute on versions V3.2C-V3.2G and will also execute on versions V4.0- V4.0D of DIGITAL UNIX, although a small performance difference may be experienced. This forward compatibility to V4.0 and later versions is dependent on support in DIGITAL UNIX that will be deleted in the next major release of DIGITAL UNIX. See the DIGITAL UNIX Software Product Description (SPD 41.61) for details and limitations. GROWTH CONSIDERATIONS The minimum hardware/software requirements for any future version of this product may be different from the requirements for the current version. DISTRIBUTION MEDIA This product is distributed on the DIGITAL CD-ROM Software Library for DIGITAL UNIX and is also available as an individual product CD-ROM. The software documentation for this product is available as part of the DIGITAL UNIX Online Documentation Library on CD-ROM (QA-054AA-H8), and is also available as a printed documentation set. ORDERING INFORMATION Unlimited Use Software Licenses: QL-0HHA*-AA Concurrent Use Software License: QL-0HHAM-3B Software Media/Documentation: QA-0HHAA-H8 Software Documentation: QA-0HHAA-GZ Software Product Services: QT-0HHA*-** 7 DIGITAL KAP[TM] for C Version 3.2 SPD 45.73.07 for DIGITAL UNIX[R] * Denotes variant fields. For additional information on available li- censes, services, and media, refer to the appropriate price book. SOFTWARE LICENSING This software is furnished only under a license. For more information about the DIGITAL licensing terms and policies, contact your local DIGITAL office or DIGITAL partner. License Management Facility Support This layered product supports the DIGITAL UNIX License Management Fa- cility. License units for this product are allocated on an Unlimited System Use basis. For more information on the DIGITAL UNIX License Management Facility, refer to the DIGITAL UNIX Operating System Software Product Descrip- tion (SPD 41.61.xx) or documentation. SOFTWARE PRODUCT SERVICES A variety of service options are available from DIGITAL. For more in- formation, contact your local DIGITAL office or DIGITAL partner. SOFTWARE WARRANTY Warranty for this software product is provided by DIGITAL with the purchase of a license for the product as defined in the Software War- ranty Addendum of this SPD. The above information is valid at time of release. Please contact your local DIGITAL office or DIGITAL partner for the most up-to-date in- formation. 8 DIGITAL KAP[TM] for C Version 3.2 SPD 45.73.07 for DIGITAL UNIX[R] [R] UNIX is a registered trademark in the United States and other countries licensed exclusively through X/Open Company Limited [TM] KAP is a trademark of Kuck and Associates, Inc. [TM] The DIGITAL Logo, DEC, DIGITAL, and DECthreads are trademarks of Digital Equipment Corporation. ©1997 Digital Equipment Corporation. All Rights Reserved. 9