Compiler Option Quick Reference

This quick reference inlcudes the Intel® compiler options included with this tutorial. See the Intel compiler User's Guide for the complete Quick Reference.

Option

Description

Default

Windows*

Linux*

-fast

-fast

Enables -O3 and -Qipo to enhance speed across the entire program.

OFF

-G1

-tpp1

Itanium®-based systems only
Target optimization to the Itanium processor.

OFF

-G2

-tpp2

Itanium-based systems only
Target optimization to the ItaniumŪ 2 processor. Generated code is compatible with the Itanium processor.

ON

-G5

-tpp5

IA-32 only
Targets the optimizations to the Intel® PentiumŪ processor.

OFF

-G6

-tpp6

IA-32 only
Targets the optimizations to the Intel Pentium Pro, Pentium II and Pentium III processors.

OFF

-G7

-tpp7

IA-32 only
Targets optimizations for the Intel Pentium 4 processors, Intel® Xeon(TM) processors, Intel® Pentium® M processors, and Intel processors code-named "Prescott".

ON

-O1

-O1

Optimizes for speed, but omits optimizations that tend to increase object size for small speedups.

For the Itanium compiler, -O1 turns off software pipelining to reduce code size.

Creates the smallest code in the majority of cases.

Use this option for applications sensitive to code size and code locality, such as large database applications and code with many branches and not dominated by loops

-O1 implies -Oi, but some applications that are sensitive to code size and locality may benefit from -Oi. Hence, you may want to try -O1 -Oi.

OFF

-O2

-O2

Default setting. Optimizes for speed. The -O2 option adds intrinsic function inlining to -O1 optimizations. The compiler may reassociate floating-point expressions to improve application performance.

Creates the fastest code in most cases, but may increase code size significantly more than -O1.

For best overall performance on typical integer applications that do not make heavy use of floating point math.

ON

-O3

-O3

Optimizes for speed. Enables high-level optimization. Same as -O2, plus loop transformation and data prefetching.

This level does not guarantee higher performance. Using this option may increase the compilation time. Impact on performance is application dependent, some applications may not see a performance improvement.

For applications that make heavy use of floating point calculations on large data sets

Limited support for IA-32 C++ compiler for Linux*. See the User's Guide for more information.

OFF

-Od

-O0

Disables optimizations. This option also replaces calls to math intrinsics with calls to the standard runtime library.

You can use this option during the early stages of application development, until you know the application is working correctly, then move to a higher setting, usually -O2.

Does not utilize Itanium architecture features such as predication, speculation, and software pipelining, so it generates poor code with lots of loads and stores.h

OFF

-Oi[-]

-nolib_inline

Disables inline expansion of intrinsic functions.

OFF

-Qax{K|W|N|B|P}

-ax{K|W|N|B|P}

IA-32 only
Generates specialized code for processor-specific codes K, W, N, B, and P while also generating generic IA-32 code.

  • K = Intel Pentium III and compatible Intel processors.
  • W = Intel Pentium 4 and compatible Intel processors.
  • N = Intel Pentium 4 and compatible Intel processors.
  • B = Intel Pentium M and compatible Intel processors.
  • P = Intel processors code-named "Prescott".

OFF

-Qip

-ip

Enables interprocedural optimizations for single file compilation.

OFF

-Qipo

-ipo

Enables interprocedural optimizations across files.

OFF

-Qlong_double

-long_double

Changes the defaultsize of the long double type from 64 to 80 bits.

This option introduces a number of incompatibilities with other files compiled without this option and with calls to library routines. Therefore, Intel recommends that the use of long double variables be local to a single file when you compile with this option.

OFF

-Op[-]

-mp

Enables [disables] conformance to the ANSI C and IEEE 754 standards for floating-point arithmetic (subset of -Za or -ansi).

Very precise; slows your application down

OFF

-Qopenmp>

-openmp

Enables the parallelizer to generate multi-threaded code based on the OpenMP* directives. The -Qopenmp option works with both -Od and any optimization level of -O1, -O2 (default ), and -O3. The support of -Od by OpenMP helps to debug OpenMP applications.

OFF

-Qpc{32|64|80}

-pc{32|64|80}

IA-32 only
Enables floating-point significand precision control. The value is used to round the significand to the correct number of bits. The value must be either 32, 64, or 80.

-Qpc64

-Qprec

-mp1

IA-32 only
Improves floating-point precision with less performance degradation than -Op. Almost, but not quite, as precise as ANSI; faster than ANSI. All but the most costly operations are done according to ANSI.

OFF

-Qprec_div

-prec_div

IA-32 only
Disables the floating point division-to-multiplication optimization.

By default, the Intel compiler converts division operations into reciprocal multiply operations, which is less precise but much faster.

OFF

-Qprof_dir dirname

 

Specifies the directory (dirname) to hold profile information.

OFF

-Qprof_gen[x]

-prof_gen[x]

Instruments the program to prepare for instrumented execution and also creates a new static profile information file (.spi)

OFF

-Qprof_use

-prof_use

Uses dynamic feedback information.

OFF

-Qrcd

-rcd

IA-32 only
Enables [disables] fast conversions of floating-point-to-integer conversions. Improves the performance of code that requires floating-point-to-integer conversions. Can cause incorrect results for programs (esp. Fortran) that depend on rounding.

 

OFF

-Qx{K|W|N|B|P}

-x{K|W|N|B|P}

IA-32 only
Generates specialized code for processor-specific codes K, W, N, B, and P.

  • K = Intel Pentium III and compatible Intel processors.
  • W = Intel Pentium 4 and compatible Intel processors.
  • N = Intel Pentium 4 and compatible Intel processors.
  • B = Intel Pentium M and compatible Intel processors.
  • P = Intel processors code-named "Prescott".

OFF

-Za

-ansi

Enforces strict conformance to the ANSI standard for C.

Slower and more precise than -Op.

OFF

-Zi

-g

Enables generating debug information (.pdb for Windows Visual C++*).

Adds info to the object file so that any particular assembly line can be associated with its corresponding C code.

Use this option when tuning your application's performance using the VTune™ Performance Analyzer or a similar tool.

OFF