KAP C for OpenVMS Alpha
User Guide

April 1999

This document provides information about how to run and use KAP C on Compaq OpenVMS Alpha systems.

Revision /Update Information This is an updated document.

Operating System and Version: Compaq OpenVMS Alpha, Version 7.2

Software Version: Version 3.2
C Version 6.0

Compaq Computer Corporation
Maynard, Massachusetts

_____________________________________________________________________
First Printing, February 1993
Revised, April 1999

Possession, use, or copying of the software described in this publication is authorized only pursuant to a valid written license from Compaq or an authorized sublicensor.

Compaq Computer Corporation makes no representations that the use of its products in the manner described in this publication will not infringe on existing or future patent rights, nor do the descriptions contained in this publication imply the granting of licenses to make, use, or sell equipment or software in accordance with the description.

© Digital Equipment Corporation 1993-1999. All rights reserved.

© Kuck & Associates, Inc. 1993-1999. All rights reserved.

Compaq, the Compaq logo, AlphaGeneration, Compaq Fortran,, and DIGITAL are registered in the U.S. Patent and Trademark Office.

DECthreads is a trademark of Compaq Computer Corporation.

KAP is a trademark of Kuck & Associates, Inc.

Other product names mentioned herein may be the trademarks of their respective companies.

This document is available on CD-ROM.

This document was produced using SDMLWEB.

Contents

Preface

1 Overview

2 How to Run KAP

2.1 Using KAP

2.2 Installing KAP

2.3 Compiling a Program Using the kcc Driver

2.4 KCC Qualifiers

2.4.1 /c, /c, (/c)

2.4.2 /verbose, /verbose, (/noverbose)

2.5 KAP Command Qualifiers Determined by Compiler Qualifiers

2.6 Invoking the C Preprocessor

2.7 Preprocessing a Program Using kapc

2.8 Using KAP Syntax

2.9 Using File Naming Conventions

2.10 Introducing the Five Minute KAP Guide

2.10.1 Optimizing Small Programs with KAP

2.10.2 Optimizing Large Programs with KAP

2.11 Improving and Customizing KAP Performance

2.12 General Optimization Tips

2.13 Using Additional Performance Improvement Techniques

2.14 Correcting KAP Problems

3 KAP Parallel Processing

3.1 Compiling a Program for Parallel Execution Using the kcc Driver

3.2 Preprocessing a Program for Parallel Execution Using kapc

3.3 Running a Parallel Program

3.4 Parallel Processing Options

3.5 Parallel Programming Tips

4 KAP Command Qualifiers

4.1 General Optimization Qualifiers

4.1.1 /interchange, /nointerchange, (/interchange)

4.1.2 /namepartitioning, /namepart, /nnamepart, (/nonamepartitioning)

4.1.3 /optimize, /o, (/optimize=5)

4.1.4 /recursion, /rc, (/norecursion), /nrc

4.1.5 /roundoff, /r, (/roundoff=3)

4.1.6 /scalaropt, /so, (/scalaropt=3)

4.1.7 /skip, /sk, /nsk, (/noskip)

4.1.8 /tune, /tune, (/tune=<architecture>)

4.2 Parallel Processing Qualifiers

4.2.1 /concurrentize, /conc, /noconc, (/noconcurrentize)

4.2.2 /minconcurrent, /mc, (/minconcurrent=1000)

4.2.3 /scheduling=<list>, /schd=<list>, (/scheduling=e)

4.3 Inlining and Interprocedural Analysis Qualifiers

4.3.1 /inline, /inl, (off) /noinline, /ninl, /ipa, /ipa, (off), /noipa, /nipa

4.3.2 /inline_and_copy, /inlc, (off)

4.3.3 /inline_create, /incr, (off), /ipa_create, /ipacr, (off)

4.3.4 /inline_depth, /ind, (/inline_depth=2), /ipa_depth, /ipad, (/ipa_depth=2)

4.3.5 /inline_from_files, /inff, (current source file)

4.3.6 /inline_from_libraries, /infl, (off)

4.3.7 /ipa_from_files, /ipaff, (current source file)

4.3.8 /ipa_from_libraries, /ipafl, (off)

4.3.9 /inline_looplevel, /inll, (/inline_looplevel=2), /ipa_looplevel, /ipall, (/ipa_looplevel=2)

4.3.10 /inline_manual, /inm, (off), /ipa_manual, /ipam, (off)

4.3.11 /inline_optimize, (/inline_optimize=0), /ipa_optimize, (/ipa_optimize=0)

4.4 Language Qualifiers

4.4.1 /natural, /nat, (/natural), /nonatural, /nnat

4.4.2 /signed, /signed, (/signed)

4.5 Advanced Optimization Control

