Options for performance optimization

Table 15. Options for defined optimization levels
Option name Type Default Description
-O, -qoptimize, -qoptimize -flag, -qopt -qnooptimize Optimizes code at a choice of levels during compilation.

Table 16. Options for ABI performance tuning
Option name Type Default Description
-qdataimported -qopt - Marks data as imported.
-qdatalocal -qopt - Marks data as local.
-qlibansi -qopt -qnolibansi Assumes that all functions with the name of an ANSI C library function are in fact the system functions.
-qminimaltoc -qopt -qnominimaltoc Avoids TOC overflow conditions in 64-bit compilations by placing TOC entries into a separate data section for each object file.
-qproclocal, -qprocimported, -qprocunknown -qopt See -qproclocal, -qprocimported, -qprocunknown. Marks functions as local, imported, or unknown.
-qtocdata -qopt -qnotocdata. Specifies the thread-local storage model to be used by the application.
-qunwind -qopt -qunwind Informs the compiler that the application does not rely on any program stack unwinding mechanism.
Table 17. Options that restrict optimization
Option name Type Default Description
-qprefetch -qopt -qprefetch Enables generation of prefetching instructions in compiled code.
-qsmallstack -qopt -qnosmallstack Instructs the compiler to reduce the size of the stack frame.
-qspill -qopt -qspill=512 Specifies the size of the register allocation spill area.
-qstrict -qopt See -qstrict. Turns off aggressive optimizations of the -O3 option that have the potential to alter the semantics of your program.

Table 18. Options for processor and architectural optimization
Option name Type Default Description
-qarch -qopt -qarch=ppc64grsq Specifies the architecture on which the executable program will be run.
-qcache -qopt - Specifies a cache configuration for a specific execution machine.
-qdirectstorage -qopt -qnodirectstorage. Informs the compiler that write-through enabled or cache-inhibited storage may be referenced.
-qtune -qopt See -qtune. Specifies the architecture for which the executable program is optimized.
Table 19. Options for loop optimization
Option name Type Default Description
-qhot -qopt -qnohot Instructs the compiler to perform high-order loop analysis and transformations during optimization.
-qstrict_induction -qopt See -qstrict_induction. Disables loop induction variable optimizations that have the potential to alter the semantics of your program.
-qunroll -qopt -qunroll=auto Unrolls inner loops in the program.

Table 20. Options for code size reduction
Option name Type Default Description
-qcompact -qopt -qnocompact When used with optimization, reduces code size where possible, at the expense of execution speed.
C++ only -qeh -qopt -qeh Controls exception handling.
C++ only -qkeepinlines -qopt -qnokeepinlines Instructs the compiler to keep or discard definitions for unreferenced external inline functions.

Table 21. Options for whole-program analysis
Option name Type Default Description
-qipa -qopt See -qipa. Turns on or customizes a class of optimizations known as interprocedural analysis (IPA).

Table 22. Options for function inlining
Option name Type Default Description
-qinline -qopt See -qinline. Attempts to inline functions instead of generating calls to a function.
-Q -flag See -Q. Attempts to inline functions.

Table 23. Options for performance data collection
Option name Type Default Description
-qpdf1, -qpdf2 -qopt -qnopdf1, -qnopdf2 Tunes optimizations through profile-directed feedback.
-qshowpdf -qopt -qnoshowpdf Used together with -qpdf1 and a minimum of -O to add additional call and block count profiling information to an executable.