Specifications

34 Performance-Centric Compiler Switches Chapter 3
32035 Rev. 3.22 November 2007
Compiler Usage Guidelines for AMD64 Platforms
-fno-rtti. This switch disables generation of information about every class with virtual functions for
use by the C++ runtime type identification features (dynamic_cast and typeid). If the user does not
use those parts of the language, some space can be conserved by using this switch.
Users can obtain more details on these switches by trying info gcc on their Linux systems.
3.9 Intel Compilers (32-Bit) for Linux®
The 32-bit Intel compilers can be installed and run on 32-bit and 64-bit Linux on AMD Athlon™ 64,
AMD Opteron™ and AMD Family 10h processors. On 64-bit Linux, the 32-bit binaries will run in
compatibility mode. To be able to do this, one has to tell the system linker on 64-bit Linux to link with
32-bit libraries, and to generate 32-bit executable. This can be done with the following command.
PROMPT$ icc -Wl,-m,elf_i386 <other compiler switches> <source files>
3.9.1 Invocation Commands
The following commands invoke specific compilers:
icpc invokes the Intel C++ compiler for version 10.0.
icc invokes the Intel C/C++ compilers for version 10.0.
ifort invokes the Intel Fortran versions 10.0 compiler.
3.9.2 Generic Performance Switches
These flags are recommended for Intel 10.0 compiler: -xW -ipo -O3 -static.
The -xW switch instructs the compiler to optimize for a Pentium
®
4 processor (including SSE2
instructions).
The -ipo switch enables inter-procedural (across source files) analysis.
The -O3 switch optimizes for speed, including several aggressive optimizations.
3.9.3 Other Switches
In addition to the switches mentioned in the following list of switches may also improve the
performance of the program. It is worth experimenting with these switches.
Profile Guided Optimization. Intel compilers allow profile guided optimization. Use the
following steps for profile guided optimization with Intel compilers.
1. Compile the program with the -prof_gen switch. The -ipo or -ip switch is ignored by the compiler
if used with -prof_gen.
2. Run the executable produced in Step 1. Running this executable generates several files with
profile information (*.dyn and *.dpi).