Optimizing Itanium-Based Applications (May 2011)
Optimizing Itanium-Based Applications
13
+O[no]libmerrno
(default +Onolibmerrno, except with C’s –Aa, c89, or –AC89 the default
is +Olibmerrno)
Enables support for errno in libm functions. Different, less optimal versions of libm functions are
invoked under +Olibmerrno. Additionally, the optimizer is prohibited from performing
optimizations of these calls (such as coalescing calls to the same libm function with identical inputs)
because they are no longer side-effect-free.
Under C’s –Aa, c89, or –AC89, the default becomes +Olibmerrno.
controlling data allocation
+Olit=[none|const|all] (default +Olit=all)
Not supported by Fortran.
Indicates which constants can be placed in the read-only data section. With +Olit=none, no constants
are placed in read-only memory. With +Olit=const, any const-qualified data that does not require
loadtime or runtime initialization are placed in read-only memory. Additionally, any string literal that
appears in a context where a const char * is legal are placed in read-only memory. With
+Olit=all, the same behavior occurs as for +Olit=const, except that all string literals are placed
in read-only memory.
Placing constants in read-only memory can result in a smaller executable due to coalescing of identical
string literals and can promote data sharing in a multi-user application.
+Oshortdata[=n] (default n=8)
Not supported by Fortran.
Controls the size of objects placed in the short data area. All objects of size n bytes or smaller are
placed in the short data area. All references to short data assume that it resides in the short data area
(even if this is not defined within the translation unit). Accessing short own data is done using a short
gp-relative add, which is more efficient than the access sequences for non-short or non-own
data. The own data is statically allocated data known to be defined in the current load module. This
includes static, hidden, and protected data, or data whose definition has been seen prior to a reference in
the translation unit.
Valid values of n are decimal numbers between 8 and 4,194,304 (4 MB). When no size is specified, all
data is placed in the short data area (a link error results if the total size is larger than 4MB). Items of
unknown size (for example, extern int a[];) are addressed with short gp-relative
sequences only when no size is specified with +Oshortdata.
This option is unnecessary when compiling with –ipo or +O4, as interprocedural analysis will
automatically perform the optimization on the maximum amount of data possible.
controlling symbol binding
These options allow the user to control the binding of both function and data symbols. The binding controls
how symbols are called and accessed and how the access sequences can be optimized. In the
‘:filename’ form, ‘filename’ refers to a file with a space- or newline-separated list of symbols.
Incorrect use of these options can result in either link-time or run-time errors by changing the number of
visible definitions of each symbol and by changing the way load-time binding occurs.
-Bprotected[=symbol[,symbol]*]
-Bprotected:filename
#pragma protected symbol[,symbol]
#pragma binding protected