Kenwood HP 9000 Personal Computer User Manual


 
290 Chapter 8
Ways to Improve Performance
Profile-Based Optimization
$ cc +I +O3 -c file.c Create I-SOM for instrumentation.
$ cc +I +O3 file.o Link with instrumentation.
$ a.out < input_file Run instrumented executable with representative input
data.
$ cc +P +O3 file.o Perform PBO and HLO.
Replace +O3 with +O4 in the above example to get HLO over the entire
program and ADDIL elimination. (You may see a warning when using
+O4 at instrumentation indicating that the +O4 option is being ignored.
You can ignore this warning.)
I-SOM File Restrictions
For the most part, there are not many noticeable differences between
I-SOM files and ordinary object files. Exceptions are noted below.
ld . Linking object files compiled with the +I or +P option takes much
longer than linking ordinary object files. This is because in addition to
the work that the linker already does, the code generator must be run on
the intermediate code in the I-SOM files. On the other hand, the time to
compile a file with +I or +P is relatively fast since code generation is
delayed until link time.
All options to ld should work normally with I-SOM files with the
following exceptions:
-r The -r option works with both -I and -P. However, it
produces an object file, not an I-SOM file. In 64-bit
mode, use -I, -P, or the +nosectionmerge option on
a -r linker command to allow procedures to be
positioned independently. Without these options, a -r
link merges procedures into a single section.
-s Do not use this option with -I. However, there is no
problem using this option with -P.
-G Do not use this option with -I. There is no problem
using this option with -P.
-A Do not use this option with -I or -P.
-N Do not use this option with -I or -P.