HP aC++/HP C A.06.25 Programmer's Guide
Compiling files at optimization level 2 ("-O" or "+O2") and above increases the amount
of virtual memory needed by the compiler. In cases where very large functions or files
are compiled at +O2, or in cases where aggressive (+O3 and above) optimization is
used, ensure that the maxdsiz kernel tunable is set appropriately on the machine
where compilation takes place.
HP recommends a setting of 0x100000000, or 4 GB (the default for this parameter is
0x100000000, or 4 GB) for maxdsiz_64bit in such cases. Updating the
maxdsiz_64bit tunable will ensure that the compiler does not run out of virtual
memory when compiling large files or functions.
In addition, maxssiz_64bit should be set to 128 MB for very large or complex input
files. (Normally a maxssiz_64bit setting of 64 MB will be sufficient.)
See the kctune man page for more information on how to change kernel tunable
parameters.
-O
-O
The -O option invokes the optimizer to perform level 2 optimization. This option is
equivalent to +O2 option.
Example:
This command compiles prog.C and optimizes at level 2:
aCC -O prog.C
+O0
+O0
Use +O0 for fastest compile time or with simple programs. No optimizations are
performed.
Example:
This command compiles prog.C and optimizes at level 0:
aCC +O0 prog.C
+O1
+O1
The +O1 option performs level 1 optimization only. This includes branch optimization,
dead code elimination, faster register allocation, instruction scheduling, peephole
optimization, and generation of data prefetch instructions for the benefit of direct (but
not indirect) memory accesses. This is the default optimization level.
Example:
This command compiles prog.C and optimizes at level 1:
Code Optimizing Options 69