HP Pascal/HP-UX Release Notes Version A.10.08
Chapter 1 11
New and Changed Features
Optimization Levels
Optimization Levels
HP Pascal/HP-UX supports five levels of optimization. The
corresponding command-line options are summarized in Table 1-1.
NOTE HP Pascal/HP-UX does not support some of the +O3 and +O4
optimization features that are available in other compilers.
Table 1-1 Optimization Levels
Option Meaning
+O0 Minimal optimization, including constant folding and simple register
assignment. This is the default.
+O1 Branch optimizations, instruction re-scheduling, faster register allocation, and
other block-level optimizations.
At this level of optimization, programs compile quickly and still realize some
execution speed-up.
+O2 Full optimization within each subprogram in a file, including store and copy
optimization, software pipelining, and register reassociation.
Compiling at this level of optimization may take longer, but can greatly improve
run-time performance.
The -O command-line option also invokes this level of optimization.
+O3 Full optimization of all subprograms within a compilation unit, including
data-flow analysis and subprogram inlining.
Compiling at this level takes longer than at the previous levels but can result in
faster executable code.
Note that you can achieve the pre-Release 10.0 behavior of +O3 by optimizing
with +O2 +Ofastaccess.