4.5.1 /addressresolution, /arl, (/arl=1)

4.5.2 /arclimit, /arclm, (/arclimit=5000)

4.5.3 /cacheline, /chl, (/cacheline=32,32)

4.5.4 /cache_prefetch_line_count, /cplc, (/cplc=0)

4.5.5 /cachesize, /chs, (/cachesize=8,0)

4.5.6 /dpregisters, /dpr, (/dpregisters=32)

4.5.7 /each_invariant_if_growth, /eiifg, (/eiifg=20)

4.5.8 /fpregisters, /fpr, (/fpregisters=32)

4.5.9 /fuse, /nfuse, (/nofuse)

4.5.10 /fuselevel, /fuselevel=1, (/fuselevel=0)

4.5.11 /heaplimit, /heap, (/heaplimit=100)

4.5.12 /limit, /lm, (/limit=50)

4.5.13 /machine, /ma, /noma, (machine=s)

4.5.14 /max_invariant_if_growth, /miifg, (/miifg=500)

4.5.15 /routine, /rt, /nrt, (/noroutine)

4.5.16 /setassociativity, /sasc, (/setassociativity=1)

4.5.17 /stdio, /stdio, (off)

4.5.18 /syntax, /sy, (/syntax=d)

4.5.19 /unroll, /ur, (unroll=4), /unroll2, /ur2, (/unroll2=160), /unroll3, /ur3, (/unroll3=1)

4.6 Input-Output Qualifiers

4.6.1 /cmp, (<file>.cmp.c), (<file>.cmp.c), /nocmp, /ncmp

4.6.2 /list, /l, (<file>.out), /nolist, /nl

4.7 Listing Qualifiers

4.7.1 /cmpoptions, /cp, /cmpoptions=n, (/nocmpoptions), /ncp

4.7.2 /lines, /ln, (/lines=55)

4.7.3 /listingwidth, /lw, (/listingwidth=132)

4.7.4 /listoptions, /lo, (/listoptions=o)

5 Assertions and Directives

5.1 Assertions

5.1.1 #pragma _KAP arl <integer>

5.1.2 #pragma _KAP distinct

5.1.3 #pragma _KAP no side effects ( name [,name...] )

5.2 Parallel Processing Assertions

5.2.1 #pragma _KAP concurrent

5.2.2 #pragma _KAP concurrent call

5.2.3 #pragma _KAP concurrent ignore call

5.2.4 #pragma _KAP serial

5.3 Inlining and IPA Directives

5.4 Parallel Processing Directive

6 Inlining and IPA

6.1 Inlining

6.2 Inlining and IPA Command Qualifiers

6.2.1 /Inline_from and /ipa_from Qualifiers

6.2.2 Library Creation

6.2.3 Naming Specific Functions

6.2.4 Call Nesting (Recursive Inlining)

6.2.5 For-Loop Level

6.2.6 Manual Control

6.3 Inlining Pragmas

6.4 Listing File Support

6.5 Inlining/IPA Examples

6.5.1 Inlining Example

6.5.2 IPA Example

6.5.3 Recursive Inlining Examples

6.6 Notes on Inlining and IPA

6.7 Inhibiting Inlining

7 Transformations

7.1 Memory Management

7.1.1 Command Qualifiers

7.1.2 Memory Management Techniques

7.2 Loop Reordering

7.3 Scalar Optimizations

7.3.1 Induction Variable Recognition

7.3.2 Global Forward Substitution

7.3.3 Loop Peeling

7.3.4 Lifetime Analysis

7.3.5 Invariant If Floating

7.3.6 Derived Assertions

7.3.7 Dead-Code Elimination

7.3.8 Loop Fusion

7.4 Loop Unrolling

7.5 Loop Rerolling

8 KAP Listing

8.1 Listoptions

8.1.1 Calling Tree (C)

8.1.2 KAP Qualifiers (K)

8.1.3 Loop Table (L)

8.1.4 Name (N)

8.1.5 Compilation Performance Statistics (P)

8.1.6 Summary Table (S)

8.2 Syntax Error/Warning Messages

8.3 Loop Table Messages

A Data Dependence Analysis

A.1 Data Dependence Definitions

A.2 Varieties of Data Dependence

A.3 Input and Output Sets

A.4 Data Dependence Relations

A.5 Data Dependence Direction Vectors

A.6 Loop-Carried Dependence

A.7 Data Dependence Example

Index

Tables

2-1 User Actions for Specific Goals

4-1 Command-Line Qualifiers

5-1 KAP Assertions and Directives


(no previous page) | Next Page | Contents | Index |
Command-Line Qualifiers

Copyright © Digital Equipment Corporation. 1999. All Rights Reserved.