HP aC++ A.03.80 Release Notes
HP aC++ Release Notes
New Features in Version A.03.33
Chapter 142
$ aCC caller.C dll.sl
/usr/ccs/bin/ld: Unsatisfied symbols:
BaseClass::goo() (first referenced in caller.o) (code)
The solution is to export member function goo() from the shared library using
__declspec(dllexport).
+Oprofile Option for Profile-Based Optimization
This release enhances the usability of PBO by providing the flexibility of choosing to generate
the PA-RISC machine code (SOMs) directly instead of the compiler’s intermediate code
(ISOMs) during the compilation phase itself. Behavior of the earlier versions of the compiler
has been to generate intermediate code during compilation phase when PBO options are used
(+I,+P), and generate final PA-RISC machine code during link-phase. As a result of this
behavior, when a large number of files are compiled with PBO options, code generation for all
the files would happen during link phase.
An obvious disadvantage of this is that, even when a single file is changed, code generation for
all other files will happen during link-phase, unless +Oreusedir= is used. This makes overall
compile-link time significantly high. With the new set of +Oprofile options, this
disadvantage can be overcome.
The options below do not produce ISOMs (Intermediate-code .o files) as do the +I, +P, and +O4
options. Therefore they will rebuild faster than the ISOM-building options, but cannot just be
relinked in the +P phase from the ISOMs built by the +I phase. The new options also do not
support cross-module optimization with the +O4 option. PBO build processes that do not
rebuild from source will not work with these new options, but processes that currently use
scripts to run ld -r commands on every ISOM to convert it to a SOM can use the aCC driver
with these new options instead of the scripts.
Following are the new options of +Oprofile:
+Oprofile=use
Use the profile database to optimize. This is similar in behavior to the +P option.
+Oprofile=use:filename
Specify filename as the name of the profile database file. This is similar in behavior to the +P
and +df options (that is, +P +df filename).
+Oprofile=collect
Instrument the application for profile based optimization. This is similar in behavior to the +I
option.