Specifications
Chapter 3 Performance-Centric Compiler Switches 35
Compiler Usage Guidelines for AMD64 Platforms
32035 Rev. 3.22 November 2007
3. Recompile the program with the -prof_use switch. It is recommended to also use the -ipo switch
in this stage.
-nolib_inline. For programs with many calls to memory-related library routines (such as, memmove
and memcopy), using the -nolib_inline switch may improve performance for Intel compiler versions
7.1 and 8.0. This switch is not recommended for version 9.1.
-unroll[n]. This switch sets the maximum number of times to unroll a loop. Experiment with values
1–4. For scientific programs, a particular value may slightly improve performance.
-fno-rtti. Using this switch will instruct the C++ compiler not to keep C++ run-time type information
(RTTI). This may improve performance. However, C++ features requiring RTTI (exceptions,
dynamic cast, etc.) will not be supported.
-ansi-alias. Try this switch if the program strictly conforms to the ISO C99 standard. If the
program adheres to the standard, this switch allows the compiler to perform aggressive optimizations.
3.10 PathScale Compilers (32-Bit) for Linux®
PathScale provides C, C++, and Fortran compilers for x86 Linux. The current version (as of August
2007) is 3.0. All the options described in this section apply to this release. To generate 32-bit binaries,
the -m32 switch must be used with the PathScale compiler.
3.10.1 Invocation Commands
The following commands invoke specific compilers:
• pathcc invokes the PathScale C compiler.
• pathCC invokes the PathScale C++ compiler.
• pathf90 invokes the PathScale Fortran compiler.
3.10.2 Generic Performance Switches
Use the -O3 and -OPT:Ofast switches as the first step of optimization. For further tuning, experiment
with the switches in Section 3.10.3.
3.10.3 Other Switches
In addition to the -O3 and -OPT:Ofast switches, the following list of switches may improve the
performance of the program. It is worth experimenting with these switches.
Profile Guided Optimization. The 32-bit PathScale compiler also allows profile guided
optimization. Use the following steps for profile guided optimization with PathScale compilers.
1. Compile the program with the -fb_create fbdata switch.
2. Run the executable produced in Step 1. Running this executable generates several files with
profile information.