HP C Programmer's Guide (92434-90009)

72 Chapter4
Optimizing HP C Programs
Controlling Specific Optimizer Features
+O[no]dataprefetch
Optimization level(s): 2, 3, 4
Default: +Onodataprefetch
When +Odataprefetch is enabled, the optimizer will insert instructions within innermost
loops to explicitly prefetch data from memory into the data cache. Data prefetch
instructions will be inserted only for data structures referenced within innermost loops
using simple loop varying addresses (that is, in a simple arithmetic progression). It is only
available for PA-RISC 2.0 targets.
The math library contains special prefetching versions of vector routines. If you have a
PA-RISC 2.0 application that contains operations on arrays larger than 1 megabyte in size,
using +Ovectorize in conjunction with +Odataprefetch may improve performance
substantially.
Use this option for applications that have high data cache miss overhead.
+O[no]entrysched
Optimization level(s): 1, 2, 3, 4
Default: +Onoentrysched
The +Oentrysched option optimizes instruction scheduling on a procedure's entry and exit
sequences. Enabling this option can speed up an application. The option has undefined
behavior for applications which handle asynchronous interrupts. The option affects
unwinding in the entry and exit regions.
At optimization level +02 and higher (using dataflow information), save and restore
operations become more efficient.
This option can change the behavior of programs that perform exception-handling or that
handle asynchronous interrupts. The behavior of setjmp() and longjmp() is not affected.
+O[no]fail_safe
Optimization level(s): 1, 2, 3
Default: +Ofail_safe
The +Ofail_safe option allows compilations with internal optimization errors to continue
by issuing a warning message and restarting the compilation at +O0.
You can use +Onofail_safe at optimization levels 1, 2, 3, or 4 when you want the internal
optimization errors to abort your build.
This option is disabled when compiling for parallelization.
+O[no]whole_program_mode
Table 4-4. HP C Advanced Optimization Options
Option Option