Performance and optimization

Many enhancements were made to assist with performance tuning and program optimization.

Performance-related compiler options and directives

The entries in the following table describes new or changed compiler options and directives.

Information presented here is just a brief overview. For more information about these and other performance-related compiler options, refer to Optimization and tuning options.

Table 1. Performance-related compiler options and directives
Option/directive Description
-qalias= global|noglobal These new -qalias suboptions enable or disable the application of language-specific aliasing rules across compilation units during link time optimization.
-qalias= restrict|norestrict These new -qalias suboptions enable or disable optimization for restrict qualified pointers. Specifying -qalias=restrict will usually improve performance for code that uses restrict qualified pointers. You can use -qalias=norestrict to preserve compatibility with code compiled with versions of the compiler previous to V9.0.
-qnofdpr|-qfdpr Specifying the -qfdpr option instructs the compiler to store optimization information in the created object file. This information is used by the Feedback Directed Program Restructuring (FDPR) performance-tuning utility.
-qfloat= fenv|nofenv These new -qfloat suboptions inform the compiler if code has a dependency on the floating-point hardware environment, such as explicitly reading or writing the floating-point status and control register. Specifying -qfloat=nofenv indicates that there is no dependency on the hardware environment, allowing the compiler to perform aggressive optimizations.
-qfloat= gcclongdouble|nogcclongdouble These new -qfloat suboptions have effect only when the -qldbl128 option is in effect. They instruct the compiler to use either GCC-supplied or IBM-supplied library functions for 128-bit long double operations.
-qfloat= hscmplx|nohscmplx Specifying -qfloat=hscmplx improves optimization of operations involving complex division and complex absolute values.
-qfloat= rngchk|norngchk Specifying -qfloat=rngchk enables range checking on input arguments for software divide and inlined sqrt operations. Specifying -qfloat=norngchk instructs the compiler to skip range checking, allowing for better performance in certain circumstances. Specifying the -qnostrict compiler option sets -qfloat=norngchk.
-qipa=threads= [auto|noauto|number] This new -qipa suboption lets you specify how many threads the compiler will assign to code generation during the second IPA pass.
-qnoldbl128|-qldbl128 Specifying -qldbl128 increases the size of long double types from 64 bits to 128 bits.
-qpdf The -qpdf option can now be used to provide profile-directed feedback on specific objects. See Object level profile-directed feedback for more information.
-qsmp= threshold=n When -qsmp=auto is in effect, this new suboption lets you specify the amount of work required in a loop before the compiler will consider it for automatic parallelization.
#pragma expected_value(param, value) Use the #pragma expected_value directive to specify a value that a parameter passed in a function call is most likely to take at run time. The compiler can use this information to perform certain optimizations, such as function cloning and inlining.