Preface |
Preface
|
Preface
|
Chapter 1 |
1
|
What Is Compaq KAP C?
|
Chapter 2 |
2
|
How to Run KAP C
|
2.1
|
Using KAP C
|
2.2
|
Installing KAP C
|
2.3
|
Compiling a Program Using the kcc Driver
|
2.3.1
|
Using kcc with the Default KAP and C Compiler Switch Settings
|
2.3.2
|
Passing KAP C Switches to kcc
|
2.3.3
|
Passing Compaq C Compiler Switches to kcc
|
2.4
|
Saving Optimized Source Programs
|
2.5
|
KAP C Command-Line Switches Determined by Compiler Switches
|
2.6
|
Invoking the C Preprocessor
|
2.7
|
Preprocessing a Program Using kapc
|
2.8
|
Using KAP C Syntax
|
2.9
|
Using File Naming Conventions
|
2.10
|
Guidelines for Optimizing With KAP
|
2.10.1
|
Optimizing Small Programs with KAP
|
2.10.2
|
Optimizing Large Programs with KAP
|
2.10.3
|
General Optimization Tips
|
2.11
|
Improving and Customizing KAP Performance
|
2.12
|
Using Additional Performance Improvement Techniques
|
2.13
|
Correcting KAP Problems
|
Chapter 3 |
3
|
KAP Parallel Processing
|
3.1
|
Overview
|
3.2
|
Parallel Processing Methods
|
3.3
|
Summary of Parallel Processing Controls
|
3.4
|
Interaction of Parallel Processing Controls
|
3.5
|
Automatic Parallelization Using the kcc Driver
|
3.6
|
Preprocessing a Program for Parallel Execution Using kapc
|
3.7
|
Directed Parallelization Using the kcc Driver and OpenMP Directives
|
3.7.1
|
Changing Source Programs
|
3.7.2
|
Giving Command-Line Switches
|
3.7.3
|
Directing the Compilation and Linking Process
|
3.8
|
Combined Automatic and Directed Parallelization Using the kcc Driver
|
3.8.1
|
Changing Source Programs
|
3.8.2
|
Giving Command-Line Switches
|
3.8.3
|
Directing the Compilation and Linking Process
|
3.9
|
Compiling a Program for Parallel Execution Using kapc
|
3.10
|
Running a Parallelized Program
|
3.11
|
Parallel Programming Tips
|
Chapter 4 |
4
|
KAP Command-Line Switches
|
4.1
|
Overview of Command-Line Switches
|
4.2
|
Command-Line Switches for the kcc Driver
|
4.2.1
|
-cc, -nocc, (-cc=/usr/bin/cc)
|
4.2.2
|
-cext, (C file extension)
|
4.2.3
|
-ckap, (-ckap='/usr/bin/kapc')
|
4.2.4
|
-ckapargs
|
4.2.5
|
-cpp, (-cpp='/usr/bin/cc')
|
4.2.6
|
-sif, -S, (off)
|
4.2.7
|
-tmpdir, (-tmpdir=/tmp/)
|
4.2.8
|
-tune, (-tune=<current system architecture>)
|
4.2.9
|
-verbose, -v, (-nov)
|
4.3
|
General Optimization Switches for the kapc Preprocessor
|
4.3.1
|
-interchange, -nointerchange, (-interchange)
|
4.3.2
|
-namepartitioning, -namepart, -nonamepart, (-nonamepartitioning)
|
4.3.3
|
-natural, -nat, -nonatural, -nnat, (-natural)
|
4.3.4
|
-optimize, -o, (-o=5)
|
4.3.5
|
-recursion, -rc, -nrc, (-norecursion)
|
4.3.6
|
-roundoff, -r, (-r=3)
|
4.3.7
|
-scalaropt, -so, (-so=3)
|
4.3.8
|
-skip, -sk, -nsk, (-noskip)
|
4.3.9
|
-tune, (-tune=<current system architecture>)
|
4.4
|
Parallel Processing Switches for the kapc Preprocessor
|
4.4.1
|
-chunk, (-chunk=1)
|
4.4.2
|
-concurrentize, -conc, -noconcurrentize, (-nconc)
|
4.4.3
|
-minconcurrent, -mc, (-mc=1000)
|
4.4.4
|
-scheduling, -sched, (-sched=e)
|
4.5
|
Inlining and Interprocedural Analysis (IPA) Switches for the kapc Preprocessor
|
4.5.1
|
-inline, -inl, -noinline, (-ninl), -ipa, -noipa, (-nipa)
|
4.5.2
|
-inline_and_copy, -inlc, (off)
|
4.5.3
|
-inline_create, -incr, (off) -ipa_create, -ipacr, (off)
|
4.5.4
|
-inline_depth, -ind, (-ind=2), -ipa_depth, -ipad, (-ipad=10)
|
4.5.5
|
-inline_from_files, -inff, (current source file)
|
4.5.6
|
-inline_from_libraries, -infl, (off)
|
4.5.7
|
-ipa_from_files, -ipaff, (current source file)
|
4.5.8
|
-ipa_from_libraries, -ipafl, (off)
|
4.5.9
|
-inline_looplevel, -inll, (-inll=2), -ipa_looplevel, -ipall, (-ipall=2)
|
4.5.10
|
-inline_manual, -inm, (off) -ipa_manual, -ipam, (off)
|
4.5.11
|
-inline_optimize, (-inline_optimize=0), -ipa_optimize, (-ipa_optimize=0)
|
4.6
|
Input-Output File Selection Switches for the kapc Preprocessor
|
4.6.1
|
-cmp, -nocmp, -ncmp, (<file>.cmp.c), (<file>.cmp)
|
4.6.2
|
-list, -l, -nolist, -nl, (-list=<file>.out)
|
4.7
|
Listing Switches for the kapc Preprocessor
|
4.7.1
|
-cmpoptions, -cp, -nocmpoptions, (-ncp)
|
4.7.2
|
-lines, -ln, (-ln=55)
|
4.7.3
|
-listingwidth, -lw, (-lw=132)
|
4.7.4
|
-listoptions, -lo, (off)
|
4.7.5
|
-suppress, -su, (off)
|
4.8
|
Language Switches for the kapc Preprocessor
|
4.8.1
|
-restrict, -norestrict, (-restrict)
|
4.8.2
|
-signed, (on)
|
4.9
|
Advanced Optimization Switches for the kapc Preprocessor
|
4.9.1
|
-addressresolution, -arl, (-arl=1)
|
4.9.2
|
-arclimit, -arclm, -noarclimit, (-arclimit=5000)
|
4.9.3
|
-cache_prefetch_line_count, -cplc, (-cplc=0)
|
4.9.4
|
-cacheline, -chl, (-chl=64,64)
|
4.9.5
|
-cachesize, -chs, (-chs=32,0)
|
4.9.6
|
-dpregisters, -dpr, (-dpr=32)
|
4.9.7
|
-each_invariant_if_growth, -eiifg, (-eiifg=20)
|
4.9.8
|
-fpregisters, -fpr, (-fpr=32)
|
4.9.9
|
-fuse, (-nofuse)
|
4.9.10
|
-fuselevel, (-fuselevel=0)
|
4.9.11
|
-heaplimit, -heap, (-heaplimit=100)
|
4.9.12
|
-hoist_loop_invariants, -hli, -hli=<integer>
|
4.9.13
|
-limit, -lm, (-lm=50)
|
4.9.14
|
-machine, -ma, -nomachine, -nma, (-ma=s)
|
4.9.15
|
-max_invariant_if_growth, -miifg, (-miifg=500)
|
4.9.16
|
-routine=<rtn_name><switches>, -rt=<rtn_name><switches>, (off)
|
4.9.17
|
-setassociativity, -sasc, (-sasc=1,1)
|
4.9.18
|
-stdio, (-nostdio)
|
4.9.19
|
-syntax, -sy, (-nosyntax)
|
4.9.20
|
-tablesize, -ts, (-ts=24000000)
|
4.9.21
|
-unroll, -ur, (-ur=4), -unroll2, -ur2, (-ur2=160), -unroll3, -ur3, (-ur3=1)
|
Chapter 5 |
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 serial
|
5.3
|
Inlining and IPA Directives
|
5.4
|
Parallel Processing Directive
|
Chapter 6 |
6
|
Inlining and Interprocedural Analysis (IPA)
|
6.1
|
Overview
|
6.2
|
Inlining and IPA Command-Line Switches
|
6.2.1
|
-Inline_from and -ipa_from Switches
|
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
|
Additional Information on Inlining and IPA
|
6.7
|
Inhibiting Inlining
|
Chapter 7 |
7
|
Transformations
|
7.1
|
Memory Management
|
7.1.1
|
Command-Line Switches
|
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
|
Chapter 8 |
8
|
KAP Listing
|
8.1
|
Listing Information Available with -listoptions Switch
|
8.1.1
|
Calling Tree (c)
|
8.1.2
|
KAP Switches (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
|
Appendix A |
Appendix 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 |
Index |
Tables |
2-1 |
User Actions for Specific Goals |
4-1 |
Command-Line Switches for the kcc Driver |
4-2 |
Command-Line Switches for the kapc Preprocessor |
4-3 |
Optimization Levels |
4-4 |
Roundoff Levels |
4-5 |
Scalar Levels |
5-1 |
KAP Assertions and Directives |