HP C Programmer's Guide (92434-90009)

Chapter 4 81
Optimizing HP C Programs
Controlling Specific Optimizer Features
int *p;
p=b;
foo()
For more information about type aliasing see the section "Aliasing Options" at the end of
this chapter.
+O[no]regionsched
Optimization level(s): 2, 3, 4
Default: +Onoregionsched
Applies aggressive scheduling techniques to move instructions across branches. This
option is incompatible with the linker -z option. If used with -z, it may cause a SIGSEGV
error at run-time.
Use +Oregionsched to improve application run-time speed. Compilation time may
increase.
+O[no]regreassoc
Optimization level(s): 2, 3, 4
Default: +Oregreassoc
If disabled, this option turns off register reassociation.
Use +Onoregreassoc to disable register reassociation if this optimization hinders the
optimized application performance.
+O[no]sideeffects=[
name1, name2, ...nameN
]
Optimization level(s): 2, 3, 4
Default: assume all subprograms have side effects
Assume that subprograms specified in the
name
list might modify global variables.
Therefore, when +Osideeffects is enabled the optimizer limits global variable
optimization.
The default is to assume that all subprograms have side effects unless the optimizer can
determine that there are none.
Use +Onosideeffects if you know that the named functions do not modify global
variables and you wish to achieve the best possible performance.
+O[no]signedpointers
Optimization level(s): 0, 1, 2, 3, 4
Default: +Onosignedpointers
Perform [or do not perform] optimizations related to treating pointers as signed quantities.
Applications that allocate shared memory and that compare a pointer to shared memory