+Olevel

+Olevel=name1[,name2,...,nameN]

The +Olevel option lowers optimization to the specified level for one or more named functions.

level can be 0, 1, 2, 3, or 4.

The name parameters are names of functions in the module being compiled. Use this option when one or more functions do not optimize well or properly. This option must be used with a basic +Olevel or -Ooption. Note that currently only the C++ mangled name of the function is allowed for name.

This option works like the OPT_LEVEL pragma. The option overrides the pragma for the specified functions. As with the pragma, you can only lower the level of optimization; you cannot raise it above the level specified by a basic +Olevel or -Ooption. To avoid confusion, it is best to use either this option or the OPT_LEVEL pragma rather than both.

You can use this option at optimization levels 1, 2, 3, and 4. The default is to optimize all functions at the level specified by the basic +Olevel or -Ooption.

Examples:

The following command optimizes all functions at level 3, except for the functions myfunc1 and myfunc2, which it optimizes at level 1.

aCC +O3 +O1=myfunc1,myfunc2 funcs.c main.c

The following command optimizes all functions at level 2, except for the functions myfunc1 and myfunc2, which it optimizes at level 0.

aCC -O +O0=myfunc1,myfunc2 funcs.c main.c

+O[no]loop_transform

+O[no]loop_transform

This option transforms [does not transform] eligible loops for improved cache and other performance. This option can be used at optimization levels 2, 3 and 4.

The default is +Oloop_transform.

+O[no]loop_unroll

+O[no]loop_unroll [=unroll_factor]

The +O[no]loop_unroll option enables [disables] loop unrolling. This optimization can occur at optimization levels 2, 3, and 4. The default is +Oloop_unroll. The default is 4, that is, four copies of the loop body. The unroll_factor controls code expansion. Note that +Onoloop_unroll has no effect on loop unroll-and-jam.

+O[no]openmp

+O[no]openmp

The +Oopenmp option causes the OpenMP directives to be honored. This option is effective at any optimization level. Non OpenMP parallelization directives are ignored with warnings. +Onoopenmp requests that OpenMP directives be silently ignored. If neither +Oopenmp nor +Onoopenmp is specified, OpenMP directives will be ignored with warnings.

The OpenMP specification is available at http://www.openmp.org/specs. OpenMP programs require the libomp and libcps runtime support libraries to be present on both the compilation and runtime systems. The compiler driver automatically includes them when linking.

If you use +Oopenmp in an application, you must use -mtwith any files that are not compiled with +Oopenmp. For additional information and restrictions, See “-mt” (page 66).

Code Optimizing Options 61