HP aC++/HP C A.06.20 Programmer's Guide
-ipo
The -ipo option enables interprocedural optimizations across files. The object file
produced using this option contains intermediate code (IELF file). At link time,ld
automatically invokes the interprocedural optimizer (u2comp), if any of the input object
files is an IELF file.
For optimization levels +O0 and +O1, this option is silently ignored.
The-ipo option will get implicitly invoked with the +O4 and +Ofaster options to
match current behavior (+O4 ==> +O3 -ipo).
For -ipo compilations, the back end is parallelized, and the level of parallelism can
be controlled with the environment variable PARALLEL, since the standard HP-UX
make utility is used for the parallelization.
Object Files Generated with -ipo
Object files generated by the compiler with +O4 or -ipo, called intermediate object
files, are intended to be temporary files. These object files contain an intermediate
representation of the user code in a format that is designed for advanced optimizations.
The size of these intermediate object files can typically be 3 to 10 times as large as
normal object files. Hewlett-Packard reserves the right to change the format of these
files without prior notice. There is no guarantee that intermediate object files will be
compatible from one revision of the compiler to the next. Use of intermediate files must
be limited to the compiler that created them. For the same reason, intermediate object
files should not be included into archived libraries that might be used by different
versions of the compiler. The compiler will issue an error message and terminate when
an incompatible intermediate file is generated.
+[no]nrv
+[no]nrv
-nrv_optimization,[off|on]
The +[no]nrv option enables [disables] the named return value (NRV) optimization.
By default it is disabled.
The NRV optimization eliminates a copy-constructor call by allocating a local object
of a function directly in the caller’s context if that object is always returned by the
function.
Example:
struct A{
A(A const&); //copy-constructor
};
A f(A constA x) {
A a(x);
return a; // Will not call the copy constructor if the
} // optimization is enabled.
70 Command-Line Options