dynamic This is a less efficient mode in which thread local data outside the program startup set can be accessed as well. This is the default.

Translation units compiled with different settings of this option may be freely mixed, even within the same load module.

+wlock

+wlock

The +wlock option enables compile-time diagnostic messages for potential errors in using lock/unlock calls in programs that use pthread-library-based lock/unlock functions. Warnings are emitted for acquiring an already acquired lock, releasing an already released lock, and unconditionally releasing a lock that has been conditionally acquired.

This diagnostic checking is based on cross-module analysis performed by the compiler. Therefore, the +wlockoption implicitly enables a limited form of cross-module analysis, even if -ipoor+O4 options are not specified. This can lead to a significant increase in the compile time compared to a build without the +wlock option. Using this option could result in the compiler invoking optimizations other than those that are part of the user-specified optimization level. If +wlock is used in addition to -ipoor +O4, the generated code is not affected, and the compile time does not increase much.

Performance Options

The HP compiler provides a variety of options to help improve build and runtime performance. These options are:

-fast

-fast

The -fastoption selects a combination of optimization options for optimum execution speed and reasonable build times. This option is equivalent to +Ofast. Currently chosen options are:

+O2

+Ofltacc=relaxed

+Onolimit

+DSnative

+FPD

You can override any of the options in -fastby specifying a subsequent option after it.

Use this option when porting C++ and C applications compiled on other UNIX operating systems to HP-UX.

NOTE: Do not use this option for programs that depend on IEEE standard floating-point denormalized numbers. Otherwise, different numerical results may occur.

+Ofast

+Ofast

The +Ofast option selects a combination of optimization options for optimum execution speed for reasonable build times. Currently chosen options are:

+O2

+Ofltacc=relaxed

+Onolimit

+DSnative

68 Command-Line Options

Page 68
Image 68
HP C/aC++ for PA-RISC Software manual Performance Options, +wlock, Fast, +Ofast