8
POWER7 and Optimization and Tuning Guide
Critically, all compilers that are used to build an application should be up-to-date versions that
offer full support for the target processor chip. Older levels of a compiler might tolerate newer
processor chips, but they do not capitalize on the unique features of the latest processor
chips. For the IBM XL compilers on AIX or Linux, XLC11 and XLF13 are the first compiler
versions that have processor-specific tuning for POWER7. The new XLC12 compiler is
generally recommended. For the GCC compiler on Linux, the IBM Advance Toolchain 4.0 and
5.0 versions contain an updated GCC compiler that is recommended for POWER7. The IBM
XL Fortran Compiler is generally recommended over gfortran for the most optimized high
floating point performance characteristics. Compiler levels do not change for .
For the GCC compiler on Linux, the GCC compilers that come with RHEL and SLES
recognize and take advantage of the Power Architecture and optimizations. For improved
optimizations and newer GCC technology, the IBM Advance Toolchain package provides an
updated GCC compiler and optimized toolchain libraries that you should use with POWER7.
The Advance Toolchain is a key performance technology available for Power Systems running
Linux. It includes newer, Power optimized versions of compilers (GCC, G++, and gfortran),
utilities, and libraries, along with various performance tools. The full Advance Toolchain must
be installed in the build environment, and the Advance Toolchain runtime package must be
installed in the performance test bed. The Toolchain is designed to coexist with the GCC
compilers and toolchain that are provided in the standard Linux distributions. More
information is available in “GCC, toolchain, and IBM Advance Toolchain” on page 98.
Along with the compilers for C/C++ and Fortran, there is the separate IBM Feedback Directed
Program Restructuring (FDPR®) tool to optimize performance. FDPR takes a post-link
executable image (such as one produced by static compilers) and applies additional
optimizations. FDPR is another tool that can be considered for optimizing applications that
are based on an executable image. More details can be found in 6.3, “IBM Feedback Directed
Program Restructuring” on page 114.
Java also contains a dynamic Just-In-Time (JIT) compiler, and only newer versions are tuned
for POWER7 or . However, Java compilations to binary code take place at
application execution time, so a newer Java release must be installed on the performance test
bed system. For IBM Java, tuning for POWER7 was introduced in Java 6 SR7, and that is the
recommended minimum version. Newer versions of Java contain more improvements,
though, as described in 7.1, “Java levels” on page 126. Java 7 is generally the preferred
version to use for POWER7 or because of improvements over previous versions.
C, C++, and Fortran compiler options
For the static compilers, the important compilation options to consider are as follows:
Basic optimization options: With the IBM XL compilers, the minimum suggested
optimization level to use is
-O
, while for GCC it is
-O3
. Higher levels of optimization are
better for some types of code, and you should experiment with them. The XL compilers
also have optimization options, such as
-qhot
, that can be evaluated. More options are
detailed in Chapter 6, “Compilers and optimization tools for C, C++, and Fortran” on
page 107. The more aggressive optimization options might not work for all programs and
might need to be coupled with the strict options described in this list (see page 9).
Target processor chip options: It is possible to build a single executable that runs on
various POWER processors. However, that executable does not take advantage of some
of the features added to later processor chips, such as new instructions. If only a restricted
range of newer processor chips must be supported, consider using the compilation
options that enable the usage of newer features. With the XL compilers, for example, if the
executable must run only on POWER7 processors, the
-qarch=pwr7
option can be
specified. The equivalent GCC option is
-mcpu=power7
.
Summary of Contents for Power System POWER7 Series
Page 2: ......
Page 36: ...20 POWER7 and POWER7 Optimization and Tuning Guide...
Page 70: ...54 POWER7 and POWER7 Optimization and Tuning Guide...
Page 112: ...96 POWER7 and POWER7 Optimization and Tuning Guide...
Page 140: ...124 POWER7 and POWER7 Optimization and Tuning Guide...
Page 162: ...146 POWER7 and POWER7 Optimization and Tuning Guide...
Page 170: ...154 POWER7 and POWER7 Optimization and Tuning Guide...
Page 223: ......