Specifications
26 Performance-Centric Compiler Switches Chapter 3
32035 Rev. 3.22 November 2007
Compiler Usage Guidelines for AMD64 Platforms
-fno-rtti. Using this switch instructs the C++ compiler to discard 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.4 PathScale Compilers (64-Bit) for Linux
®
PathScale provides C, C++, and Fortran compilers for AMD64 architecture-based systems running
the Linux operating system. The current version (as of August 2007) is 3.0 All options described in
this section apply to this version.
3.4.1 Invocation Commands
The following commands invoke specific compilers:
• pathcc invokes the QLogic PathScale C compiler.
• pathCC invokes the QLogic PathScale C++ compiler.
• pathf95 invokes the QLogic PathScale Fortran compiler.
3.4.2 Generic Performance Switches
The -O3 and -OPT:Ofast switches are recommended as the first step of optimization. For further
tuning, experiment with the switches in the next section.
3.4.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 64-bit QLogic PathScale compiler allows profile guided
optimization. Use the following steps for profile guided optimization with 64-bit PathScale compilers
for Linux.
1. Compile the program with the -fb_create fbdata switch.
2. Run the executable produced in Step 1. It will generate several files with profile information.
3. Recompile the program with the -fb_opt fbdata switch.
Inter-Procedure Optimization. Use the switch -ipa to enable inter-procedure optimization.
-Ofast. For aggressive optimization, use the -Ofast switch. This is the shorthand for the switches
-O3, -OPT:Ofast, -ipa -ffast-math, and -fno-math-errno .
Linking with ACML. The AMD Core Math Library (ACML) includes BLAS, LAPACK and FFT
routines that are optimized for AMD Athlon™ 64 and AMD Opteron™ processors. If the program