HP C Programmer's Guide (92434-90009)

74 Chapter4
Optimizing HP C Programs
Controlling Specific Optimizer Features
+O[no]initcheck
Optimization level(s): 2, 3, 4
Default: unspecified
The initialization checking feature of the optimizer has three possible states: on, off, or
unspecified. When on (+Oinitcheck), the optimizer initializes to zero any local, scalar,
non-static variables that are uninitialized with respect to at least one path leading to a use
of the variable.
When off (+Onoinitcheck), the optimizer issues warning messages when it discovers
definitely uninitialized variables, but does not initialize them.
When unspecified, the optimizer initializes to zero any local, scalar, non-static variables
that are definitely uninitialized with respect to all paths leading to a use of the variable.
Use +Oinitcheck to look for variables in a program that may not be initialized.
+O[no]inline[=
name1, name2, ...nameN
]
Optimization level(s): 3, 4
Default: +Oinline
When +Oinline is specified without a
name
list, any function can be inlined. For inlining to
be successful, follow prototype definition for function calls in the appropriate header file.
When specified with a
name
list, the named functions are important candidates for
inlining. For example, saying
+Oinline=foo,bar +Onoinline
indicates that inlining be strongly considered for foo and bar; all other routines will not be
considered for inlining, since +Onoinline is given.
When this option is disabled with a name list, the compiler will not consider the specified
routines as candidates for inlining. For example, saying
+Onoinline=baz,x
indicates that inlining should not be considered for baz and x; all other routines will be
considered for inlining, since +Oinline is the default.
The +Onoinline disables inlining for all functions or a specific list of functions.
Use this option when you need to precisely control which subprograms are inlined. Use of
this option can be guided by knowledge of the frequency with which certain routines are
called and may be warranted by code size concerns.
+Oinline_budget[=
n
]
Optimization level(s): 3, 4
Default: +Oinline_budget=100
where
n
is an integer in the range 1 - 1000000 that specifies the level of aggressiveness, as
follows:
n
= 100 Default level of inlining.