After you have used the KAP protocol for either small or large programs, you can find ways to fine-tune KAP to fit your application.
This section helps you discover which KAP command-line qualifiers, directives, or assertions can be used to try to improve KAP performance for a particular application program. The following is a list of common goals and common program situations that KAP users often have, and it offers suggestions for possible improvements.
Remember that KAP is a tool to optimize C code. Like any tool, it performs best when you are familiar with the details of how it works and are able to use its correctly and advantageously.
Although KAP default qualifier settings will achieve performance improvement, you can often achieve greater improvement if you understand and use alternate qualifier settings. Moreover, you can often insert directives or assertions to achieve improved performance.
See Table 2-1 for user actions and specific goals.
|Have a more informative listing to help answer your questions.||Use |
|Recognize more reductions.||Increase |
|Answer a KAP generated question.||Use appropriate assertion.|
|Eliminate unnecessary last-value assignment.||Use |
|Spend less time optimizing deeply nested loops.||Reduce |
|Disable inner loop unrolling.||Use |
|Disable outer loop unrolling.||Use |
|Prevent a given loop from being optimized.||Use
|Disable some data dependence checking.||Use |
|Expand (inline) subroutine calls within loops.||Use |
|Inline more routines.||Increase |
|Turn off directives and assertions.||Use the |
|Process a program that uses intentional array bounds violation.||Use
|Use STATIC storage.|| Insert SAVE
statements or use |