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.

Some compiler options are only available on certain systems. In the options reference table below, these options are indicated with labels as follows:

Label

Meaning

i32

Option available on IA-32-based systems.

i32em

Option available on Intel® Extended Memory 64 Technology (Intel® EM64T) systems.

i64

Option available on Itanium®-based systems.

(no label) Option available on IA-32 based systems, Intel® EM64T systems, and Itanium-based systems.

 

Option

Architecture

Description

Default

Windows*

Linux*

-fast

-fast

i64

Enhances speed across the entire program.

Linux: Enables -O3 -ipo -static

Windows: Enables -O3 -Qipo

OFF

i32,
i32em

Enhances speed across the entire program.

Linux: Enables -O3 -ipo -static -xP

Windows: Enables -O3 -Qipo -QxP

-G1

-tpp1

i64

Target optimization to the Itanium processor.

OFF

-G2

-tpp2

i64

Target optimization to the ItaniumŪ 2 processor. Generated code is compatible with the Itanium processor.

ON

-G5

-tpp5

i32

Targets the optimizations to the Intel® PentiumŪ processor.

OFF

-G6

-tpp6

i32

Targets the optimizations to the Intel Pentium Pro, Pentium II and Pentium III processors.

OFF

-G7

-tpp7

i32,
i32em

Targets optimizations for the Intel Pentium 4 processors, Intel® Pentium® M processors, and Intel® Pentium® 4 processors with Streaming SIMD Extensions 3 (SSE3).

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.

OFF

-Oi[-]

-nolib_inline

 

Disables inline expansion of intrinsic functions.

OFF

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

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

i32,
i32em

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 Pentium 4 processors with Streaming SIMD Extensions 3 (SSE3).

The only option available on Intel® EM64T-based systems is P.

OFF

-Qip

-ip

 

Enables interprocedural optimizations for single file compilation.

OFF

-Qipo[value]

-ipo[value]

 

Enables interprocedural optimizations across files.

The optional value argument controls the maximum number of link-time compilations (or number of object files) that are spawned. The default for value is 1 when value is not specified.

OFF

-Qlong_double

Not available

i32,
i32em

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}

i32,
i32em

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.

Windows:
-Qpc64

Linux:
-pc80

-Qprec

-mp1

i32

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

i32,
i32em

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

i32

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}

i32,
i32em

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 Pentium® 4 processors with Streaming SIMD Extensions 3 (SSE3)

The only option available on Intel® EM64T-based systems is P.

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