HP Compilers for HP Integrity Servers (September 2011)

Many wrappers around malloc() obey these rules.
The non_exposing attribute indicates that the given function does not cause any
address it can derive from any of its formal parameters to become visible after a
call to the function returns. An address becomes visible if the function returns a value
from which it can be directly derived, or if the function stores it in a memory location
that is visible (can be referenced directly or indirectly) after the call to the function
returns. This indicates that the compiler can make more aggressive aliasing
assumptions about addresses passed to the given function. For example:
void foo(int *pi) __attribute__((non_exposing));
Many wrappers around free() obey these rules. Many functions that have nothing
to do with memory allocation also obey these rules.
The compiler alone cannot determine when these guidelines are followed, nor can it
diagnose violations of these guidelines. However, in whole program mode, the option
+O[no]ptrs_to_globals is not necessary any more since the compiler will perform
analysis to detect whether statically allocated data are accessed through pointers. In
addition, the compiler will detect and warn about wrong uses of +Onoptrs_to_globals
if whole program mode is specified.
Table 2 General purpose tuning options and when to use them
OptionsWhen to TryOptimization Type
Legacy C code which does not
include headers for all the system
library functions called.
Include system header files
+DSblended
+DSitanium2+DSmontecito
+DSpoulson +DSnative
Optimal performance on a
specific processor.
Willingness to support multiple
processors.
Optimizing for the processor
-exec -minsharedCreating an executable rather
than a shared library.
Choosing the link mode
Preference for available archived
libraries.
-Wl,+pi -Wl,+pdHigh data (or instruction) TLB miss
rate.
Increasing the page size
+O[no]ptrs_to_globals
+Otype_safety
+O[no]parmsoverlap
It is known that application follows
specific guidelines.
Describing application
characteristics
Application tuning 27